Skip to content

Commit

Permalink
Merge branch 'master' into orca
Browse files Browse the repository at this point in the history
* master:
  NWCHEM: parse dispersion_correction output from psivar/ fix bug
  Read Dispersion Energy from nwchem output file and add it to psivar
  Update harvester.py
  • Loading branch information
muammar committed Dec 18, 2019
2 parents 4a125bc + fcd6f3d commit 9dfc4e6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions 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 @@ -330,7 +338,7 @@ def harvest_outfile_pass(outtext):
# psivar name might need to be fixed
# each root excitation energy is extracted from the last iteration of right hand side
mobj = re.findall(
r'^\s+(?:Excited-state calculation \( )(.*)\s+(?:symmetry\))\s+(?:.*\n)*^\s+EOM-' + cc-name +
r'^\s+(?:Excited-state calculation \( )(.*)\s+(?:symmetry\))\s+(?:.*\n)*^\s+EOM-' + cc_name +
# (..) captures symmetry
r'right-hand side iterations\s+(?:.*\n)*(?:Excited state root)\s+' + NUMBER + #root
r'\s*(?:Excitation energy / hartree)\s+.\s+' + NUMBER + #excitation energy hartree
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 9dfc4e6

Please sign in to comment.