Skip to content

Commit

Permalink
Rename utils file
Browse files Browse the repository at this point in the history
  • Loading branch information
hannahbaumann committed Sep 25, 2024
1 parent bab16de commit 8ad6e9d
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 24 deletions.
6 changes: 3 additions & 3 deletions openfe_gromacs/protocols/gromacs_md/md_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
OpenMMEngineSettings,
OpenMMSolvationSettings,
)
from openfe_gromacs.protocols.gromacs_utils import system_creation
from openfe_gromacs.protocols.gromacs_utils import create_systems

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -800,15 +800,15 @@ def run(
stateA_system,
stateA_topology,
stateA_positions,
) = system_creation.create_openmm_system(
) = create_systems.create_openmm_system(
settings,
solvent_comp,
protein_comp,
smc_components,
shared_basepath,
)
# 3. Create the Interchange object
stateA_interchange = system_creation.create_interchange(
stateA_interchange = create_systems.create_interchange(
stateA_system,
stateA_topology,
stateA_positions,
Expand Down
42 changes: 21 additions & 21 deletions openfe_gromacs/tests/protocols/test_system_creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
from openmm.app import GromacsGroFile, GromacsTopFile

from openfe_gromacs.protocols.gromacs_md.md_methods import GromacsMDProtocol
from openfe_gromacs.protocols.gromacs_utils import system_creation
from openfe_gromacs.protocols.gromacs_utils import create_systems

# def test_interchange_gromacs(T4_protein_component, tmpdir):
# solvent = gufe.SolventComponent()
# smc_components = {}
# settings = GromacsMDProtocol.default_settings()
# omm_system, omm_topology, omm_positions = system_creation.create_openmm_system(
# settings, solvent, T4_protein_component, smc_components, tmpdir
# )
# omm_atom_names = [atom.name for atom in omm_topology.atoms()]
# interchange = system_creation.create_interchange(
# omm_system, omm_topology, omm_positions, smc_components
# )
# interchange_atom_names = [atom.name for atom in interchange.topology.atoms]
# interchange.to_gro(f"{tmpdir}/test.gro")
# gro_atom_names = GromacsGroFile(f"{tmpdir}/test.gro").atomNames
# assert len(omm_atom_names) == len(interchange_atom_names) == len(gro_atom_names)
# assert omm_atom_names == interchange_atom_names == gro_atom_names
#
# # check a few atom names to ensure these are not empty sets
# for atom_name in ("HA", "CH3", "CA", "CB"):
# assert atom_name in interchange_atom_names
def test_interchange_gromacs(T4_protein_component, tmpdir):
solvent = gufe.SolventComponent()
smc_components = {}
settings = GromacsMDProtocol.default_settings()
omm_system, omm_topology, omm_positions = create_systems.create_openmm_system(
settings, solvent, T4_protein_component, smc_components, tmpdir
)
omm_atom_names = [atom.name for atom in omm_topology.atoms()]
interchange = create_systems.create_interchange(
omm_system, omm_topology, omm_positions, smc_components
)
interchange_atom_names = [atom.name for atom in interchange.topology.atoms]
interchange.to_gro(f"{tmpdir}/test.gro")
gro_atom_names = GromacsGroFile(f"{tmpdir}/test.gro").atomNames
assert len(omm_atom_names) == len(interchange_atom_names) == len(gro_atom_names)
assert omm_atom_names == interchange_atom_names == gro_atom_names

# check a few atom names to ensure these are not empty sets
for atom_name in ("HA", "CH3", "CA", "CB"):
assert atom_name in interchange_atom_names


def test_user_charges(ethane, tmpdir):
Expand Down

0 comments on commit 8ad6e9d

Please sign in to comment.