-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adjusting rgy to take traj & wrote missing unit tests
- Loading branch information
Showing
2 changed files
with
82 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import pytest | ||
|
||
from mdagent.tools.base_tools.analysis_tools.rgy import RadiusofGyration | ||
|
||
|
||
@pytest.fixture | ||
def rgy(get_registry, loaded_cif_traj): | ||
registry = get_registry("raw", False) | ||
rgy = RadiusofGyration(path_registry=registry) | ||
rgy.traj = loaded_cif_traj | ||
rgy.top_file = "test_top_dummy" | ||
rgy.traj_file = "test_traj_dummy" | ||
return rgy | ||
|
||
|
||
def test_rgy_per_frame(rgy): | ||
output = rgy.rgy_per_frame() | ||
assert "Radii of gyration saved to " in output | ||
|
||
|
||
def test_rgy_average(rgy): | ||
output = rgy.rgy_average() | ||
assert "Average radius of gyration: " in output | ||
|
||
|
||
def test_plot_rgy(rgy): | ||
output = rgy.plot_rgy() | ||
assert "Plot saved as: " in output |