Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ajfriedman22 committed Oct 7, 2024
1 parent f17660a commit 01c4de3
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
22 changes: 11 additions & 11 deletions ensemble_md/tests/data/coord_swap/output_A.gro
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
Generic title in water
2058
1D2E S1 1 0.1339479 1.8278011 0.6258927 0.000 0.000 0.000
1D2E C2 2 -0.0213393 1.7727609 0.5732005 0.000 0.000 0.000
1D2E N3 3 -0.1243619 1.8597761 0.5829754 0.000 0.000 0.000
1D2E C4 4 -0.0707110 1.9702611 0.6416557 0.000 0.000 0.000
1D2E C2 2 -0.0213393 1.7727607 0.5732006 0.000 0.000 0.000
1D2E N3 3 -0.1243619 1.8597764 0.5829755 0.000 0.000 0.000
1D2E C4 4 -0.0707110 1.9702610 0.6416558 0.000 0.000 0.000
1D2E C5 5 0.0573240 1.9727987 0.6820824 0.000 0.000 0.000
1D2E C6 6 -0.0388140 1.6356310 0.5150866 0.000 0.000 0.000
1D2E C7 7 -0.0141624 1.6261302 0.3590609 0.000 0.000 0.000
1D2E C9 8 -0.1612757 1.5559384 0.5544972 0.000 0.000 0.000
1D2E C6 6 -0.0388140 1.6356310 0.5150865 0.000 0.000 0.000
1D2E C7 7 -0.0141624 1.6261305 0.3590609 0.000 0.000 0.000
1D2E C9 8 -0.1612757 1.5559386 0.5544971 0.000 0.000 0.000
1D2E H1 9 -0.1326069 2.0529239 0.6738843 0.000 0.000 0.000
1D2E H2 10 0.1170117 2.0469272 0.7333248 0.000 0.000 0.000
1D2E H3 11 0.0400140 1.5728326 0.5582033 0.000 0.000 0.000
1D2E H5 12 0.0926050 1.6340195 0.3355029 0.000 0.000 0.000
1D2E H5 12 0.0926053 1.6340195 0.3355032 0.000 0.000 0.000
1D2E H6 13 -0.0680608 1.7058519 0.3065637 0.000 0.000 0.000
1D2E H7 14 -0.0439457 1.5282604 0.3196781 0.000 0.000 0.000
1D2E H11 15 -0.2467560 1.5841367 0.4919311 0.000 0.000 0.000
1D2E H12 16 -0.1868085 1.5576105 0.6610891 0.000 0.000 0.000
1D2E H13 17 -0.1534718 1.4490972 0.5312461 0.000 0.000 0.000
1D2E H7 14 -0.0439457 1.5282606 0.3196782 0.000 0.000 0.000
1D2E H11 15 -0.2467560 1.5841368 0.4919311 0.000 0.000 0.000
1D2E H12 16 -0.1868085 1.5576104 0.6610891 0.000 0.000 0.000
1D2E H13 17 -0.1534718 1.4490970 0.5312461 0.000 0.000 0.000
1D2E DC8 18 0.1344823 1.6321553 0.3180815 0.000 0.000 0.000
1D2E HV8 19 0.1901803 1.7180337 0.3573140 0.000 0.000 0.000
1D2E HV9 20 0.1389927 1.6416948 0.2089706 0.000 0.000 0.000
Expand Down
10 changes: 5 additions & 5 deletions ensemble_md/tests/data/coord_swap/output_B.gro
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ Generic title in water
1E2F H11 18 2.3830650 1.4081266 2.9215064 0.000 0.000 0.000
1E2F H12 19 2.2304246 1.5001438 2.8552957 0.000 0.000 0.000
1E2F H13 20 2.3788140 1.5849049 2.8883517 0.000 0.000 0.000
1E2F DC10 21 2.6200285 1.4039259 2.7885396 0.000 0.000 0.000
1E2F HV4 22 2.3651702 1.4678032 2.8239074 0.000 0.000 0.000
1E2F HV14 23 2.6782739 1.4648881 2.8585944 0.000 0.000 0.000
1E2F HV15 24 2.6814170 1.3405809 2.7234597 0.000 0.000 0.000
1E2F HV16 25 2.5583091 1.3370135 2.8496134 0.000 0.000 0.000
1E2F DC10 21 2.6200280 1.4039266 2.7885406 0.000 0.000 0.000
1E2F HV4 22 2.3651702 1.4678035 2.8239071 0.000 0.000 0.000
1E2F HV14 23 2.6782684 1.4648889 2.8585997 0.000 0.000 0.000
1E2F HV15 24 2.6814215 1.3405863 2.7234614 0.000 0.000 0.000
1E2F HV16 25 2.5583088 1.3370098 2.8496099 0.000 0.000 0.000
2SOL OW 26 0.6877313 2.6227679 0.1159771 0.000 0.000 0.000
2SOL HW1 27 0.7808450 2.6230357 0.1381605 0.000 0.000 0.000
2SOL HW2 28 0.6779617 2.5502162 0.0543077 0.000 0.000 0.000
Expand Down
6 changes: 3 additions & 3 deletions ensemble_md/tests/test_coordinate_swap.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def test_R2D_D2R_miss():


def test_fix_break():
broken_mol = md.load(f'{input_path}/coord_swap/broken_mol.gro')
broken_mol = md.load(f'{input_path}/coord_swap/broken_mol_1D.gro')
df_connect = pd.read_csv(f'{input_path}/coord_swap/residue_connect.csv')
df_connect_res = df_connect[df_connect['Resname'] == 'C2D']
test_fix = coordinate_swap.fix_break(broken_mol, 'C2D', [2.74964, 2.74964, 2.74964], df_connect_res)
Expand All @@ -97,7 +97,7 @@ def test_fix_break():
def test_perform_shift():
broken_mol = md.load(f'{input_path}/coord_swap/broken_mol_1D.gro')

partial_fix, was_it_fixed, prev_shifted_atoms = coordinate_swap.perform_shift_1D(broken_mol, [2.74964, 2.74964, 2.74964], [[0, 4]], [], 1) # noqa: E501
partial_fix, was_it_fixed, prev_shifted_atoms = coordinate_swap.perform_shift(broken_mol, [2.74964, 2.74964, 2.74964], [[0, 4]], [], 1) # noqa: E501

broken_pairs = coordinate_swap.check_break(partial_fix, [[0, 4]])

Expand Down Expand Up @@ -127,7 +127,7 @@ def test_perform_shift():


def test_check_break():
broken_mol = md.load(f'{input_path}/coord_swap/broken_mol.gro')
broken_mol = md.load(f'{input_path}/coord_swap/broken_mol_1D.gro')
df_connect = pd.read_csv(f'{input_path}/coord_swap/residue_connect.csv')

atom_connect_all = df_connect[df_connect['Resname'] == 'C2D']
Expand Down

0 comments on commit 01c4de3

Please sign in to comment.