Skip to content

Instantly share code, notes, and snippets.

@danmichaelo
Created October 14, 2011 12:42
Show Gist options
  • Select an option

  • Save danmichaelo/1286997 to your computer and use it in GitHub Desktop.

Select an option

Save danmichaelo/1286997 to your computer and use it in GitHub Desktop.
oppvasp example: make position,energy table from set of vasprun-files
import glob
from oppvasp.vasp.parsers import VasprunParser
print "File\t\tz\tE"
for f in glob.glob('vasprun_*.xml'):
vp = VasprunParser(f)
e = vp.get_total_energy()
s = vp.get_final_structure()
p_z = s.get_positions()[0,2]
print "%s\t%.3f\t%.4f" % (f,p_z,e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment