add XTB1 to the DFTB+ module

main
Aditya Wibawa Sakti 2 years ago
parent 500f7c3fd1
commit be5cb3dce0
  1. 2
      bin/cmmde.py
  2. BIN
      lib/__pycache__/cmmde_dftb.cpython-39.pyc
  3. 89
      lib/cmmde_dftb.py

@ -357,7 +357,7 @@ if opt.job == 'checkopt' and opt.software == 'dock':
checkopt(opt.nligands)
if opt.software == 'dftb':
if '.xyz' in opt.input:
if '.xyz' in opt.input or '.gen' in opt.input:
geom = opt.input
elif 'POSCAR' in opt.input or '.poscar' in opt.input:
poscar2gen(opt.input)

@ -225,18 +225,19 @@ def dftb(geom,job,activeatoms,method,parapath,dispersion,kpts,hcorr):
0 0 {}
{} {} {}
}}
}}""".format(kpts[0],kpts[1],kpts[2],shift,shift,shift))
print("Hamiltonian = DFTB {",file=f)
if method == 'DFTB2':
print("scc = Yes",file=f)
print("MaxSCCIterations = 1000",file=f)
if method == 'DFTB3diag':
print("""scc = Yes
}}""".format(kpts[0],kpts[1],kpts[2],shift,shift,shift),file=f)
else:
print("Hamiltonian = DFTB {",file=f)
if method == 'DFTB2':
print("scc = Yes",file=f)
print("MaxSCCIterations = 1000",file=f)
if method == 'DFTB3diag':
print("""scc = Yes
ThirdOrder = Yes
MaxSCCIterations = 1000
""",file=f)
if method == 'DFTB3':
print("""scc = Yes
if method == 'DFTB3':
print("""scc = Yes
ThirdOrderFull = Yes
""",file=f)
## Koreksi ikatan hidrogen
@ -246,13 +247,13 @@ def dftb(geom,job,activeatoms,method,parapath,dispersion,kpts,hcorr):
'DFTB2': '4.5'
}
if hcorr == 'hdamp':
print("""HCorrection = Damping {{
print("""HCorrection = Damping {{
Exponent = {}
}}""".format(hdamp[method]),file=f)
if hcorr == 'H5':
print("""HCorrection = H5{ }""",file=f)
if dispersion == 'D3':
print("""Dispersion = DftD3 {
if hcorr == 'H5':
print("""HCorrection = H5{ }""",file=f)
if dispersion == 'D3':
print("""Dispersion = DftD3 {
Damping = ZeroDamping {
sr6 = 0.7461
alpha6 = 14.0
@ -260,8 +261,8 @@ def dftb(geom,job,activeatoms,method,parapath,dispersion,kpts,hcorr):
s6 = 1.0
s8 = 3.209
}""",file=f)
if dispersion == 'D3BJ':
print("""Dispersion = DftD3 {
if dispersion == 'D3BJ':
print("""Dispersion = DftD3 {
Damping = BeckeJohnson {
a1 = 0.5719
a2 = 3.6017
@ -269,8 +270,8 @@ def dftb(geom,job,activeatoms,method,parapath,dispersion,kpts,hcorr):
s6 = 1.0
s8 = 0.5883
}""",file=f)
if dispersion == 'D3H5':
print("""Dispersion = DftD3{
if dispersion == 'D3H5':
print("""Dispersion = DftD3{
Damping = ZeroDamping{
sr6 = 1.25
alpha6 = 29.61
@ -279,41 +280,41 @@ def dftb(geom,job,activeatoms,method,parapath,dispersion,kpts,hcorr):
s8 = 0.49
HHRepulsion = Yes
}""",file=f)
print("""SlaterKosterFiles = Type2FileNames {{
print("""SlaterKosterFiles = Type2FileNames {{
Prefix = {}/
Separator = "-"
Suffix = ".skf" """.format(parapath),file=f)
print('}',file=f)
print('}',file=f)
# Mapping bilangan kuantum azimuth ke penamaan orbital
azi2orb = {'1':'s','2':'p','3':'d','4':'f'}
azi2orb = {'1':'s','2':'p','3':'d','4':'f'}
print("MaxAngularMomentum {",file=f)
for element in elements:
print("""{} = "{}" """.format(element,azi2orb[azimuth(element)]),file=f)
print("}",file=f)
print("MaxAngularMomentum {",file=f)
for element in elements:
print("""{} = "{}" """.format(element,azi2orb[azimuth(element)]),file=f)
print("}",file=f)
if method == 'DFTB3':
print("HubbardDerivs {",file=f)
for element in elements:
print("""{} = {}""".format(element,hubbard(element)),file=f)
print("}",file=f)
if method == 'DFTB3':
print("HubbardDerivs {",file=f)
for element in elements:
print("""{} = {}""".format(element,hubbard(element)),file=f)
print("}",file=f)
# Informasi K-points
kpts = kpts.split('x')
shift = 0
if int(kpts[0])%2 == 0:
shift+=0.5
else:
shift +=0
kpts = kpts.split('x')
shift = 0
if int(kpts[0])%2 == 0:
shift+=0.5
else:
shift +=0
# if 'F' or 'S' in coord_type:
if '.gen' in geom:
print("""KPointsAndWeights = SuperCellFolding {{
{} 0 0
0 {} 0
0 0 {}
{} {} {}
}}""".format(kpts[0],kpts[1],kpts[2],shift,shift,shift),file=f)
if '.gen' in geom:
print("""KPointsAndWeights = SuperCellFolding {{
{} 0 0
0 {} 0
0 0 {}
{} {} {}
}}""".format(kpts[0],kpts[1],kpts[2],shift,shift,shift),file=f)
print("}", file=f)
print("}", file=f)
if job == 'dos':
print("Analysis {",file=f)
print(" ProjectStates {",file=f)

Loading…
Cancel
Save