Skip to content

Commit

Permalink
Merge branch 'move_things2utils' of github.com:OpenFreeEnergy/openfe-…
Browse files Browse the repository at this point in the history
…gromacs into move_things2utils
  • Loading branch information
hannahbaumann committed Oct 1, 2024
2 parents db009fe + a576a56 commit d01ab9d
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 18 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ openfe-gromacs
[//]: # (Badges)
[![GitHub Actions Build Status](https://github.com/OpenFreeEnergy/openfe-gromacs/workflows/CI/badge.svg)](https://github.com/OpenFreeEnergy/openfe-gromacs/actions?query=workflow%3ACI)
[![codecov](https://codecov.io/gh/OpenFreeEnergy/openfe-gromacs/branch/main/graph/badge.svg)](https://codecov.io/gh/OpenFreeEnergy/openfe-gromacs/branch/main)
[![documentation](https://readthedocs.org/projects/openfe-gromacs/badge/?version=latest)](https://openfe-gromacs.readthedocs.io/en/latest/?badge=latest)

Gromacs-based protocols for Open Free Energy

Expand Down
2 changes: 2 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ dependencies:
- pytest
- pytest-xdist
- pytest-cov
- pip:
- git+https://github.com/openforcefield/openff-interchange.git
13 changes: 10 additions & 3 deletions openfe_gromacs/protocols/gromacs_md/md_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,16 @@
from typing import Any

import gufe
from gufe import ChemicalSystem, settings
from openfe.protocols.openmm_utils import system_validation
from openfe.utils import log_system_probe
import pint
from gufe import ChemicalSystem, SmallMoleculeComponent, settings
from openfe.protocols.openmm_utils import (
charge_generation,
system_creation,
system_validation,
)
from openfe.utils import log_system_probe, without_oechem_backend
from openff.interchange import Interchange
from openff.toolkit.topology import Molecule as OFFMolecule
from openff.units import unit

from openfe_gromacs.protocols.gromacs_md.md_settings import (
Expand Down
2 changes: 0 additions & 2 deletions openfe_gromacs/tests/protocols/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
from rdkit import Chem
from rdkit.Geometry import Point3D

import openfe_gromacs


@pytest.fixture
def benzene_vacuum_system(benzene_modifications):
Expand Down
2 changes: 1 addition & 1 deletion openfe_gromacs/tests/protocols/test_create_systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def test_interchange_gromacs(alanine_dipeptide_component, tmpdir):
]
with open(f"{tmpdir}/test.gro") as f:
gromacs_res_numbers = [int(line[:5].strip()) for line in f.readlines()[2:-1]]
# assert interchange_res_numbers == gromacs_res_numbers
assert interchange_res_numbers == gromacs_res_numbers

# check a few atom names to ensure these are not empty sets
for atom_name in ("HA", "CH3", "CA", "CB"):
Expand Down
3 changes: 2 additions & 1 deletion openfe_gromacs/tests/protocols/test_gromacs_md.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_serialize_protocol():

def test_create_independent_repeat_ids(benzene_system):
# if we create two dags each with 3 repeats, they should give 6 repeat_ids
# this allows multiple DAGs in flight for one Transformation that don't clash on gather
# this allows multiple DAGs in flight for one Transformation that don't
# clash on gather
settings = GromacsMDProtocol.default_settings()
# Default protocol is 1 repeat, change to 3 repeats
settings.protocol_repeats = 3
Expand Down
12 changes: 1 addition & 11 deletions openfe_gromacs/tests/protocols/test_md_settings.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,9 @@
# This code is part of OpenFE and is licensed under the MIT license.
# For details, see https://github.com/OpenFreeEnergy/openfe-gromacs
import json
import pathlib
from unittest import mock

import gufe
import pytest
from openff.units import unit

import openfe_gromacs
from openfe_gromacs.protocols.gromacs_md.md_methods import (
GromacsMDProtocol,
GromacsMDProtocolResult,
GromacsMDSetupUnit,
)
from openfe_gromacs.protocols.gromacs_md.md_methods import GromacsMDProtocol


def test_settings_pos_or_zero_error():
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,15 @@ omit = [
[tool.flake8]
max-line-length = 88
extend-ignore = ['E203',]
per-file-ignores = [
'__init__.py:F401',
]
builtins = [
"nanometer",
"picosecond",
"kelvin",
"bar",
]

[tool.isort]
profile = "black"
Expand Down

0 comments on commit d01ab9d

Please sign in to comment.