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