Skip to content

Commit

Permalink
Fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Oct 9, 2024
1 parent 8b25cd6 commit 6546093
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion ensemble_md/tests/test_coordinate_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ def test_write_line():
new_coord = [5.4400544, 0.6561325, 8.3108530]
atom_num = 12264
coordinate_swap.write_line(test_file, line_merged, line, atom_num, vel, new_coord)

line_merged = ' 2.74964 2.74964 2.74964\n'
line = ['2.74964', '2.74964', '2.74964\n']
coordinate_swap.write_line(test_file, line_merged, line, atom_num, vel, new_coord)
Expand Down
1 change: 0 additions & 1 deletion ensemble_md/tests/test_gmx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ def test_read_top(self):
for resname, top_file in zip(resname_list, top_files):
top = gmx_parser.read_top(f'{input_path}/coord_swap/{top_file}', resname)
assert len(top) > 0

wrong_resname = ['B2C', 'C2D', 'D2E']
for resname, top_file in zip(wrong_resname, top_files):
with pytest.raises(Exception, match=f'Residue {resname} can not be found in {top_file}'):
Expand Down
13 changes: 6 additions & 7 deletions ensemble_md/tests/test_replica_exchange_EE.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,19 +391,18 @@ def test_set_params_mtrexee(self, params_dict):
os.remove('ensemble_md/tests/data/check_gro.py')

# 2-2. The case where we use the dafult function
params_dict['modify_coords'] = 'default'
params_dict['modify_coords'] = 'default'
# Without swap_rep_pattern defined
with pytest.raises(Exception, 'swap_rep_pattern option must be filled in if using default swapping function and not swap guide'): # noqa: E501
with pytest.raises(Exception, 'swap_rep_pattern option must be filled in if using default swapping function and not swap guide'): # noqa: E501
REXEE = get_REXEE_instance(params_dict)
#Without resname_list defined
# Without resname_list defined
params_dict['swap_rep_pattern'] = [[[0, 1], [1, 0]], [[[1, 1], [2, 0]]]]
with pytest.raises(Exception, 'resname_list option must be filled in if using default swapping function and not swap guide'): # noqa: E501
REXEE = get_REXEE_instance(params_dict)
#With everything defined
with pytest.raises(Exception, 'resname_list option must be filled in if using default swapping function and not swap guide'): # noqa: E501
REXEE = get_REXEE_instance(params_dict)
# With everything defined
params_dict['resname_list'] = ['A', 'B']
REXEE = get_REXEE_instance(params_dict)
assert REXEE.modify_coords_fn.__name__ == 'default_coords_fn'

@patch('ensemble_md.replica_exchange_EE.subprocess.run')
@patch('builtins.print')
def test_check_gmx_executable(self, mock_print, mock_run, params_dict):
Expand Down

0 comments on commit 6546093

Please sign in to comment.