-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
23fb84d
commit 5cc6dca
Showing
13 changed files
with
37 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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.
6 changes: 3 additions & 3 deletions
6
utils/gmx-energy-plugin/ict.yml → ...-dynamics/gromacs/gmx-energy-tool/ict.yml
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 |
---|---|---|
@@ -1,12 +1,12 @@ | ||
specVersion: "0.1.0" | ||
name: gmx_energy | ||
version: 0.1.0 | ||
container: gmx-energy-plugin | ||
container: gmx-energy-tool | ||
entrypoint: | ||
title: gmx_energy | ||
description: Wrapper of the GROMACS energy module for extracting energy components from a given GROMACS energy file. | ||
author: Data Scientist | ||
contact: [email protected] | ||
author: Brandon Walker, Nazanin Donyapour | ||
contact: [email protected], [email protected] | ||
repository: | ||
documentation: | ||
citation: | ||
|
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
File renamed without changes.
File renamed without changes.
33 changes: 33 additions & 0 deletions
33
utils/molecular-dynamics/gromacs/gmx-energy-tool/tests/test_gmx_energy.py
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,33 @@ | ||
"""Tests for gmx_energy.""" | ||
from pathlib import Path | ||
|
||
from sophios.api.pythonapi import Step | ||
from sophios.api.pythonapi import Workflow | ||
|
||
|
||
def test_gmx_energy() -> None: | ||
"""Test gmx_energy.""" | ||
# Define paths | ||
cwl_file_str = "gmx_energy_0@[email protected]" | ||
cwl_file = Path(__file__).resolve().parent.parent / Path(cwl_file_str) | ||
input_energy_path = Path(__file__).resolve().parent / Path("energy.edr") | ||
|
||
# Create the CWL step | ||
gmx_energy_step = Step(clt_path=cwl_file) | ||
gmx_energy_step.config = '{"terms": ["Potential"]}' | ||
gmx_energy_step.input_energy_path = input_energy_path | ||
gmx_energy_step.output_xvg_path = "system.xvg" | ||
|
||
# Create the workflow and run it | ||
steps = [gmx_energy_step] | ||
filename = "gmx_energy_workflow" | ||
workflow = Workflow(steps, filename) | ||
workflow.run() | ||
|
||
# Define output directory and check for expected output | ||
outdir = Path("outdir") | ||
files = list(outdir.rglob("system.xvg")) | ||
|
||
assert ( | ||
files | ||
), f"The file 'system.xvg' does not exist in any subdirectory of '{outdir}'." |