Skip to content
Snippets Groups Projects
Commit 9d28c018 authored by Himanen, Lauri (himanel1)'s avatar Himanen, Lauri (himanel1)
Browse files

Fixed changes coming from renamed metainfos.

parent 6169bc3a
No related branches found
No related tags found
No related merge requests found
......@@ -78,7 +78,7 @@ class CommonMatcher(object):
otherMetaInfo=["XC_functional", "self_interaction_correction_method"],
forwardMatch=True,
subMatchers=[
SM( " DFT\| Multiplicity\s+(?P<target_multiplicity>{})".format(self.regex_i)),
SM( " DFT\| Multiplicity\s+(?P<spin_target_multiplicity>{})".format(self.regex_i)),
SM( " DFT\| Charge\s+(?P<total_charge>{})".format(self.regex_i)),
SM( " DFT\| Self-interaction correction \(SIC\)\s+(?P<self_interaction_correction_method>[^\n]+)"),
]
......
......@@ -136,7 +136,7 @@ class CP2KSinglePointParser(MainHierarchicalParser):
# Write the references to section_method and section_system
backend.addValue('single_configuration_to_calculation_method_ref', self.section_method_index)
backend.addValue('single_configuration_calculation_to_system_description_ref', self.section_system_index)
backend.addValue('single_configuration_calculation_to_system_ref', self.section_system_index)
#===========================================================================
# adHoc functions. Primarily these
......
......@@ -297,7 +297,7 @@ class TestEnergyForce(unittest.TestCase):
self.assertTrue(np.array_equal(atomic_forces, expected_result))
def test_atom_label(self):
atom_labels = self.results["atom_label"]
atom_labels = self.results["atom_labels"]
expected_labels = np.array(8*["Si"])
self.assertTrue(np.array_equal(atom_labels, expected_labels))
......@@ -315,7 +315,7 @@ class TestEnergyForce(unittest.TestCase):
self.assertEqual(n_atoms, 8)
def test_atom_position(self):
atom_position = self.results["atom_position"]
atom_position = self.results["atom_positions"]
expected_position = convert_unit(np.array([4.073023, 4.073023, 1.357674]), "angstrom")
self.assertTrue(np.array_equal(atom_position[-1, :], expected_position))
......@@ -345,7 +345,7 @@ class TestEnergyForce(unittest.TestCase):
self.assertEqual(coordinate_filename, expected_coordinate)
def test_target_multiplicity(self):
multiplicity = self.results["target_multiplicity"]
multiplicity = self.results["spin_target_multiplicity"]
self.assertEqual(multiplicity, 1)
def test_total_charge(self):
......@@ -357,7 +357,7 @@ class TestEnergyForce(unittest.TestCase):
self.assertTrue(result)
def test_scf_dft_number_of_iterations(self):
result = self.results["scf_dft_number_of_iterations"]
result = self.results["number_of_scf_iterations"]
self.assertEqual(result, 10)
def test_single_configuration_to_calculation_method_ref(self):
......@@ -365,7 +365,7 @@ class TestEnergyForce(unittest.TestCase):
self.assertEqual(result, 0)
def test_single_configuration_calculation_to_system_description_ref(self):
result = self.results["single_configuration_calculation_to_system_description_ref"]
result = self.results["single_configuration_calculation_to_system_ref"]
self.assertEqual(result, 0)
def test_stress_tensor(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment