Skip to content

Commit

Permalink
refactor grompp (#157)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Duane Walker <[email protected]>
  • Loading branch information
misterbrandonwalker and Brandon Duane Walker authored Aug 5, 2024
1 parent 871e79c commit b09d841
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 41 deletions.
36 changes: 0 additions & 36 deletions utils/grompp-plugin/tests/test_grompp.py

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
specVersion: "0.1.0"
name: grompp
version: 0.1.0
container: grompp-plugin
container: grompp-tool
entrypoint:
title: grompp
description: Wrapper of the GROMACS grompp module.
author: Data Scientist
contact: [email protected]
author: Brandon Walker, Nazanin Donyapour
contact: [email protected], [email protected]
repository:
documentation:
citation:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,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"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
35 changes: 35 additions & 0 deletions utils/molecular-dynamics/gromacs/grompp-tool/tests/test_grompp.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Tests for the GROMACS grompp tool."""
from pathlib import Path

from sophios.api.pythonapi import Step
from sophios.api.pythonapi import Workflow


def test_grompp_cwl() -> None:
"""Tests grompp.cwl."""
# Define paths and setup input properties
cwl_file_str = "grompp_0@[email protected]"
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str)

input_crd_path = Path(__file__).resolve().parent / Path("grompp.gro")
input_top_zip_path = Path(__file__).resolve().parent / Path("grompp.zip")

# Create the CWL step
grompp_step = Step(clt_path=cwl_file)
grompp_step.input_crd_path = input_crd_path
grompp_step.input_top_zip_path = input_top_zip_path
grompp_step.output_tpr_path = "system.tpr"

# Create the workflow and run it
steps = [grompp_step]
filename = "grompp_workflow"
workflow = Workflow(steps, filename)
workflow.run()

# Define output directory and check for expected output
outdir = Path("outdir")
files = list(outdir.rglob("system.tpr"))

assert (
files
), f"The file 'system.tpr' does not exist in any subdirectory of '{outdir}'."

0 comments on commit b09d841

Please sign in to comment.