From 2d2cc7dfc6547350cf9d1658cbfa7748938b1c90 Mon Sep 17 00:00:00 2001 From: jrudz Date: Tue, 7 Nov 2023 08:43:34 +0100 Subject: [PATCH] removed some commented out older code --- atomisticparsers/gromacs/parser.py | 15 +-------------- atomisticparsers/lammps/parser.py | 11 +---------- 2 files changed, 2 insertions(+), 24 deletions(-) diff --git a/atomisticparsers/gromacs/parser.py b/atomisticparsers/gromacs/parser.py index 10e3e27a..e95a3a90 100644 --- a/atomisticparsers/gromacs/parser.py +++ b/atomisticparsers/gromacs/parser.py @@ -839,15 +839,11 @@ def parse_method(self): self.logger.error('Error parsing interactions.') interactions = self.traj_parser.get_interactions() -<<<<<<< HEAD -<<<<<<< HEAD self.parse_interactions(interactions, sec_model) -======= -======= + # TODO The section below is duplicated in the lammps and gromacs parsers. We should really move them # to the MDAnalysis parser, but you must be careful because there are other contributions to interactions # from other (sub)parsers ->>>>>>> aaf4eaa (reorganized interactions in lammps parse_method into groups, created bond list in system 0 atoms section, and moved the bond list creation to atomutils) interaction_key_list = Interaction.__dict__.keys() interaction_dict = {} interaction_keys_remove = ['__module__', '__doc__', 'm_def'] @@ -885,15 +881,6 @@ def parse_method(self): if not sec_interaction.get('n_atoms'): sec_interaction.n_atoms = len(sec_interaction.get('atom_indices')[0]) if sec_interaction.get('atom_indices') is not None else None - # OLD VERSION WITHOUT GROUPINGS - # for interaction in interactions: - # sec_interaction = sec_model.m_create(Interaction) - # for key, val in interaction.items(): - # print(key) - # print(val) - # setattr(sec_interaction, key, val) ->>>>>>> 0d6bf49 (adjusted gromacs tests for interaction groupings) - input_parameters = self.log_parser.get('input_parameters', {}) sec_force_calculations = sec_force_field.m_create(ForceCalculations) sec_neighbor_searching = sec_force_calculations.m_create(NeighborSearching) diff --git a/atomisticparsers/lammps/parser.py b/atomisticparsers/lammps/parser.py index a5e126ad..e05acaf4 100644 --- a/atomisticparsers/lammps/parser.py +++ b/atomisticparsers/lammps/parser.py @@ -1101,9 +1101,8 @@ def parse_method(self): # TODO address case types are numbered instead of giving atom labels (fix tests accordingly) interactions = self._mdanalysistraj_parser.get_interactions() -<<<<<<< HEAD self.parse_interactions(interactions, sec_model) -======= + # TODO The section below is duplicated in the lammps and gromacs parsers. We should really move them # to the MDAnalysis parser, but you must be careful because there are other contributions to interactions # from other (sub)parsers @@ -1144,14 +1143,6 @@ def parse_method(self): if not sec_interaction.get('n_atoms'): sec_interaction.n_atoms = len(sec_interaction.get('atom_indices')[0]) if sec_interaction.get('atom_indices') is not None else None - # OLD VERSION WITHOUT GROUPINGS - # interactions = interactions if interactions is not None else [] - # for interaction in interactions: - # sec_interaction = sec_model.m_create(Interaction) - # for key, val in interaction.items(): - # setattr(sec_interaction, key, val) ->>>>>>> aa724bd (corrected new metadata names in Interactions) - # Force Calculation Parameters sec_force_calculations = sec_force_field.m_create(ForceCalculations) for pairstyle in self.log_parser.get('pair_style', []):