diff --git a/wien2kparser/parser_wien2k.py b/wien2kparser/parser_wien2k.py index caf2ae8baebc8d1095f2ea77dabbc6e1b135be19..85634c12220ac4e83e9d8a3d336f6a4924c9d71c 100644 --- a/wien2kparser/parser_wien2k.py +++ b/wien2kparser/parser_wien2k.py @@ -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 = self.parser.fIn.fIn.name eigvalKpoint=[] @@ -281,6 +286,10 @@ class Wien2kContext(object): self.spinPol = False else: self.spinPol = True + + eTot = section["energy_total_scf_iteration"] + if eTot is not None: + self.eTot = eTot[0] # description of the input mainFileDescription = SM(