Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GromacsMDSetupUnit #7

Merged
merged 94 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
83082f1
Start of GromacsMDSetupUnit
hannahbaumann Jul 16, 2024
e8d7c95
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
7b1dedf
fix imports
hannahbaumann Jul 16, 2024
0225975
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
f5898bc
Initial tests for GromacsMDProtocol
hannahbaumann Jul 16, 2024
b58433f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 16, 2024
35442d1
Add residue names
hannahbaumann Jul 16, 2024
091d0a4
Add functionality to write out .mdp files
hannahbaumann Jul 19, 2024
1842260
small changes
hannahbaumann Jul 19, 2024
353f922
small fixes
hannahbaumann Jul 19, 2024
d49a59d
Add outputs
hannahbaumann Jul 22, 2024
53f38b6
Add more tests
hannahbaumann Jul 22, 2024
8a96897
Add more tests
hannahbaumann Jul 22, 2024
01398d5
add init files
hannahbaumann Jul 22, 2024
f5418ec
Merge branch 'md_settings' into start_GromacsMDProtocol
hannahbaumann Jul 22, 2024
6a75a2e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2024
c174ef2
Remove ununsed imports
hannahbaumann Jul 22, 2024
a49ccd0
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 22, 2024
e22a5ff
Add initial validators
hannahbaumann Jul 23, 2024
843692e
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2024
c5a8f20
Small fix
hannahbaumann Jul 23, 2024
84d530a
Small fix
hannahbaumann Jul 23, 2024
f22be2c
Merge branch 'md_settings' into start_GromacsMDProtocol
hannahbaumann Jul 23, 2024
4f61980
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 23, 2024
a8c0183
Move some settings to pre-defined dictionary
hannahbaumann Jul 24, 2024
bfb9b27
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2024
a852eb1
More settings changes
hannahbaumann Jul 24, 2024
9f4ca84
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2024
2286921
Add more validators
hannahbaumann Jul 24, 2024
e1a9f5d
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2024
a00c2ce
More validators settings
hannahbaumann Jul 24, 2024
776fcf3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2024
d532939
Add unit conversion for settings
hannahbaumann Jul 24, 2024
f55d1b6
Test commit
hannahbaumann Jul 24, 2024
65db580
Add ValueError for checking PME and constraints
hannahbaumann Jul 24, 2024
33cc54a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 24, 2024
8cd5593
Some cleanup
hannahbaumann Jul 24, 2024
c035c32
Small fixes
hannahbaumann Jul 24, 2024
3bbcfc9
Merge branch 'md_settings' into start_GromacsMDProtocol
hannahbaumann Jul 24, 2024
13d4462
ValueError if no SolventComponent
hannahbaumann Jul 25, 2024
9616d81
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
9216e1a
Add gufe to CI
hannahbaumann Jul 25, 2024
44a8752
Update test env
hannahbaumann Jul 25, 2024
b2c955c
Test CI
hannahbaumann Jul 25, 2024
79eb43f
Add more packages to test env
hannahbaumann Jul 25, 2024
a2db025
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
3d3e45a
small test
hannahbaumann Jul 25, 2024
56d1322
Add more packages env to see if that fixes CI
hannahbaumann Jul 25, 2024
59ac068
Add ambertools to see if that fixes ci
hannahbaumann Jul 25, 2024
333e234
Test CI fix
hannahbaumann Jul 25, 2024
28fad37
Fix ci.yaml
hannahbaumann Jul 25, 2024
37a3376
Test CI fix
hannahbaumann Jul 25, 2024
a854e0f
Test generate-run-shell false CI
hannahbaumann Jul 25, 2024
e6e6958
Another intent at fixing CI
hannahbaumann Jul 25, 2024
4fe0bb1
Change python version CI
hannahbaumann Jul 25, 2024
b6ef01b
Remove OpenMMfff
hannahbaumann Jul 25, 2024
137952c
Remove ambertools
hannahbaumann Jul 25, 2024
491d279
Add openfe to env
hannahbaumann Jul 25, 2024
ff4d872
Cleanup test env
hannahbaumann Jul 25, 2024
7aa9320
Test CI
hannahbaumann Jul 25, 2024
76fc42d
Add env file
hannahbaumann Jul 25, 2024
adc06c7
small fix
hannahbaumann Jul 25, 2024
48dcd80
small tets
hannahbaumann Jul 25, 2024
8aeb943
some CI tweaks
mikemhenry Jul 25, 2024
4d52d7c
cleanup env + ci for testing
mikemhenry Jul 25, 2024
937b559
install gmxapi seperately
mikemhenry Jul 25, 2024
3537d84
see if we can build in a cross platform way
mikemhenry Jul 25, 2024
22eb0ff
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 25, 2024
77121ca
Add tests for the MD protocol
hannahbaumann Jul 26, 2024
3011b12
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 26, 2024
995ee7f
Remove continuation error in Setup Unit
hannahbaumann Jul 26, 2024
47e0058
Small fix
hannahbaumann Jul 26, 2024
df9d3e3
Add more tests
hannahbaumann Jul 26, 2024
6e226da
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 26, 2024
89029ba
Add monkeypath
hannahbaumann Jul 26, 2024
dcd35e0
Clean up tests
hannahbaumann Jul 29, 2024
d309721
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Jul 29, 2024
5e20a1b
Add returns for validators
hannahbaumann Aug 1, 2024
ece7781
Remove unused imports
hannahbaumann Aug 1, 2024
06e0624
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Aug 1, 2024
91f6f79
Some fixes addressing review comments
hannahbaumann Sep 4, 2024
cc7e77a
Addressing review comments
hannahbaumann Sep 4, 2024
3ff1c3f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 4, 2024
4cda39f
Merge branch 'main' into start_GromacsMDProtocol
hannahbaumann Sep 19, 2024
de55587
Get tests to pass again
hannahbaumann Sep 19, 2024
e3d6658
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 19, 2024
2274082
Small fixes
hannahbaumann Sep 19, 2024
3873e02
Subclass OpenMM Forcefield settings, add validator for constraints
hannahbaumann Sep 19, 2024
ce0d876
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 19, 2024
233a775
Restructure run function, breakdown into steps
hannahbaumann Sep 19, 2024
eb59858
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] Sep 19, 2024
b9eb707
Some fixes
hannahbaumann Sep 20, 2024
d453f3c
Update token
hannahbaumann Sep 20, 2024
4eae93e
Small change
hannahbaumann Sep 20, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 39 additions & 17 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: CI

