Skip to content
Snippets Groups Projects
Commit d7687757 authored by Pavel Ondračka's avatar Pavel Ondračka Committed by Markus Scheidgen
Browse files

Save the last energy_total_scf_iteration as energy_total

parent 8c2209c8
Branches
Tags
No related merge requests found
...@@ -55,6 +55,7 @@ class Wien2kContext(object): ...@@ -55,6 +55,7 @@ class Wien2kContext(object):
self.secSystemIndex = None self.secSystemIndex = None
self.scfIterNr = 0 self.scfIterNr = 0
self.spinPol = None self.spinPol = None
self.eTot = None
def startedParsing(self, path, parser): def startedParsing(self, path, parser):
"""called when parsing starts""" """called when parsing starts"""
...@@ -128,12 +129,16 @@ class Wien2kContext(object): ...@@ -128,12 +129,16 @@ class Wien2kContext(object):
def onClose_section_single_configuration_calculation(self, backend, gIndex, section): def onClose_section_single_configuration_calculation(self, backend, gIndex, section):
# write number of SCF iterations # write number of SCF iterations
backend.addValue('number_of_scf_iterations', self.scfIterNr) backend.addValue('number_of_scf_iterations', self.scfIterNr)
# write the references to section_method and section_system # write the references to section_method and section_system
backend.addValue('single_configuration_to_calculation_method_ref', self.secMethodIndex) backend.addValue('single_configuration_to_calculation_method_ref', self.secMethodIndex)
backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex) backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex)
if self.eTot is not None:
backend.addValue("energy_total", self.eTot)
mainFile = self.parser.fIn.fIn.name mainFile = self.parser.fIn.fIn.name
eigvalKpoint=[] eigvalKpoint=[]
...@@ -282,6 +287,10 @@ class Wien2kContext(object): ...@@ -282,6 +287,10 @@ class Wien2kContext(object):
else: else:
self.spinPol = True self.spinPol = True
eTot = section["energy_total_scf_iteration"]
if eTot is not None:
self.eTot = eTot[0]
# description of the input # description of the input
mainFileDescription = SM( mainFileDescription = SM(
name = 'root', name = 'root',
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment