Skip to content

Commit

Permalink
Fix linting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Sep 23, 2024
1 parent b2392d7 commit db64e8b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
3 changes: 1 addition & 2 deletions ensemble_md/tests/test_coordinate_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ def test_get_names():
[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, 0, 0, 0, 0],
[-1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, 1, 1, 0, 0, 0, 0, 0],
[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, -1, -1, 0, 0, 0, 0],
[-1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 0, 0, 0, 0]]

[-1, -1, -1, -1, -1, -1, -1, -1, 1, -1, -1, -1, 1, -1, -1, -1, -1, 1, 1, 1, 0, 0, 0, 0, 0]]
for i, top_file in enumerate(top_files):
top = open(f'{input_path}/coord_swap/{top_file}', 'r').readlines()
test_start_line, test_names, test_lambda_states = coordinate_swap.get_names(top)
Expand Down
17 changes: 7 additions & 10 deletions ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -881,8 +881,8 @@ def test_default_coords_fn(self, params_dict):
os.system(f'cp {input_path}/coords_swap/input_B.gro {input_path}/coords_swap/test_input_B.gro')
os.system(f'cp {input_path}/coords_swap/input_A.trr {input_path}/coords_swap/test_input_A.trr')
os.system(f'cp {input_path}/coords_swap/input_B.trr {input_path}/coords_swap/test_input_B.trr')
REXEE.default_coords_fn(f'{input_path}/coords_swap/test_input_A.gro', f'{input_path}/coords_swap/test_input_B.gro')

REXEE.default_coords_fn(f'{input_path}/coords_swap/test_input_A.gro', f'{input_path}/coords_swap/test_input_B.gro') # noqa: E501

true_output_A = open(f'{input_path}/coords_swap/output_A.gro', 'r').readlines()
test_output_A = open(f'{input_path}/coords_swap/test_input_B.gro', 'r').readlines()
Expand All @@ -892,16 +892,16 @@ def test_default_coords_fn(self, params_dict):
assert (true_output_A == test_output_A).all
assert (true_output_B == test_output_B).all

os.remove(f'{input_path}/coords_swap/test_input_A.gro')
os.remove(f'{input_path}/coords_swap/test_input_A.trr')
os.remove(f'{input_path}/coords_swap/test_input_B.gro')
os.remove(f'{input_path}/coords_swap/test_input_B.trr')
os.remove(f'{input_path}/coords_swap/test_input_A.gro')
os.remove(f'{input_path}/coords_swap/test_input_A.trr')
os.remove(f'{input_path}/coords_swap/test_input_B.gro')
os.remove(f'{input_path}/coords_swap/test_input_B.trr')

def test_process_top(self, params_dict):
import pandas as pd

REXEE = get_REXEE_instance(params_dict)

REXEE.resname_list = ['A2B', 'B2C', 'C2D', 'D2E', 'E2F']
REXEE.top = [f'{input_path}/coord_swap/A-B.top',
f'{input_path}/coord_swap/B-C.top',
Expand All @@ -918,6 +918,3 @@ def test_process_top(self, params_dict):

assert true_res_connect.equals(test_res_connect)
assert true_swap_map.equals(test_swap_map)



0 comments on commit db64e8b

Please sign in to comment.