diff --git a/utils/sander-mdrun-plugin/.bumpversion.cfg b/utils/molecular-dynamics/amber/sander-mdrun-tool/.bumpversion.cfg similarity index 100% rename from utils/sander-mdrun-plugin/.bumpversion.cfg rename to utils/molecular-dynamics/amber/sander-mdrun-tool/.bumpversion.cfg diff --git a/utils/sander-mdrun-plugin/.dockerignore b/utils/molecular-dynamics/amber/sander-mdrun-tool/.dockerignore similarity index 100% rename from utils/sander-mdrun-plugin/.dockerignore rename to utils/molecular-dynamics/amber/sander-mdrun-tool/.dockerignore diff --git a/utils/sander-mdrun-plugin/.gitignore b/utils/molecular-dynamics/amber/sander-mdrun-tool/.gitignore similarity index 100% rename from utils/sander-mdrun-plugin/.gitignore rename to utils/molecular-dynamics/amber/sander-mdrun-tool/.gitignore diff --git a/utils/sander-mdrun-plugin/CHANGELOG.md b/utils/molecular-dynamics/amber/sander-mdrun-tool/CHANGELOG.md similarity index 100% rename from utils/sander-mdrun-plugin/CHANGELOG.md rename to utils/molecular-dynamics/amber/sander-mdrun-tool/CHANGELOG.md diff --git a/utils/sander-mdrun-plugin/README.md b/utils/molecular-dynamics/amber/sander-mdrun-tool/README.md similarity index 100% rename from utils/sander-mdrun-plugin/README.md rename to utils/molecular-dynamics/amber/sander-mdrun-tool/README.md diff --git a/utils/sander-mdrun-plugin/VERSION b/utils/molecular-dynamics/amber/sander-mdrun-tool/VERSION similarity index 100% rename from utils/sander-mdrun-plugin/VERSION rename to utils/molecular-dynamics/amber/sander-mdrun-tool/VERSION diff --git a/utils/sander-mdrun-plugin/ict.yml b/utils/molecular-dynamics/amber/sander-mdrun-tool/ict.yml similarity index 98% rename from utils/sander-mdrun-plugin/ict.yml rename to utils/molecular-dynamics/amber/sander-mdrun-tool/ict.yml index 19a886e0..0e824c34 100644 --- a/utils/sander-mdrun-plugin/ict.yml +++ b/utils/molecular-dynamics/amber/sander-mdrun-tool/ict.yml @@ -1,12 +1,12 @@ specVersion: "0.1.0" name: sander_mdrun version: 0.1.0 -container: sander-mdrun-plugin +container: sander-mdrun-tool entrypoint: title: sander_mdrun description: Wrapper of the AmberTools (AMBER MD Package) sander tool module. -author: Data Scientist -contact: data.scientist@labshare.org +author: Brandon Walker, Nazanin Donyapour +contact: brandon.walker@axleinfo.com, nazanin.donyapour@axleinfo.com repository: documentation: citation: diff --git a/utils/sander-mdrun-plugin/pyproject.toml b/utils/molecular-dynamics/amber/sander-mdrun-tool/pyproject.toml similarity index 89% rename from utils/sander-mdrun-plugin/pyproject.toml rename to utils/molecular-dynamics/amber/sander-mdrun-tool/pyproject.toml index e2f2b273..dd0d50cf 100644 --- a/utils/sander-mdrun-plugin/pyproject.toml +++ b/utils/molecular-dynamics/amber/sander-mdrun-tool/pyproject.toml @@ -7,9 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] python = ">=3.9,<3.12" -typer = "^0.7.0" -cwl-utils = "0.33" -cwltool = "3.1.20240404144621" +sophios = "0.1.1" [tool.poetry.group.dev.dependencies] bump2version = "^1.0.1" diff --git a/utils/sander-mdrun-plugin/sander_mdrun.cwl b/utils/molecular-dynamics/amber/sander-mdrun-tool/sander_mdrun.cwl similarity index 100% rename from utils/sander-mdrun-plugin/sander_mdrun.cwl rename to utils/molecular-dynamics/amber/sander-mdrun-tool/sander_mdrun.cwl diff --git a/utils/sander-mdrun-plugin/tests/__init__.py b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/__init__.py similarity index 100% rename from utils/sander-mdrun-plugin/tests/__init__.py rename to utils/molecular-dynamics/amber/sander-mdrun-tool/tests/__init__.py diff --git a/utils/sander-mdrun-plugin/tests/cln025.inpcrd b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/cln025.inpcrd similarity index 100% rename from utils/sander-mdrun-plugin/tests/cln025.inpcrd rename to utils/molecular-dynamics/amber/sander-mdrun-tool/tests/cln025.inpcrd diff --git a/utils/sander-mdrun-plugin/tests/cln025.prmtop b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/cln025.prmtop similarity index 100% rename from utils/sander-mdrun-plugin/tests/cln025.prmtop rename to utils/molecular-dynamics/amber/sander-mdrun-tool/tests/cln025.prmtop diff --git a/utils/sander-mdrun-plugin/tests/npt.mdin b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/npt.mdin similarity index 100% rename from utils/sander-mdrun-plugin/tests/npt.mdin rename to utils/molecular-dynamics/amber/sander-mdrun-tool/tests/npt.mdin diff --git a/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/test_sander_mdrun.py b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/test_sander_mdrun.py new file mode 100644 index 00000000..df97dbc3 --- /dev/null +++ b/utils/molecular-dynamics/amber/sander-mdrun-tool/tests/test_sander_mdrun.py @@ -0,0 +1,39 @@ +"""Tests for sander_mdrun.""" +from pathlib import Path + +from sophios.api.pythonapi import Step +from sophios.api.pythonapi import Workflow + + +def test_sander_mdrun() -> None: + """Test sander_mdrun CWL.""" + cwl_file_str = "sander_mdrun.cwl" + cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) + + input_top_path = Path(__file__).resolve().parent / Path("cln025.prmtop") + input_crd_path = Path(__file__).resolve().parent / Path("cln025.inpcrd") + input_mdin_path = Path(__file__).resolve().parent / Path("npt.mdin") + + sander_mdrun = Step(clt_path=cwl_file) + sander_mdrun.input_top_path = input_top_path + sander_mdrun.input_crd_path = input_crd_path + sander_mdrun.input_mdin_path = input_mdin_path + sander_mdrun.output_log_path = "system.log" + sander_mdrun.output_traj_path = "system.trj" + sander_mdrun.output_rst_path = "system.rst" + sander_mdrun.output_cpout_path = "system.cpout" + sander_mdrun.output_cprst_path = "system.cprst" + sander_mdrun.output_mdinfo_path = "system.mdinfo" + + steps = [sander_mdrun] + filename = "sander_mdrun" + viz = Workflow(steps, filename) + + viz.run() + + outdir = Path("outdir") + files = list(outdir.rglob("system.rst")) + + assert ( + files + ), f"The file 'system.rst' does not exist in any subdirectory of '{outdir}'." diff --git a/utils/sander-mdrun-plugin/tests/test_sander_mdrun.py b/utils/sander-mdrun-plugin/tests/test_sander_mdrun.py deleted file mode 100644 index 77ee2b46..00000000 --- a/utils/sander-mdrun-plugin/tests/test_sander_mdrun.py +++ /dev/null @@ -1,39 +0,0 @@ -"""Tests for sander_mdrun.""" -import sys -from pathlib import Path - -current_dir = Path(__file__).resolve().parent -target_dir = current_dir.parent.parent.parent / "cwl_utils" -sys.path.append(str(target_dir)) - -from cwl_utilities import call_cwltool # noqa: E402 -from cwl_utilities import create_input_yaml # noqa: E402 -from cwl_utilities import parse_cwl_arguments # noqa: E402 - - -def test_sander_mdrun() -> None: - """Test sander_mdrun.""" - cwl_file_str = "sander_mdrun.cwl" - cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) - input_to_props = parse_cwl_arguments(cwl_file) - file_path_str = "cln025.prmtop" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_top_path"]["path"] = file_path - file_path_str = "cln025.inpcrd" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_crd_path"]["path"] = file_path - file_path_str = "npt.mdin" - file_path = str(Path(__file__).resolve().parent / Path(file_path_str)) - input_to_props["input_mdin_path"]["path"] = file_path - input_to_props["input_mdin_path"]["class"] = "File" - del input_to_props["input_cpin_path"] - del input_to_props["input_ref_path"] - - input_yaml_path = Path("sander_mdrun.yml") - create_input_yaml(input_to_props, input_yaml_path) - - stdout, stderr = call_cwltool(cwl_file, input_yaml_path) - print("stdout:", stdout) # noqa: T201 - print("stderr:", stderr) # noqa: T201 - - assert Path("system.rst").exists()