Created
October 3, 2015 09:56
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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