Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Sep 26, 2024
1 parent 3b58267 commit 262ef80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ensemble_md/tests/test_coordinate_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,9 @@ def test_dummy_real_swap():
test_file = open('test_dummy_real_swap.gro', 'w')
df = pd.read_csv(f'{input_path}/coord_swap/df_atom_swap.csv')
orig_coords = np.zeros((22, 3))
orig_coords[18] = [2.5837841, 1.4738766, 2.5511920]
line_num = df['File line'].to_list()[0]
c = line_num - 2
orig_coords[c] = [2.5837841, 1.4738766, 2.5511920]

coordinate_swap.dummy_real_swap(test_file, 1, 'E2F', df[df['Name'] == 'DC8'], ['0.000', '0.000', '0.000\n'], 8, orig_coords) # noqa: E501
test_file.close()
Expand Down
3 changes: 2 additions & 1 deletion ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ def test_histogram_correction(self, params_dict):

def test_default_coords_fn(self, params_dict):
REXEE = get_REXEE_instance(params_dict)
REXEE.default_coords_fn(f'{input_path}/coords_swap/test_input_A.gro', f'{input_path}/coords_swap/test_input_B.gro') # noqa: E501
REXEE.default_coords_fn(f'{input_path}/coord_swap/test_input_A.gro', f'{input_path}/coord_swap/test_input_B.gro') # noqa: E501

true_output_A = open(f'{input_path}/coord_swap/output_A.gro', 'r').readlines()
test_output_A = open(f'{input_path}/coord_swap/test_input_B.gro', 'r').readlines()
Expand All @@ -892,6 +892,7 @@ def test_process_top(self, params_dict):

REXEE = get_REXEE_instance(params_dict)
REXEE.resname_list = ['A2B', 'B2C', 'C2D', 'D2E', 'E2F']
REXEE.swap_rep_pattern = [[[0, 1], [1, 0]], [[1, 1], [2, 0]], [[2, 1], [3, 0]], [[3, 1], [4, 0]]]
REXEE.top = [f'{input_path}/coord_swap/A-B.top',
f'{input_path}/coord_swap/B-C.top',
f'{input_path}/coord_swap/C-D.top',
Expand Down

0 comments on commit 262ef80

Please sign in to comment.