Created
November 19, 2010 12:25
-
-
Save baoilleach/706453 to your computer and use it in GitHub Desktop.
Plot PES from Firefly
This file contains hidden or 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
| from pylab import * | |
| inputfile = open("tmp3.txt", "r") | |
| for line in inputfile: | |
| if line.startswith(" ENERGY DELTA MAP(S) (W.R. TO THE LOWEST FOUND)"): | |
| break | |
| blank = inputfile.next() | |
| dash = inputfile.next() | |
| header = inputfile.next() | |
| header = inputfile.next() | |
| dash = inputfile.next() | |
| data = [] | |
| for line in inputfile: | |
| if line.strip() == "": | |
| break | |
| broken = line.strip().split("|") | |
| energy = float(broken[1]) | |
| angle = float(broken[0].split("(")[1][:-1]) | |
| data.append( (angle, energy) ) | |
| plot( [x[0] for x in data], [x[1] for x in data] ) | |
| show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment