Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nwc: tce general cases fix #98

Merged
merged 3 commits into from Jun 30, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
23 changes: 12 additions & 11 deletions qcengine/programs/nwchem/harvester.py
Expand Up @@ -217,18 +217,19 @@ def harvest_outfile_pass(outtext):
psivar[f'{cc_corr} CORRECTION ENERGY'] = mobj.group(1)
psivar[f'{cc_plain} CORRELATION ENERGY'] = mobj.group(2)
psivar[f'{cc_plain} TOTAL ENERGY'] = mobj.group(3)
#Other TCE
#mobj = re.findall(
# r'^\s+' + r'Iterations converged' + r'\s*' +
# r'^\s+' + r'(.*?)' + r' correlation energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*'
# r'^\s+' + r'(.*?)' + r' total energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*$',
# outtext, re.MULTILINE | re. DOTALL)
#Process other TCE cases
for cc_name in [r'CISD', r'CISDT', r'CISDTQ', r'CCD', r'CCSD', r'CCSDT', r'CCSDTQ', r'LCCSD', r'LCCD']:
mobj = re.search(
r'^\s+' + r'Iterations converged' + r'\s*' +
r'^\s+' + cc_name + r'\s+' + r'correlation energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*'+
r'^\s+' + cc_name + r'\s+' + r'total energy / hartree' + r'\s+=\s*' + NUMBER + r'\s*$',
outtext, re.MULTILINE)

#for mobj_list in mobj:
# print('matched %s' % mobj_list[0])
# print(mobj_list)
# psivar['%s CORRELATION ENERGY' % mobj_list[0]] = mobj_list[1]
# psivar['%s TOTAL ENERGY' % mobj_list[2]] = mobj_list[3]
if mobj:
print(f'matched {cc_name}')
print(mobj)
psivar[f'{cc_name} CORRELATION ENERGY'] = mobj.group(1)
psivar[f'{cc_name} TOTAL ENERGY'] = mobj.group(2)

#Process CCSD/CCSD(T) using nwchem CCSD/CCSD(T) [dertype] command
mobj = re.search(
Expand Down