Skip to content

Instantly share code, notes, and snippets.

@baoilleach
Created November 19, 2010 12:25
Show Gist options
  • Select an option

  • Save baoilleach/706453 to your computer and use it in GitHub Desktop.

Select an option

Save baoilleach/706453 to your computer and use it in GitHub Desktop.
Plot PES from Firefly
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