Commit 868d449a authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Changed test case, now number_of_scf_iterations is emitted in the correct place.

parent 4bdfe7ae
...@@ -247,10 +247,6 @@ class NWChemMainParser(MainHierarchicalParser): ...@@ -247,10 +247,6 @@ class NWChemMainParser(MainHierarchicalParser):
def onClose_x_nwchem_section_dft(self, backend, gIndex, section): def onClose_x_nwchem_section_dft(self, backend, gIndex, section):
backend.addValue("electronic_structure_method", "DFT") backend.addValue("electronic_structure_method", "DFT")
def onClose_x_nwchem_section_dft_scf(self, backend, gIndex, section):
backend.addValue("number_of_scf_iterations", self.n_scf_iterations)
self.n_scf_iterations = 0
def onClose_x_nwchem_section_geo_opt_task(self, backend, gIndex, section): def onClose_x_nwchem_section_geo_opt_task(self, backend, gIndex, section):
steps = section["x_nwchem_section_geo_opt_step"] steps = section["x_nwchem_section_geo_opt_step"]
if steps: if steps:
...@@ -358,6 +354,8 @@ class NWChemMainParser(MainHierarchicalParser): ...@@ -358,6 +354,8 @@ class NWChemMainParser(MainHierarchicalParser):
section.add_latest_value("x_nwchem_dft_total_charge", "total_charge") section.add_latest_value("x_nwchem_dft_total_charge", "total_charge")
section.add_latest_value("x_nwchem_dft_max_iteration", "scf_max_iteration") section.add_latest_value("x_nwchem_dft_max_iteration", "scf_max_iteration")
section.add_latest_value("x_nwchem_dft_scf_threshold_energy_change", "scf_threshold_energy_change") section.add_latest_value("x_nwchem_dft_scf_threshold_energy_change", "scf_threshold_energy_change")
backend.addValue("number_of_scf_iterations", self.n_scf_iterations)
self.n_scf_iterations = 0
return wrapper return wrapper
def save_scf_data(self): def save_scf_data(self):
......
...@@ -15,4 +15,4 @@ dft ...@@ -15,4 +15,4 @@ dft
xc xtpss03 ctpss03 xc xtpss03 ctpss03
decomp decomp
end end
task dft energy task dft gradient
This diff is collapsed.
...@@ -1053,9 +1053,9 @@ class TestDFTGeoOpt(unittest.TestCase): ...@@ -1053,9 +1053,9 @@ class TestDFTGeoOpt(unittest.TestCase):
#=============================================================================== #===============================================================================
if __name__ == '__main__': if __name__ == '__main__':
suites = [] suites = []
suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTEnergy)) # suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTEnergy))
suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTForce)) suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTForce))
suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGeoOpt)) # suites.append(unittest.TestLoader().loadTestsFromTestCase(TestDFTGeoOpt))
# suites.append(unittest.TestLoader().loadTestsFromTestCase(TestGeoOpt)) # suites.append(unittest.TestLoader().loadTestsFromTestCase(TestGeoOpt))
# suites.append(unittest.TestLoader().loadTestsFromTestCase(TestInputParser)) # suites.append(unittest.TestLoader().loadTestsFromTestCase(TestInputParser))
......
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