From 296c1815929592d3bd9da851608da5e98b5dc990 Mon Sep 17 00:00:00 2001 From: Anika Date: Thu, 10 Oct 2024 12:47:10 -0600 Subject: [PATCH] Fix linting error --- ensemble_md/utils/coordinate_swap.py | 5 +---- ensemble_md/utils/gmx_parser.py | 6 +++--- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/ensemble_md/utils/coordinate_swap.py b/ensemble_md/utils/coordinate_swap.py index 18c10a5..f96e505 100644 --- a/ensemble_md/utils/coordinate_swap.py +++ b/ensemble_md/utils/coordinate_swap.py @@ -708,9 +708,6 @@ def dummy_real_swap(mol_new, resnum, resname, df, vel, atom_num, orig_coords, na Since the atom may be added in a different order than it was in the previous file save the line number so that we skip it when we come to it. """ - # Get the name for the atom we are writting - name_orig = df['Name'].to_list()[0] - # These may be added out of order so lets make sure we have the right coordinates line_num = df['File line'].to_list()[0] c = line_num - 2 @@ -991,7 +988,7 @@ def write_new_file(df_atom_swap, swap, r_swap, line_start, orig_file, new_file, atom_num_B -= 1 atom_num_A += 1 continue - elif line[1] == atom_order[res_interest_atom]: # Just change atom or residue number as needed since atom is in the right order + elif line[1] == atom_order[res_interest_atom]: # Just change atom or residue number as needed since atom is in the right order # noqa: E501 write_line(new_file, orig_file[i], line, atom_num_B, vel, orig_coords[atom_num_A], resnum, new_res_name) # noqa: E501 res_interest_atom += 1 elif (f'{current_element}{current_num}' == atom_order[res_interest_atom]) or (f'{current_element}V{current_num}' == atom_order[res_interest_atom]) or (f'D{current_element}{current_num}' == atom_order[res_interest_atom]): # Since atom is not in missing it must be a D2R flip # noqa: E501 diff --git a/ensemble_md/utils/gmx_parser.py b/ensemble_md/utils/gmx_parser.py index 3b11bd4..4ee8eb3 100644 --- a/ensemble_md/utils/gmx_parser.py +++ b/ensemble_md/utils/gmx_parser.py @@ -415,7 +415,7 @@ def read_top(file_name, resname): def deter_atom_order(mol_file, resname): """ Determine the order of atoms in the residue we will modify to ensure the output GRO is formatted properly - + Parameters ---------- file_name : list of str @@ -427,7 +427,7 @@ def deter_atom_order(mol_file, resname): ------- atom_order : list of str List of the atom names in the order they appear in the GRO file - + """ from ensemble_md.utils import coordinate_swap @@ -442,5 +442,5 @@ def deter_atom_order(mol_file, resname): atom_order.append(split_line[1]) elif len(atom_order) != 0: break - + return atom_order