Skip to content

Commit

Permalink
sort values of rg
Browse files Browse the repository at this point in the history
  • Loading branch information
pm-blanco committed Mar 5, 2024
1 parent 71b595b commit d47a21b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions testsuite/peptide_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,15 @@ def run_peptide_test(script_path,test_pH_values,sequence,rtol,atol,mode="test"):
# Check charge
test_charge=np.sort(data["mean","charge"].to_numpy())
ref_charge=np.sort(ref_data["mean","charge"].to_numpy())
# Check that the charge and radius of gyration are consistent
np.testing.assert_allclose(test_charge,
ref_charge,
rtol=rtol,
atol=atol)
np.testing.assert_allclose(data["mean","rg"].to_numpy(),
ref_data["mean","rg"].to_numpy(),
# Check rg
test_rg=np.sort(data["mean","rg"].to_numpy())
ref_rg=np.sort(ref_data["mean","rg"].to_numpy())
np.testing.assert_allclose(test_rg,
ref_rg,
rtol=rtol,
atol=atol)
print(f"Test for {sequence} succesful")
Expand Down Expand Up @@ -87,4 +89,4 @@ def run_peptide_test(script_path,test_pH_values,sequence,rtol,atol,mode="test"):
test_pH_values=test_pH_values,
sequence=sequence,
rtol=rtol,
atol=atol)
atol=atol)

0 comments on commit d47a21b

Please sign in to comment.