Skip to content

Commit

Permalink
refactor acpype
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Duane Walker authored and misterbrandonwalker committed Jul 30, 2024
1 parent b3f4953 commit 4c4d99e
Show file tree
Hide file tree
Showing 13 changed files with 42 additions and 31 deletions.
26 changes: 0 additions & 26 deletions utils/acpype-plugin/tests/test_acpype.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: acpype
version: 0.1.0
container: acpype-plugin
container: acpype-tool
entrypoint:
title: acpype
description: This class is a wrapper of Acpype tool for generation of topologies for GROMACS.
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.
38 changes: 38 additions & 0 deletions utils/molecular-dynamics/amber/acpype-tool/tests/test_acpype.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
"""Tests for acpype."""
from pathlib import Path

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


def test_acpype() -> None:
"""Test acpype CWL."""
# Define paths and input properties
input_path = Path(__file__).resolve().parent / Path("5umx_ligand.sdf")
cwl_file_str = "acpype.cwl"
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str)

# Create the CWL step
acpype_step = Step(clt_path=cwl_file)
acpype_step.input_path = str(input_path)
acpype_step.output_gro_path = "system.gro"
acpype_step.output_itp_path = "system.itp"
acpype_step.output_top_path = "system.top"
acpype_step.base_name = "ligand"
acpype_step.charge_method = "bcc"
acpype_step.output_pdb_path = "system.pdb"

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

# Define the output directory and pattern
outdir = Path("outdir") # Output directory
output_files = list(outdir.rglob("ligand_GMX.gro"))

# Check if the expected output file exists
assert (
output_files
), f"No file matching pattern 'ligand_GMX.gro' found in '{outdir}'."

0 comments on commit 4c4d99e

Please sign in to comment.