Created
October 14, 2011 12:42
-
-
Save danmichaelo/1286997 to your computer and use it in GitHub Desktop.
oppvasp example: make position,energy table from set of vasprun-files
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
| 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