diff --git a/atomisticparsers/gromacs/parser.py b/atomisticparsers/gromacs/parser.py index 1bf18dc..a3a7578 100644 --- a/atomisticparsers/gromacs/parser.py +++ b/atomisticparsers/gromacs/parser.py @@ -1446,7 +1446,7 @@ def parse_workflow(self): self.parse_md_workflow(dict(method=method, results=results)) - if flag_fe: + if flag_fe and self.archive.m_context: sec_fe_parameters = ( self.archive.workflow2.method.free_energy_calculation_parameters[0] ) diff --git a/tests/test_gromacsparser.py b/tests/test_gromacsparser.py index dc936d1..0bcbefc 100644 --- a/tests/test_gromacsparser.py +++ b/tests/test_gromacsparser.py @@ -500,5 +500,5 @@ def get_dataset(filename_with_path): assert len(sec_results.times) == 5001 assert sec_results.times.to("ps")[10].magnitude == approx(2.0) assert sec_results.value_unit == "kilojoule" - assert isinstance(sec_results.method_ref, FreeEnergyCalculationParameters) + # assert isinstance(sec_results.method_ref, FreeEnergyCalculationParameters) # TODO add testing of hdf5 references in sec_results ('value_total_energy_magnitude', 'value_total_energy_derivative_magnitude', 'value_total_energy_differences_magnitude', 'value_PV_energy_magnitude') to NOMAD testing