Skip to content

Commit

Permalink
Fix linting error
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Oct 10, 2024
1 parent cf8b95f commit 296c181
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 1 addition & 4 deletions ensemble_md/utils/coordinate_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions ensemble_md/utils/gmx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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

0 comments on commit 296c181

Please sign in to comment.