Kindfield
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Properties Friends Pages
hydrogenvariation.py
Go to the documentation of this file.
1 import h5py
2 import numpy
3 from numpy import dtype, zeros, linspace, pi, cos, sin, arctan, arctan2, sqrt, meshgrid, array
4 from pylab import imshow, plot, figure, subplot, title
5 from glob import glob
6 from scipy.interpolate import griddata
7 from collections import OrderedDict
8 
9 plots = []
10 
11 for statesFile in glob("/home/svenni/Dropbox/studies/master/code/hartree-fock/build-hartree-fock-Desktop_Qt_5_2_0_with_GDB-Release/tools/staterunner/results.h5.*"):
12  #f = h5py.File("/home/svenni/Dropbox/studies/master/code/hartree-fock/build-hartree-fock-Desktop_Qt_5_2_0_with_GDB-Release/tools/staterunner/results.h5.0000", "r")
13  f = h5py.File(statesFile, "r")
14  atomsMeta = f.attrs["atomMetaInformation"]
15  print statesFile
16  for stateName in f:
17  atoms = f.get(stateName)
18  r12 = atoms[1]["x"] - atoms[0]["x"]
19  plots.append([r12, atoms.attrs["energy"]])
20  f.close()
21 
22 plots = array(plots)
23 
24 fig = figure()
25 plot(plots[:,0], plots[:,1], 'o')
26 show()