venuspython 1.1.2__tar.gz → 1.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {venuspython-1.1.2 → venuspython-1.1.3}/PKG-INFO +1 -1
- venuspython-1.1.3/venuspy/__init__.py +1 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/psi4calc.py +24 -1
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/qcengineGAMESScalc.py +55 -9
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspython.egg-info/PKG-INFO +1 -1
- venuspython-1.1.2/venuspy/__init__.py +0 -1
- {venuspython-1.1.2 → venuspython-1.1.3}/README.md +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/pyproject.toml +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/setup.cfg +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/bagelcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/chempotpycalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/minisgdmlcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/mopaccalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/nwchemcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/nwchemexcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/original_nwchemexcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/physnetcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/calc/xtbcalc.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/cli.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/initialSampling.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspy/md.py +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspython.egg-info/SOURCES.txt +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspython.egg-info/dependency_links.txt +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspython.egg-info/entry_points.txt +0 -0
- {venuspython-1.1.2 → venuspython-1.1.3}/venuspython.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.1.3"
|
|
@@ -63,8 +63,10 @@ class psi4calculator(Calculator):
|
|
|
63
63
|
self.charge = 0
|
|
64
64
|
self.multiplicity = 2 # 2s+1
|
|
65
65
|
|
|
66
|
+
self.print = 1
|
|
66
67
|
self.memory = 1500 # In MB
|
|
67
68
|
self.scratchdir = "/tmp"
|
|
69
|
+
self.init_wfn = None
|
|
68
70
|
|
|
69
71
|
# Read in the psi4 input
|
|
70
72
|
with open(input_path, 'r') as f:
|
|
@@ -88,10 +90,15 @@ class psi4calculator(Calculator):
|
|
|
88
90
|
if (entries[0] == "maxiter"): self.maxiter = int(entries[1])
|
|
89
91
|
if (entries[0] == "d_convergence"): self.d_convergence = float(entries[1])
|
|
90
92
|
if (entries[0] == "e_convergence"): self.e_convergence = float(entries[1])
|
|
93
|
+
if (entries[0] == "init_wfn"): self.init_wfn = str(entries[1])
|
|
94
|
+
if (entries[0] == "soscf"): self.soscf = int(entries[1])
|
|
95
|
+
|
|
96
|
+
if (entries[0] == "print"): self.print = int(entries[1])
|
|
91
97
|
|
|
92
98
|
# Set up the options for the psi4 calculation
|
|
93
99
|
# Check keywords in the documentation: https://psicode.org/psi4manual/master/autodoc_glossary_options_c.html
|
|
94
100
|
psi4.set_memory(str(self.memory)+' MB')
|
|
101
|
+
psi4.set_options({'PRINT': self.print}) # 0 = minimal, 1 = normal, 2 = verbose, 3+ = very detailed
|
|
95
102
|
psi4.set_options({'maxiter': self.maxiter})
|
|
96
103
|
psi4.set_options({'d_convergence': self.d_convergence})
|
|
97
104
|
psi4.set_options({'e_convergence': self.e_convergence})
|
|
@@ -153,6 +160,16 @@ class psi4calculator(Calculator):
|
|
|
153
160
|
#print(geometry_string)
|
|
154
161
|
psi4.geometry(geometry_string)
|
|
155
162
|
|
|
163
|
+
# This is for initial guesses (only done ONCE at the start)
|
|
164
|
+
if (not (self.init_wfn is None)):
|
|
165
|
+
try:
|
|
166
|
+
print("Reading in initial wavefunction: ({0})".format(self.init_wfn),flush=True)
|
|
167
|
+
e, self.ref_wfn = psi4.energy(self.psi4method,restart_file=self.init_wfn,write_orbitals=self.movecs,return_wfn=True)
|
|
168
|
+
print("Succeeded reading in initial wavefunction!",flush=True)
|
|
169
|
+
except:
|
|
170
|
+
print("Failed reading in initial wavefunction (check if file is correct / correctly copied...)!",flush=True)
|
|
171
|
+
self.init_wfn = None
|
|
172
|
+
|
|
156
173
|
# Try the SCF convergence a few times with different approaches:
|
|
157
174
|
# (1) Try using the reference wavefunction (from the previous step)
|
|
158
175
|
# (2) Try the default superposition of atomic densities (SAD)
|
|
@@ -203,6 +220,12 @@ class psi4calculator(Calculator):
|
|
|
203
220
|
self.oeprop.add("MULLIKEN_CHARGES")
|
|
204
221
|
self.oeprop.compute()
|
|
205
222
|
|
|
223
|
+
if (self.soscf==1):
|
|
224
|
+
psi4.set_options({'soscf': False})
|
|
225
|
+
#psi4.set_options({'soscf_max_iter': self.maxiter})
|
|
226
|
+
#psi4.set_options({'soscf_conv': self.d_convergence})
|
|
227
|
+
#psi4.set_options({'soscf_start_convergence': 1.0e-6})
|
|
228
|
+
|
|
206
229
|
# Convert model units to ASE default units (eV and Ang)
|
|
207
230
|
e *= self.E_to_eV
|
|
208
231
|
f *= -self.F_to_eV_Ang
|
|
@@ -217,7 +240,7 @@ class psi4calculator(Calculator):
|
|
|
217
240
|
for i in range(Natoms):
|
|
218
241
|
anAtom = atoms[i]
|
|
219
242
|
print("{0:2s} {1:16.8f} {2:16.8f} {3:16.8f} {4:18.10f} {5:18.10f} {6:18.10f}".format(anAtom.symbol,*anAtom.position, *f[i]))
|
|
220
|
-
print("")
|
|
243
|
+
print("",flush=True)
|
|
221
244
|
|
|
222
245
|
self.results = {'energy': e, 'forces': f}
|
|
223
246
|
|
|
@@ -52,11 +52,13 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
52
52
|
self.referencemethod = 'uhf'
|
|
53
53
|
self.freeze_core = 0
|
|
54
54
|
self.df_ints_io = "None"
|
|
55
|
-
self.method = 'b3lyp'
|
|
56
|
-
self.
|
|
55
|
+
self.method = 'b3lyp' # LevelOfTheory
|
|
56
|
+
self.libxc_functional = None # LibXC Functional (if method="uselibxc")
|
|
57
|
+
self.basis_set = '6-31g*' # BasisSet
|
|
57
58
|
self.mulliken = 0
|
|
58
59
|
self.charge = 0
|
|
59
60
|
self.multiplicity = 2 # 2s+1
|
|
61
|
+
self.printlevel = 7 # default is 7
|
|
60
62
|
|
|
61
63
|
self.memory = 1500 # In MB
|
|
62
64
|
self.scratchdir = "/tmp"
|
|
@@ -71,11 +73,18 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
71
73
|
if (entries[0] == "referencemethod"): self.referencemethod = str(entries[1])
|
|
72
74
|
if (entries[0] == "freeze_core"): self.freeze_core = int(entries[1])
|
|
73
75
|
if (entries[0] == "df_ints_io"): self.df_ints_io = str(entries[1])
|
|
74
|
-
|
|
75
|
-
if (entries[0] == "
|
|
76
|
+
# if (entries[0] == "method"): self.method = str(entries[1])
|
|
77
|
+
if (entries[0] == "method"):
|
|
78
|
+
subentries = str(entries[1]).split("/")
|
|
79
|
+
self.method = str(subentries[0])
|
|
80
|
+
if (len(subentries) > 1):
|
|
81
|
+
self.basis_set = str(subentries[1])
|
|
82
|
+
# if (entries[0] == "basis_set"): self.basis_set = str(entries[1])
|
|
83
|
+
if (entries[0] == "libxc_functional"): self.libxc_functional = str(entries[1])
|
|
76
84
|
if (entries[0] == "mulliken"): self.mulliken = int(entries[1])
|
|
77
85
|
if (entries[0] == "charge"): self.charge = int(entries[1])
|
|
78
86
|
if (entries[0] == "multiplicity"): self.multiplicity = int(entries[1])
|
|
87
|
+
if (entries[0] == "print"): self.printlevel = str(entries[1])
|
|
79
88
|
|
|
80
89
|
# By default, we start off with no initial MO guess
|
|
81
90
|
self.ref_wfn = None
|
|
@@ -94,8 +103,34 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
94
103
|
"scf__diis" : ".true.",
|
|
95
104
|
"scf__ethrsh" : 1.0, # DIIS error to start DIIS (deafult = 0.5 hartree)
|
|
96
105
|
"scf__conv" : self.d_convergence,
|
|
106
|
+
"contrl__nprint" : self.printlevel,
|
|
97
107
|
}
|
|
98
108
|
|
|
109
|
+
# If LibXC is available, use it
|
|
110
|
+
if (self.method == "uselibxc"):
|
|
111
|
+
if (self.libxc_functional is None):
|
|
112
|
+
raise ValueError("If setting 'uselibxc', need to specify 'libxc_functional' in the input file! ... e.g,\n'libxc_functional b3lyp'")
|
|
113
|
+
self.keywords["libxc__functional"] = self.libxc_functional
|
|
114
|
+
|
|
115
|
+
# From the GAMESS documentation:
|
|
116
|
+
#NPUNCH = option for output to the PUNCH file
|
|
117
|
+
# = 0 do not punch out the final orbitals
|
|
118
|
+
# = 1 punch out the occupied orbitals
|
|
119
|
+
# = 2 punch out occupied and virtual orbitals
|
|
120
|
+
# The default is NPUNCH = 2.
|
|
121
|
+
#NPREO = energy and orbital printing options, applied
|
|
122
|
+
# after other output options, for example NPRINT=-5
|
|
123
|
+
# for no orbital output overrules NPREO. NPREO
|
|
124
|
+
# affects only printing, see NPUNCH just above.
|
|
125
|
+
# Default: 1,9999,2,1 (meaning print all orbitals,
|
|
126
|
+
# but no separate list of orbital energies).
|
|
127
|
+
# To print only HOMO and "LUMO" LCAO coefficients,
|
|
128
|
+
# and all orbital energies, enter:
|
|
129
|
+
# NPREO(1)=0,-1,1,9999
|
|
130
|
+
if True:
|
|
131
|
+
self.keywords["scf__npunch"] = "0"
|
|
132
|
+
self.keywords["scf__npreo(1)"] = "0,-1,1,9999"
|
|
133
|
+
|
|
99
134
|
self.MPIconfig = {
|
|
100
135
|
# "use_mpiexec" : True,
|
|
101
136
|
# "mpiexec_command": mpiexec_command,
|
|
@@ -134,7 +169,8 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
134
169
|
out += anAtom.symbol + " " + str(anAtom.position[0]) + " " + str(anAtom.position[1]) + " " + str(anAtom.position[2]) + "\n"
|
|
135
170
|
|
|
136
171
|
# Fixing CoM and orientation and turning off symmetry to prevent molecular translation
|
|
137
|
-
mol = qcel.models.Molecule.from_data(out, fix_com=True, fix_orientation=True, fix_symmetry="C1")
|
|
172
|
+
mol = qcel.models.v2.Molecule.from_data(out, fix_com=True, fix_orientation=True, fix_symmetry="C1") # The newest version uses "v2" models
|
|
173
|
+
# mol = qcel.models.Molecule.from_data(out, fix_com=True, fix_orientation=True, fix_symmetry="C1") # Doesn't seem to work?
|
|
138
174
|
# mol = qcel.models.Molecule.from_data(out, fix_com=True, fix_symmetry="C1")
|
|
139
175
|
|
|
140
176
|
# Try the SCF convergence a few times with different approaches:
|
|
@@ -165,14 +201,24 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
165
201
|
# print("SCF convergence (0) ... will now use a SAD guess")
|
|
166
202
|
# self.ref_wfn = None
|
|
167
203
|
|
|
168
|
-
|
|
204
|
+
# spec = qcel.models.v2.AtomicSpecification(driver=qcel.models.v2.DriverEnum.gradient,model=qcel.models.v2.Model(method=self.method,basis="sto",),keywords=self.keywords)
|
|
205
|
+
spec = qcel.models.v2.AtomicSpecification(driver=qcel.models.v2.DriverEnum.gradient,model=qcel.models.v2.Model(method=self.method,basis=self.basis_set),keywords=self.keywords)
|
|
206
|
+
inp = qcel.models.v2.AtomicInput(molecule=mol,specification=spec) # The newest version uses "v2" models
|
|
207
|
+
# inp = qcel.models.AtomicInput(molecule=mol, driver="gradient", model=self.model, keywords=self.keywords)
|
|
169
208
|
if (self.ref_wfn is not None):
|
|
170
209
|
inp.extras["VECguess"] = self.ref_wfn
|
|
171
210
|
inp.extras["VECnorb"] = self.Norb
|
|
172
211
|
|
|
173
212
|
f_results = qcng.compute(inp, 'gamess', task_config=self.MPIconfig)
|
|
174
|
-
|
|
175
|
-
|
|
213
|
+
|
|
214
|
+
if ("VEC" in f_results.extras) and ("VECnorb" in f_results.extras):
|
|
215
|
+
self.ref_wfn = f_results.extras["VEC"]
|
|
216
|
+
self.Norb = f_results.extras["VECnorb"]
|
|
217
|
+
|
|
218
|
+
try:
|
|
219
|
+
print(f_results.stdout)
|
|
220
|
+
except:
|
|
221
|
+
print(f_results.error.error_message)
|
|
176
222
|
|
|
177
223
|
e = float(f_results.extras["qcvars"]["CURRENT ENERGY"])
|
|
178
224
|
f = f_results.return_result
|
|
@@ -203,7 +249,7 @@ class qcengineGAMESScalculator(Calculator):
|
|
|
203
249
|
for i in range(Natoms):
|
|
204
250
|
anAtom = atoms[i]
|
|
205
251
|
print("{0:2s} {1:16.8f} {2:16.8f} {3:16.8f} {4:18.10f} {5:18.10f} {6:18.10f}".format(anAtom.symbol,*anAtom.position, *f[i]))
|
|
206
|
-
print("")
|
|
252
|
+
print("",flush=True)
|
|
207
253
|
|
|
208
254
|
self.results = {'energy': e, 'forces': f}
|
|
209
255
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.1.2"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|