using DFTK # Construct bulk system and convert to an AbstractSystem using ASEconvert system_ase = ase.build.bulk("Si") system = pyconvert(AbstractSystem, system_ase) system = attach_psp(system; Si="hgh/lda/si-q4") model = model_LDA(system; temperature=1e-3) basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4]) scfres = self_consistent_field(basis, tol=1e-8); using AtomsIO # Read a file using [AtomsIO](https://github.com/mfherbst/AtomsIO.jl), system = load_system("Si.extxyz") # Now run the LDA calculation: system = attach_psp(system; Si="hgh/lda/si-q4") model = model_LDA(system; temperature=1e-3) basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4]) scfres = self_consistent_field(basis, tol=1e-8); using AtomsBase using Unitful using UnitfulAtomic # Construct a system in the AtomsBase world a = 10.26u"bohr" # Silicon lattice constant lattice = a / 2 * [[0, 1, 1.], # Lattice as vector of vectors [1, 0, 1.], [1, 1, 0.]] atoms = [:Si => ones(3)/8, :Si => -ones(3)/8] system = periodic_system(atoms, lattice; fractional=true) # Now run the LDA calculation: system = attach_psp(system; Si="hgh/lda/si-q4") model = model_LDA(system; temperature=1e-3) basis = PlaneWaveBasis(model; Ecut=15, kgrid=[4, 4, 4]) scfres = self_consistent_field(basis, tol=1e-4); second_system = atomic_system(model) lattice = 5.431u"Å" / 2 * [[0 1 1.]; [1 0 1.]; [1 1 0.]]; Si = ElementPsp(:Si, psp=load_psp("hgh/lda/Si-q4")) atoms = [Si, Si] positions = [ones(3)/8, -ones(3)/8] third_system = atomic_system(lattice, atoms, positions)