Commit 91758775 authored by Lauri Himanen's avatar Lauri Himanen
Browse files

Corrected the reopening of section_system_description.

parent c5ba3b5b
...@@ -20,7 +20,7 @@ class CP2KOutputParser(FileParser): ...@@ -20,7 +20,7 @@ class CP2KOutputParser(FileParser):
# Define the output parsing tree for this version # Define the output parsing tree for this version
self.root_matcher = SM( self.root_matcher = SM(
startReStr="", startReStr="",
sections=['section_run'], sections=['section_run', "section_system_description"],
subMatchers=[ subMatchers=[
SM( SM(
sections=['cp2k_section_dbcsr'], sections=['cp2k_section_dbcsr'],
...@@ -52,7 +52,7 @@ class CP2KOutputParser(FileParser): ...@@ -52,7 +52,7 @@ class CP2KOutputParser(FileParser):
SM( SM(
startReStr=" CELL\|", startReStr=" CELL\|",
adHoc=self.adHoc_cp2k_section_cell(), adHoc=self.adHoc_cp2k_section_cell(),
otherMetaInfo=["section_system_description", "simulation_cell"] otherMetaInfo=["simulation_cell"]
), ),
SM( SM(
sections=["section_method"], sections=["section_method"],
...@@ -74,7 +74,6 @@ class CP2KOutputParser(FileParser): ...@@ -74,7 +74,6 @@ class CP2KOutputParser(FileParser):
startReStr=" TOTAL NUMBERS AND MAXIMUM NUMBERS", startReStr=" TOTAL NUMBERS AND MAXIMUM NUMBERS",
subMatchers=[ subMatchers=[
SM( SM(
sections=["section_system_description"],
startReStr="\s+- Atoms:\s+(?P<number_of_atoms>\d+)", startReStr="\s+- Atoms:\s+(?P<number_of_atoms>\d+)",
), ),
SM( SM(
...@@ -83,7 +82,6 @@ class CP2KOutputParser(FileParser): ...@@ -83,7 +82,6 @@ class CP2KOutputParser(FileParser):
] ]
), ),
SM( SM(
sections=["section_system_description"],
startReStr=" MODULE QUICKSTEP: ATOMIC COORDINATES IN angstrom", startReStr=" MODULE QUICKSTEP: ATOMIC COORDINATES IN angstrom",
adHoc=self.adHoc_cp2k_section_quickstep_atom_information(), adHoc=self.adHoc_cp2k_section_quickstep_atom_information(),
otherMetaInfo=["atom_label", "atom_position"] otherMetaInfo=["atom_label", "atom_position"]
...@@ -276,9 +274,7 @@ class CP2KOutputParser(FileParser): ...@@ -276,9 +274,7 @@ class CP2KOutputParser(FileParser):
cell[2, :] = [float(x) for x in c_result.groups()] cell[2, :] = [float(x) for x in c_result.groups()]
# Push the results to the correct section # Push the results to the correct section
gIndex = parser.backend.openSection("section_system_description")
parser.backend.addArrayValues("simulation_cell", cell, unit="angstrom") parser.backend.addArrayValues("simulation_cell", cell, unit="angstrom")
parser.backend.closeSection("section_system_description", gIndex)
return wrapper return wrapper
......
Markdown is supported
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