Skip to content

Commit

Permalink
update kpt in dftb calc
Browse files Browse the repository at this point in the history
  • Loading branch information
qzhu2017 committed Feb 11, 2024
1 parent 13fa498 commit 1c99a4f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyxtal/interface/dftb.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,7 @@ def DFTB_relax(struc, skf_dir, opt_cell=False, step=500, \
os.makedirs(folder)
cwd = os.getcwd()
os.chdir(folder)

kpts = Kgrid(struc, kresol)
if type(kresol) != list: kpts = Kgrid(struc, kresol)
atom_types = set(struc.get_chemical_symbols())
kwargs = make_Hamiltonian(skf_dir, atom_types, disp, kpts, use_omp=use_omp)

Expand All @@ -192,6 +191,7 @@ def DFTB_relax(struc, skf_dir, opt_cell=False, step=500, \
dyn = FIRE(ecf, logfile=logfile)
else:
dyn = FIRE(struc, logfile=logfile)

try:
dyn.run(fmax=fmax, steps=step)
os.remove('dftb_pin.hsd')
Expand All @@ -200,6 +200,7 @@ def DFTB_relax(struc, skf_dir, opt_cell=False, step=500, \
except:
print("Problem in DFTB calculation")
struc = None

os.chdir(cwd)
return struc

Expand Down

0 comments on commit 1c99a4f

Please sign in to comment.