Skip to content

Commit b6520ea

Browse files
authored
Merge pull request #244 from loriab/stdsuite2
standard suite expansions
2 parents 4c09a23 + da084bb commit b6520ea

File tree

8 files changed

+732
-135
lines changed

8 files changed

+732
-135
lines changed

qcengine/programs/cfour/harvester.py

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -487,6 +487,8 @@ def harvest_outfile_pass(outtext):
487487
print("matched ccsd(t) ncc v2")
488488
psivar["(T) CORRECTION ENERGY"] = mobj.group("tcorr")
489489
psivar["[T] CORRECTION ENERGY"] = mobj.group("bkttcorr")
490+
psivar["CCSD(T) TOTAL ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD TOTAL ENERGY"]
491+
psivar["CCSD(T) CORRELATION ENERGY"] = psivar["(T) CORRECTION ENERGY"] + psivar["CCSD CORRELATION ENERGY"]
490492

491493
# Process DBOC
492494
mobj = re.search(
@@ -516,9 +518,16 @@ def harvest_outfile_pass(outtext):
516518
)
517519
if mobj: # PRINT=2 to get SCS-CC components
518520
print("matched scscc")
519-
psivar["%s SAME-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = Decimal(mobj.group(3)) + Decimal(
520-
mobj.group(4)
521-
)
521+
if float(mobj.group(4)) == 0.0:
522+
ss = 2 * Decimal(mobj.group(3))
523+
else:
524+
ss = Decimal(mobj.group(3)) + Decimal(mobj.group(4))
525+
526+
if not (
527+
re.search(r"executable xvcc finished", outtext)
528+
and re.search(r"The reference state is a ROHF wave function.", outtext)
529+
):
530+
psivar["%s SAME-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = ss
522531
psivar["%s OPPOSITE-SPIN CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(5)
523532
psivar["%s CORRELATION ENERGY" % (mobj.group("iterCC"))] = mobj.group(6)
524533

@@ -848,10 +857,11 @@ def harvest(p4Mol, c4out, **largs):
848857
retMol = None if p4Mol else grdMol
849858

850859
if oriDip is not None:
860+
outPsivar["CURRENT DIPOLE"] = oriDip
851861
oriDip *= qcel.constants.dipmom_au2debye
852-
outPsivar["CURRENT DIPOLE X"] = oriDip[0]
853-
outPsivar["CURRENT DIPOLE Y"] = oriDip[1]
854-
outPsivar["CURRENT DIPOLE Z"] = oriDip[2]
862+
# outPsivar["CURRENT DIPOLE X"] = oriDip[0]
863+
# outPsivar["CURRENT DIPOLE Y"] = oriDip[1]
864+
# outPsivar["CURRENT DIPOLE Z"] = oriDip[2]
855865
# outPsivar['CURRENT DIPOLE X'] = str(oriDip[0] * psi_dipmom_au2debye)
856866
# outPsivar['CURRENT DIPOLE Y'] = str(oriDip[1] * psi_dipmom_au2debye)
857867
# outPsivar['CURRENT DIPOLE Z'] = str(oriDip[2] * psi_dipmom_au2debye)

qcengine/programs/cfour/runner.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,10 @@ def parse_output(
136136

137137
if c4grad is not None:
138138
qcvars["CURRENT GRADIENT"] = c4grad
139+
qcvars[f"{input_model.model.method.upper()[3:]} TOTAL GRADIENT"] = c4grad
139140

140141
if c4hess is not None:
142+
qcvars[f"{input_model.model.method.upper()[3:]} TOTAL HESSIAN"] = c4hess
141143
qcvars["CURRENT HESSIAN"] = c4hess
142144

143145
if input_model.driver.upper() == "PROPERTIES":

qcengine/programs/nwchem/runner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,7 @@ def parse_output(
231231
qcvars, nwhess, nwgrad, nwmol, version, errorTMP = harvest(input_model.molecule, stdout, **outfiles)
232232

233233
if nwgrad is not None:
234+
qcvars[f"{input_model.model.method.upper()[4:]} TOTAL GRADIENT"] = nwgrad
234235
qcvars["CURRENT GRADIENT"] = nwgrad
235236
if nwhess is not None:
236237
qcvars["CURRENT HESSIAN"] = nwhess

qcengine/programs/psi4.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,8 +199,10 @@ def compute(self, input_model: "AtomicInput", config: "TaskConfig") -> "AtomicRe
199199
output_data = psi4.schema_wrapper.run_qcschema(input_model).dict()
200200
else:
201201
output_data = psi4.schema_wrapper.run_qcschema(input_model, postclean=False).dict()
202-
output_data["extras"]["psiapi_evaluated"] = True
202+
# success here means execution returned. output_data may yet be qcel.models.AtomicResult or qcel.models.FailedOperation
203203
success = True
204+
if output_data["success"]:
205+
output_data["extras"]["psiapi_evaluated"] = True
204206
psi4.core.IOManager.shared_object().set_default_path(orig_scr)
205207
else:
206208
run_cmd = [

0 commit comments

Comments
 (0)