Commit 34960c29 authored by Pardini, Lorenzo (lopa)'s avatar Pardini, Lorenzo (lopa)
Browse files

added eigvalOcc

parent f28469bb
Pipeline #6885 passed with stage
in 3 minutes and 31 seconds
......@@ -68,7 +68,7 @@ class ElkContext(object):
with open(eigvalFile) as g:
eigvalKpoint=[]
eigvalVal=[[],[]]
eigvalOcc=[]
eigvalOcc=[[],[]]
fromH = unit_conversion.convert_unit_function("hartree", "J")
while 1:
s = g.readline()
......@@ -81,6 +81,8 @@ class ElkContext(object):
elif len(s) > 50:
eigvalVal[0].append([])
eigvalVal[1].append([])
eigvalOcc[0].append([])
eigvalOcc[1].append([])
eigvalKpoint.append(list(map(float, s.split()[1:4])))
# print ("eigvalKpoint= ", eigvalKpoint)
else:
......@@ -91,9 +93,12 @@ class ElkContext(object):
n, e, occ = s.split()
eigvalVal[0][-1].append(int(n))
eigvalVal[1][-1].append(fromH(float(e)))
# print ("eigvalVal= ", eigvalVal)
eigvalOcc[0][-1].append(int(n))
eigvalOcc[1][-1].append(float(occ))
# print ("eigvalOcc= ", eigvalOcc)
backend.addArrayValues("eigenvalues_kpoints", np.asarray(eigvalKpoint))
backend.addArrayValues("eigenvalues_values", np.asarray(eigvalVal))
backend.addArrayValues("eigenvalues_occupation", np.asarray(eigvalOcc))
def onClose_section_system(self, backend, gIndex, section):
backend.addArrayValues('configuration_periodic_dimensions', np.asarray([True, True, True]))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment