From 45d4091d2c4743238b327d6fba667a91a31dde74 Mon Sep 17 00:00:00 2001 From: Alvin Noe Ladines Date: Fri, 19 Apr 2024 11:51:54 +0200 Subject: [PATCH] Fix test --- atomisticparsers/gromacs/parser.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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]