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
......@@ -55,6 +55,7 @@ class Wien2kContext(object):
self.secSystemIndex = None
self.scfIterNr = 0
self.spinPol = None
self.eTot = None
def startedParsing(self, path, parser):
"""called when parsing starts"""
......@@ -128,12 +129,16 @@ class Wien2kContext(object):
def onClose_section_single_configuration_calculation(self, backend, gIndex, section):
# write number of SCF iterations
backend.addValue('number_of_scf_iterations', self.scfIterNr)
# write the references to section_method and section_system
backend.addValue('single_configuration_to_calculation_method_ref', self.secMethodIndex)
backend.addValue('single_configuration_calculation_to_system_ref', self.secSystemIndex)
if self.eTot is not None:
backend.addValue("energy_total", self.eTot)
mainFile =
......@@ -281,6 +286,10 @@ class Wien2kContext(object):
self.spinPol = False
self.spinPol = True
eTot = section["energy_total_scf_iteration"]
if eTot is not None:
self.eTot = eTot[0]
# description of the input
mainFileDescription = SM(
Supports Markdown
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