Skip to content

Instantly share code, notes, and snippets.

@jhjensen2
Created October 3, 2015 09:56
Show Gist options
  • Save jhjensen2/b0d84fd3c7174659201d to your computer and use it in GitHub Desktop.
Save jhjensen2/b0d84fd3c7174659201d to your computer and use it in GitHub Desktop.
This program finds the last heat of formation in all GAMESS log files for semiempirical geometry optimizations
"""
type "python readv2.py *.log" to use
This program finds the last heat of formation in all GAMESS log files
for semiempirical geometry optimizations
"""
import sys
for filename in sys.argv[1:]:
for line in reversed(open(filename,'r').readlines()):
words = line.split() # split line into words
if len(words) < 1:
continue
if words[0] == 'HEAT':
heat = words[-2]
print filename, heat
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment