Skip to content

Commit

Permalink
Merge pull request #203 from ahurta92/empdisp
Browse files Browse the repository at this point in the history
NWChem: Read Dispersion
  • Loading branch information
dgasmith committed Dec 17, 2019
2 parents 95a6759 + 51f0cdc commit fcd6f3d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion qcengine/programs/nwchem/harvester.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,15 @@ def harvest_outfile_pass(outtext):
# logger.debug (mobj.group(1))
psivar['NUCLEAR REPULSION ENERGY'] = mobj.group(1)

# Process DFT dispersion energy (a.u.)
mobj = re.search(r'^\s+' + r'(?:Dispersion correction)' + r'\s+=\s*' + NUMBER + r'\s*$', outtext, re.MULTILINE)
if mobj:
logger.debug('matched Dispersion')
logger.debug(mobj.group(1))
psivar['DFT DISPERSION ENERGY'] = mobj.group(1)

# Process DFT (RDFT, RODFT,UDFT, SODFT [SODFT for nwchem versions before nwchem 6.8])

mobj = re.search(r'^\s+' + r'(?:Total DFT energy)' + r'\s+=\s*' + NUMBER + r'\s*$', outtext, re.MULTILINE)
if mobj:
logger.debug('matched DFT')
Expand Down Expand Up @@ -691,7 +699,8 @@ def extract_formatted_properties(psivars: PreservingDict) -> AtomicResultPropert
# Get the SCF properties
output["scf_total_energy"] = psivars.get("HF TOTAL ENERGY", None)
output["scf_one_electron_energy"] = psivars.get("ONE-ELECTRON ENERGY", None)
output["scf_two_electron_energy"] = psivars.get("ONE-ELECTRON ENERGY", None)
output["scf_two_electron_energy"] = psivars.get("TWO-ELECTRON ENERGY", None)
output["scf_dispersion_correction_energy"] = psivars.get("DFT DISPERSION ENERGY", None)

# Get the MP2 properties
output["mp2_total_correlation_energy"] = psivars.get("MP2 CORRELATION ENERGY", None)
Expand Down

0 comments on commit fcd6f3d

Please sign in to comment.