on:
# GitHub has started calling new repo's first branch "main" https://github.com/github/renaming
# The cookiecutter uses the "--initial-branch" flag when it runs git-init
push:
branches:
- "main"
Expand All @@ -15,17 +13,36 @@ on:
# (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule)
- cron: "0 0 * * 0"

# This will cancel the workflow if we make another push,
# we want this so that if we make 3 commits, we only
# run our workflow on the last commit, instead of running
# it 3 times.
concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

defaults:
run:
# This shell command is a safer default so if bash hits
# and error, it will stop
shell: bash -leo pipefail {0}

jobs:
test:
name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
# We want every job in our matrix to run, so we don't
# want to fail fast
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest, windows-latest]
python-version: [3.9, "3.10", "3.11"]
# We don't really support windows so we don't need
# to test it
os: [macOS-latest, ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Additional info about the build
shell: bash
Expand All @@ -35,26 +52,31 @@ jobs:
ulimit -a

# More info on options: https://github.com/marketplace/actions/provision-with-micromamba
- uses: mamba-org/provision-with-micromamba@main
- name: "Setup Micromamba"
uses: mamba-org/setup-micromamba@v1
with:
environment-file: devtools/conda-envs/test_env.yaml
#environment-file: devtools/conda-envs/test_env.yaml
environment-file: environment.yml
environment-name: test
channels: conda-forge,defaults
extra-specs: |
cache-environment: true
cache-downloads: true
create-args: >-
python=${{ matrix.python-version }}
init-shell: bash

- name: Install package
# conda setup requires this special shell
shell: bash -l {0}
- name: Install gmxapi
run: |
python -m pip install . --no-deps
micromamba list
# gmxapi needs to be pointed to where gromacs lives
# we also need to tell it where to find our compilers
export CMAKE_ARGS="-Dgmxapi_ROOT=$CONDA_PREFIX -C $CONDA_PREFIX/share/cmake/gromacs/gromacs-hints.cmake -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC"
pip install gmxapi

- name: Install package
run: python -m pip install . --no-deps

- name: Run tests
# conda setup requires this special shell
shell: bash -l {0}
run: |
pytest -v --cov=openfe_gromacs --cov-report=xml --color=yes openfe_gromacs/tests/
pytest -n logical -v --cov=openfe_gromacs --cov-report=xml --color=yes openfe_gromacs/tests/

- name: CodeCov
uses: codecov/codecov-action@v3
Expand Down
22 changes: 16 additions & 6 deletions devtools/conda-envs/test_env.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
name: test
channels:

- jaimergp/label/unsupported-cudatoolkit-shim
- conda-forge

- defaults
dependencies:
# Base depends
- python
- pip

- openff-toolkit-base >=0.16
- openff-units
- openff-models
- ambertools =23
# Testing
- pytest
- pytest-xdist
- pytest-cov
- pydantic >1
- codecov

# Pip-only installs
#- pip:
# - codecov
- numpy
- networkx
- rdkit
- openfe>=1.0.0rc0
- click
- openmm
- openmmtools
- plugcli
- gufe
11 changes: 11 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: test
channels:
- conda-forge
dependencies:
- openfe
- compilers
- mpi4py
- gromacs
- pytest
- pytest-xdist
- pytest-cov
26 changes: 21 additions & 5 deletions openfe_gromacs/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
"""Gromacs-based protocols for Open Free Energy"""

# Add imports here
from ._version import __version__ # noqa: F401
from .openfe_gromacs import * # noqa: F401,F403
from gufe import (
AlchemicalNetwork,
ChemicalSystem,
Component,
LigandAtomMapping,
NonTransformation,
ProteinComponent,
SmallMoleculeComponent,
SolventComponent,
Transformation,
)
from gufe.protocols import (
Protocol,
ProtocolDAG,
ProtocolDAGResult,
ProtocolResult,
ProtocolUnit,
ProtocolUnitFailure,
ProtocolUnitResult,
execute_DAG,
)
2 changes: 2 additions & 0 deletions openfe_gromacs/protocols/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe-gromacs
20 changes: 20 additions & 0 deletions openfe_gromacs/protocols/gromacs_md/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe-gromacs
"""
Run MD simulation using OpenMM and OpenMMTools.

"""

from .md_methods import (
GromacsMDProtocol,
GromacsMDProtocolResult,
GromacsMDProtocolSettings,
GromacsMDSetupUnit,
)

__all__ = [
"GromacsMDProtocol",
"GromacsMDProtocolSettings",
"GromacsMDProtocolResult",
"GromacsMDProtocolUnit",
]
Loading
Loading