-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Solving embedding calculation issue (#105).
Added tests for Erkale localization, reading fchk files (for issue #103) and the WF-in-DFT method I implemented in my PhD thesis.
- Loading branch information
1 parent
5568d3a
commit 04434ca
Showing
18 changed files
with
4,273 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
SYSTEM_DESCRIPTION='C2OPs-TZ.geom' | ||
GEOMETRY | ||
e-[C] STO-3G 1.35434340389923 0.55988211198946 0.05525260812571 | ||
e-[H] STO-3G 2.45225753052674 -0.98466341806837 1.07188979363580 | ||
e-[C] STO-3G 2.63375141553823 -0.31899480577184 0.15987177742197 | ||
e-[H] STO-3G 2.54816069399926 -1.05872534257274 -0.70810872288146 | ||
e-[O] AUG-CC-PVDZ 3.78583048843762 0.37815496854981 0.19288336791534 addParticles=1 fragmentNumber=1 | ||
e-[H] STO-3G 1.39075957854909 1.17998258883901 -0.86139956877665 | ||
e-[H] STO-3G 1.29803871966429 1.25456719019296 0.91570797583479 | ||
e-[H] STO-3G 0.41993816938556 -0.04623329315828 0.03157276872451 | ||
E+ PSX-DZ 3.78583048843762 0.37815496854981 0.19288336791534 fragmentNumber=1 | ||
C dirac 1.35434340389923 0.55988211198946 0.05525260812571 | ||
H dirac 2.45225753052674 -0.98466341806837 1.07188979363580 | ||
C dirac 2.63375141553823 -0.31899480577184 0.15987177742197 | ||
H dirac 2.54816069399926 -1.05872534257274 -0.70810872288146 | ||
O dirac 3.78583048843762 0.37815496854981 0.19288336791534 | ||
H dirac 1.39075957854909 1.17998258883901 -0.86139956877665 | ||
H dirac 1.29803871966429 1.25456719019296 0.91570797583479 | ||
H dirac 0.41993816938556 -0.04623329315828 0.03157276872451 | ||
END GEOMETRY | ||
|
||
TASKS | ||
propagatorTheoryCorrection = 2 | ||
mollerPlessetCorrection = 2 | ||
configurationInteractionLevel = "CISD" | ||
subsystemEmbedding=.T. | ||
method = "UKS" | ||
END TASKS | ||
|
||
CONTROL | ||
electronExchangeCorrelationFunctional="B3LYP" | ||
subsystemBasisThreshold=0.001 | ||
subsystemOrbitalThreshold=0.2 | ||
erkaleLocalizationMethod="IAO" | ||
forceClosedShell=.T. | ||
readCoefficients=.F. | ||
localizeOrbitals=.T. | ||
totalEnergyTolerance=1E-10 | ||
scfGlobalMaxIterations=1000 | ||
integralsTransformationMethod = "C" | ||
ionizeMO=1 | ||
ionizeSpecies = "POSITRON" | ||
ptJustOneOrbital=T | ||
mpFrozenCoreBoundary=1 | ||
CIdiagonalizationMethod = "JADAMILU" | ||
END CONTROL |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env python | ||
from __future__ import print_function | ||
import os | ||
import sys | ||
from colorstring import * | ||
|
||
if len(sys.argv)==2: | ||
lowdinbin = sys.argv[1] | ||
else: | ||
lowdinbin = "lowdin2" | ||
|
||
testName = sys.argv[0][:-3] | ||
inputName = testName + ".lowdin" | ||
outputName = testName + ".out" | ||
|
||
# Reference values and tolerance | ||
|
||
refValues = { | ||
"HF energy" : [-153.536301213424,1E-6], | ||
"Embedded HF energy" : [-153.118946505217,1E-6], | ||
"Embedded CISD" : [-153.310526831872,1E-6], | ||
"Embedded MP2" : [-153.352174869549,1E-6], | ||
"Embedded P2 H_1" : [-5.328000,1E-3] | ||
} | ||
|
||
testValues = dict(refValues) #copy | ||
for value in testValues: #reset | ||
testValues[value] = 0 #reset | ||
|
||
# Run calculation | ||
|
||
status = os.system(lowdinbin + " -i " + inputName) | ||
|
||
if status: | ||
print(testName + str_red(" ... NOT OK")) | ||
sys.exit(1) | ||
|
||
output = open(outputName, "r") | ||
outputRead = output.readlines() | ||
|
||
# Values | ||
flag=1 | ||
for i in range(0,len(outputRead)): | ||
line = outputRead[i] | ||
if "TOTAL ENERGY =" in line and flag==1: | ||
testValues["HF energy"] = float(line.split()[3]) | ||
flag=2 | ||
continue | ||
if "TOTAL ENERGY =" in line and flag==2: | ||
testValues["Embedded HF energy"] = float(line.split()[3]) | ||
flag=3 | ||
continue | ||
if "STATE: 1 ENERGY =" in line: | ||
testValues["Embedded CISD"] = float(line.split()[4]) | ||
if "E(MP2) =" in line: | ||
testValues["Embedded MP2"] = float(line.split()[2]) | ||
if "Optimized second order pole:" in line: | ||
testValues["Embedded P2 H_1"] = float(line.split()[4]) | ||
|
||
passTest = True | ||
|
||
for value in refValues: | ||
diffValue = abs(refValues[value][0] - testValues[value]) | ||
if ( diffValue <= refValues[value][1] ): | ||
passTest = passTest * True | ||
else : | ||
passTest = passTest * False | ||
print("%s %.8f %.8f %.2e" % ( value, refValues[value][0], testValues[value], diffValue)) | ||
|
||
if passTest : | ||
print(testName + str_green(" ... OK")) | ||
else: | ||
print(testName + str_red(" ... NOT OK")) | ||
sys.exit(1) | ||
|
||
output.close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
SYSTEM_DESCRIPTION='glicina con postiron' | ||
|
||
GEOMETRY | ||
e-(N) 6-311G 0.92914 0.65159 0.25796 | ||
e-(C) 6-311G 0.08973 -0.44202 0.82116 | ||
e-(C) 6-311G 0.09416 -0.39610 2.35537 | ||
e-(O) 6-311G 0.79215 0.47431 2.87347 | ||
e-(O) 6-311G -0.60778 -1.24843 2.89495 | ||
e-(H) 6-311G 1.89448 0.53627 0.52036 | ||
e-(H) 6-311G 0.48806 -1.38246 0.47040 | ||
e-(H) 6-311G -0.91478 -0.32058 0.44545 | ||
e+ PSX-TZ -0.60778 -1.24843 2.89495 | ||
N dirac 0.92914 0.65159 0.25796 | ||
C dirac 0.08973 -0.44202 0.82116 | ||
C dirac 0.09416 -0.39610 2.35537 | ||
O dirac 0.79215 0.47431 2.87347 | ||
O dirac -0.60778 -1.24843 2.89495 | ||
H dirac 1.89448 0.53627 0.52036 | ||
H dirac 0.48806 -1.38246 0.47040 | ||
H dirac -0.91478 -0.32058 0.44545 | ||
END GEOMETRY | ||
|
||
TASKS | ||
method = "RHF" | ||
END TASKS | ||
|
||
CONTROL | ||
readCoefficients=F | ||
localizeOrbitals=.T. | ||
erkaleLocalizationMethod="MU" | ||
END CONTROL | ||
|
||
OUTPUTS | ||
moldenFile | ||
END OUTPUTS | ||
|
||
|
||
|
||
|
Oops, something went wrong.