diff --git a/atomisticparsers/gromacs/parser.py b/atomisticparsers/gromacs/parser.py index 7ea851e..56faf07 100644 --- a/atomisticparsers/gromacs/parser.py +++ b/atomisticparsers/gromacs/parser.py @@ -1446,16 +1446,17 @@ def parse_workflow(self): self.parse_md_workflow(dict(method=method, results=results)) - if flag_fe and self.archive.m_context: + if flag_fe: sec_fe_parameters = ( self.archive.workflow2.method.free_energy_calculation_parameters[0] ) sec_fe = self.archive.workflow2.results.free_energy_calculations[0] sec_fe.method_ref = sec_fe_parameters - sec_fe.value_total_energy_magnitude = columns[:, 0] - sec_fe.value_total_energy_derivative_magnitude = columns[:, 1] - sec_fe.value_total_energy_differences_magnitude = columns[:, 2:-1] - sec_fe.value_PV_energy_magnitude = columns[:, -1] + if self.archive.m_context: + sec_fe.value_total_energy_magnitude = columns[:, 0] + sec_fe.value_total_energy_derivative_magnitude = columns[:, 1] + sec_fe.value_total_energy_differences_magnitude = columns[:, 2:-1] + sec_fe.value_PV_energy_magnitude = columns[:, -1] def parse_input(self): sec_run = self.archive.run[-1]