mirror of
https://github.com/OpenFreeEnergy/openfe.git
synced 2026-06-04 14:14:22 +08:00
Fixing various typos (#1882)
* Playing around with codespell * revert some things --------- Co-authored-by: Alyssa Travitz <31974495+atravitz@users.noreply.github.com>
This commit is contained in:
@@ -39,4 +39,4 @@ Enforcement of this Code of Conduct will be respectful and not include any haras
|
|||||||
|
|
||||||
You deserve sincere thanks for helping to make this a welcoming, friendly community for all.
|
You deserve sincere thanks for helping to make this a welcoming, friendly community for all.
|
||||||
|
|
||||||
This Code of Conduct was adpated from the [cmelab](https://github.com/cmelab/getting-started/blob/master/wiki/pages/Code_of_Conduct.md).
|
This Code of Conduct was adapted from the [cmelab](https://github.com/cmelab/getting-started/blob/master/wiki/pages/Code_of_Conduct.md).
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ The openfe lock file and docker and apptainer images use Python 3.12, and so cha
|
|||||||
|
|
||||||
**Changed:**
|
**Changed:**
|
||||||
|
|
||||||
* The default atom mapper used in the CLI has been changed from ``LomapAtomMapper`` to ``KartografAtomMapper`` in line with the recommended defaults from the industry benchmarking paper. Users who whish to continue to use ``LomapAtomMapper`` can do so via the YAML configuration file. See the `documentation <https://docs.openfree.energy/en/latest/tutorials/rbfe_cli_tutorial.html#customize-your-campaign-setup>`_ for details (`PR #1530 <https://github.com/OpenFreeEnergy/openfe/pull/1530>`_).
|
* The default atom mapper used in the CLI has been changed from ``LomapAtomMapper`` to ``KartografAtomMapper`` in line with the recommended defaults from the industry benchmarking paper. Users who wish to continue to use ``LomapAtomMapper`` can do so via the YAML configuration file. See the `documentation <https://docs.openfree.energy/en/latest/tutorials/rbfe_cli_tutorial.html#customize-your-campaign-setup>`_ for details (`PR #1530 <https://github.com/OpenFreeEnergy/openfe/pull/1530>`_).
|
||||||
* An improved error message is now shown when a mapping involving a changing constraint length cannot be fixed (`PR #1529 <https://github.com/OpenFreeEnergy/openfe/pull/1529>`_).
|
* An improved error message is now shown when a mapping involving a changing constraint length cannot be fixed (`PR #1529 <https://github.com/OpenFreeEnergy/openfe/pull/1529>`_).
|
||||||
* The default platform for OpenMM-based Protocols is now CUDA and will fail by default on a non-Nvidia GPU enabled system (`PR #1576 <https://github.com/OpenFreeEnergy/openfe/pull/1576>`_).
|
* The default platform for OpenMM-based Protocols is now CUDA and will fail by default on a non-Nvidia GPU enabled system (`PR #1576 <https://github.com/OpenFreeEnergy/openfe/pull/1576>`_).
|
||||||
* Remove unnecessary limit on residues ids (``resids``) when getting mappings from topology in ``topology_helpers.py`` utility module (`PR #1539 <https://github.com/OpenFreeEnergy/openfe/pull/1539>`_).
|
* Remove unnecessary limit on residues ids (``resids``) when getting mappings from topology in ``topology_helpers.py`` utility module (`PR #1539 <https://github.com/OpenFreeEnergy/openfe/pull/1539>`_).
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ the :class:`.Protocol` may create one or more ``ProtocolDAG``\ s, the
|
|||||||
:class:`.ProtocolResult` will be made from one or more
|
:class:`.ProtocolResult` will be made from one or more
|
||||||
:class:`.ProtocolDAGResult`\ s. Finally, each :class:`.ProtocolDAGResult`
|
:class:`.ProtocolDAGResult`\ s. Finally, each :class:`.ProtocolDAGResult`
|
||||||
may carry information about multiple :class:`.ProtocolUnitResult`\ s, just a
|
may carry information about multiple :class:`.ProtocolUnitResult`\ s, just a
|
||||||
single ``ProtocolDAG`` may involve mutliple ``ProtocolUnit``\ s.
|
single ``ProtocolDAG`` may involve multiple ``ProtocolUnit``\ s.
|
||||||
|
|
||||||
.. TODO FUTURE: figure showing the relations of protocol objects and result
|
.. TODO FUTURE: figure showing the relations of protocol objects and result
|
||||||
objects
|
objects
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ Scientific Details
|
|||||||
Orientational restraints
|
Orientational restraints
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Orientational, or Boresch-style, restraints are automaticallly (unless manually specified) applied between three
|
Orientational, or Boresch-style, restraints are automatically (unless manually specified) applied between three
|
||||||
protein and three ligand atoms using one bond, two angle, and three dihedral restraints.
|
protein and three ligand atoms using one bond, two angle, and three dihedral restraints.
|
||||||
Reference atoms are picked based on different criteria, such as the root mean squared
|
Reference atoms are picked based on different criteria, such as the root mean squared
|
||||||
fluctuation of the atoms in a short MD simulation, the secondary structure of the protein,
|
fluctuation of the atoms in a short MD simulation, the secondary structure of the protein,
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ If there is a ``SolventComponent`` in the :class:`.ChemicalSystem`, the each :cl
|
|||||||
A MonteCarloBarostat is used in the NPT ensemble to maintain constant pressure.
|
A MonteCarloBarostat is used in the NPT ensemble to maintain constant pressure.
|
||||||
Relevant settings under solvent conditions include the solvation settings that control the ``solvent_model`` and ``solvent_padding``.
|
Relevant settings under solvent conditions include the solvation settings that control the ``solvent_model`` and ``solvent_padding``.
|
||||||
|
|
||||||
If the :class:`.ChemicalSystem` does not contain a ``SolventComponent``, the protocol runs an MD simulation in vacuum. After a minimization, the protocol performs an equilibration, followed by a production run with no periodic boundary conditions and infinite cutoffs. Settings that control the barostat or the solvation are ignored for vaccum MD simulations.
|
If the :class:`.ChemicalSystem` does not contain a ``SolventComponent``, the protocol runs an MD simulation in vacuum. After a minimization, the protocol performs an equilibration, followed by a production run with no periodic boundary conditions and infinite cutoffs. Settings that control the barostat or the solvation are ignored for vacuum MD simulations.
|
||||||
|
|
||||||
Performance consideration for gas phase MD simulations
|
Performance consideration for gas phase MD simulations
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ difference produced.
|
|||||||
this analysis calculates the free energy difference, both in forward and backward directions.
|
this analysis calculates the free energy difference, both in forward and backward directions.
|
||||||
In this analysis, forward and backward estimates that agree within error using only a fraction of the total data
|
In this analysis, forward and backward estimates that agree within error using only a fraction of the total data
|
||||||
suggest convergence [5]_. Note: the error bars reported in this plot are
|
suggest convergence [5]_. Note: the error bars reported in this plot are
|
||||||
MBAR analytical errors instead of boostrap errors.
|
MBAR analytical errors instead of bootstrap errors.
|
||||||
- .. image:: img/forward_reverse_convergence.png
|
- .. image:: img/forward_reverse_convergence.png
|
||||||
* - **Timeseries of replica states.**
|
* - **Timeseries of replica states.**
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ Scientific Details
|
|||||||
Orientational restraints
|
Orientational restraints
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Orientational, or Boresch-style, restraints are automaticallly (unless manually specified) applied between three protein and three ligand atoms using one bond,
|
Orientational, or Boresch-style, restraints are automatically (unless manually specified) applied between three protein and three ligand atoms using one bond,
|
||||||
two angle, and three dihedral restraints. Reference atoms are picked based on different criteria, such as the root mean squared
|
two angle, and three dihedral restraints. Reference atoms are picked based on different criteria, such as the root mean squared
|
||||||
fluctuation of the atoms in a short MD simulation, the secondary structure of the protein, and the distance between atoms,
|
fluctuation of the atoms in a short MD simulation, the secondary structure of the protein, and the distance between atoms,
|
||||||
based on heuristics from Baumann et al. [2]_ and Alibay et al. [3]_.
|
based on heuristics from Baumann et al. [2]_ and Alibay et al. [3]_.
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ can be found on the individual Protocol API reference documentation pages:
|
|||||||
Shared OpenMM Protocol Settings
|
Shared OpenMM Protocol Settings
|
||||||
-------------------------------
|
-------------------------------
|
||||||
|
|
||||||
The following are Settings clases which are shared between multiple
|
The following are Settings classes which are shared between multiple
|
||||||
OpenMM-based Protocols. Please note that not all Protocols use these
|
OpenMM-based Protocols. Please note that not all Protocols use these
|
||||||
Settings classes.
|
Settings classes.
|
||||||
|
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ def plot_lambda_transition_matrix(matrix: npt.NDArray) -> Axes:
|
|||||||
color=("k" if rel_prob < 0.5 else "w"),
|
color=("k" if rel_prob < 0.5 else "w"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# anotate axes
|
# annotate axes
|
||||||
base_settings: dict[str, Union[str, int]] = {
|
base_settings: dict[str, Union[str, int]] = {
|
||||||
"size": 10,
|
"size": 10,
|
||||||
"va": "center",
|
"va": "center",
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ class AbsoluteProtocolResultMixin:
|
|||||||
-------
|
-------
|
||||||
forward_reverse : dict[str, list[Optional[dict[str, Union[npt.NDArray, openff.units.Quantity]]]]]
|
forward_reverse : dict[str, list[Optional[dict[str, Union[npt.NDArray, openff.units.Quantity]]]]]
|
||||||
A dictionary, keyed for each leg of the thermodynamic cycle,
|
A dictionary, keyed for each leg of the thermodynamic cycle,
|
||||||
either ``solvent`` and ``vaccuum` for a solvation free energy or
|
either ``solvent`` and ``vacuum` for a solvation free energy or
|
||||||
``solvent`` and ``complex`` for a binding free energy,
|
``solvent`` and ``complex`` for a binding free energy,
|
||||||
with each containing a list of dictionaries containing the forward
|
with each containing a list of dictionaries containing the forward
|
||||||
and reverse analysis of each repeat of that simulation type.
|
and reverse analysis of each repeat of that simulation type.
|
||||||
@@ -109,7 +109,7 @@ class AbsoluteProtocolResultMixin:
|
|||||||
-------
|
-------
|
||||||
overlap_stats : dict[str, list[dict[str, npt.NDArray]]]
|
overlap_stats : dict[str, list[dict[str, npt.NDArray]]]
|
||||||
A dictionary keyed for each leg of the thermodynamic cycle, either
|
A dictionary keyed for each leg of the thermodynamic cycle, either
|
||||||
``solvent`` and ``vaccuum` for a solvation free energy or
|
``solvent`` and ``vacuum` for a solvation free energy or
|
||||||
``solvent`` and ``complex`` for a binding free energy,
|
``solvent`` and ``complex`` for a binding free energy,
|
||||||
with each containing a list of dictionaries with the MBAR overlap
|
with each containing a list of dictionaries with the MBAR overlap
|
||||||
estimates of each repeat of that simulation type.
|
estimates of each repeat of that simulation type.
|
||||||
@@ -146,7 +146,7 @@ class AbsoluteProtocolResultMixin:
|
|||||||
-------
|
-------
|
||||||
repex_stats : dict[str, list[dict[str, npt.NDArray]]]
|
repex_stats : dict[str, list[dict[str, npt.NDArray]]]
|
||||||
A dictionary with keys for each leg of the thermodynamic cycle, either
|
A dictionary with keys for each leg of the thermodynamic cycle, either
|
||||||
``solvent`` and ``vaccuum` for a solvation free energy or
|
``solvent`` and ``vacuum` for a solvation free energy or
|
||||||
``solvent`` and ``complex`` for a binding free energy,
|
``solvent`` and ``complex`` for a binding free energy,
|
||||||
with each containing a list of dictionaries containing the replica
|
with each containing a list of dictionaries containing the replica
|
||||||
transition statistics for each repeat of that simulation type.
|
transition statistics for each repeat of that simulation type.
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
Base classes for the OpenMM absolute free energy ProtocolUnits.
|
Base classes for the OpenMM absolute free energy ProtocolUnits.
|
||||||
|
|
||||||
Thist mostly implements BaseAbsoluteUnit whose methods can be
|
This mostly implements BaseAbsoluteUnit whose methods can be
|
||||||
overriden to define different types of alchemical transformations.
|
overridden to define different types of alchemical transformations.
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
|||||||
@@ -56,7 +56,7 @@ class AlchemicalSettings(SettingsBaseModel):
|
|||||||
"""
|
"""
|
||||||
annihilate_sterics: bool = False
|
annihilate_sterics: bool = False
|
||||||
"""
|
"""
|
||||||
If True, sterics (Lennard-Jones) will be annhilated instead
|
If True, sterics (Lennard-Jones) will be annihilated instead
|
||||||
of decoupled. Default is False.
|
of decoupled. Default is False.
|
||||||
"""
|
"""
|
||||||
softcore_alpha: float = 0.5
|
softcore_alpha: float = 0.5
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ alchemical sampling methods:
|
|||||||
Current limitations
|
Current limitations
|
||||||
-------------------
|
-------------------
|
||||||
* Alchemical species with a net charge are not currently supported.
|
* Alchemical species with a net charge are not currently supported.
|
||||||
* Disapearing molecules are only allowed in state A.
|
* Disappearing molecules are only allowed in state A.
|
||||||
* Only small molecules are allowed to act as alchemical molecules.
|
* Only small molecules are allowed to act as alchemical molecules.
|
||||||
|
|
||||||
Acknowledgements
|
Acknowledgements
|
||||||
@@ -254,7 +254,7 @@ class AbsoluteBindingProtocol(gufe.Protocol):
|
|||||||
|
|
||||||
if not isinstance(diff[0][0], SmallMoleculeComponent):
|
if not isinstance(diff[0][0], SmallMoleculeComponent):
|
||||||
errmsg = (
|
errmsg = (
|
||||||
"Only dissapearing small molecule components "
|
"Only disappearing small molecule components "
|
||||||
"are supported by this protocol. "
|
"are supported by this protocol. "
|
||||||
f"Found a {type(diff[0][0])}"
|
f"Found a {type(diff[0][0])}"
|
||||||
)
|
)
|
||||||
@@ -366,7 +366,7 @@ class AbsoluteBindingProtocol(gufe.Protocol):
|
|||||||
)
|
)
|
||||||
|
|
||||||
# If the complex restraints schedule is all zero, it might be bad
|
# If the complex restraints schedule is all zero, it might be bad
|
||||||
# but we don't dissallow it.
|
# but we don't disallow it.
|
||||||
if all([i == 0.0 for i in self.settings.complex_lambda_settings.lambda_restraints]):
|
if all([i == 0.0 for i in self.settings.complex_lambda_settings.lambda_restraints]):
|
||||||
wmsg = (
|
wmsg = (
|
||||||
"No restraints are being applied in the complex phase, "
|
"No restraints are being applied in the complex phase, "
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ alchemical sampling methods:
|
|||||||
Current limitations
|
Current limitations
|
||||||
-------------------
|
-------------------
|
||||||
* Alchemical species with a net charge are not currently supported.
|
* Alchemical species with a net charge are not currently supported.
|
||||||
* Disapearing molecules are only allowed in state A. Support for
|
* Disappearing molecules are only allowed in state A. Support for
|
||||||
appearing molecules will be added in due course.
|
appearing molecules will be added in due course.
|
||||||
* Only small molecules are allowed to act as alchemical molecules.
|
* Only small molecules are allowed to act as alchemical molecules.
|
||||||
Alchemically changing protein or solvent components would induce
|
Alchemically changing protein or solvent components would induce
|
||||||
@@ -266,7 +266,7 @@ class AbsoluteSolvationProtocol(gufe.Protocol):
|
|||||||
# Make sure that the state A unique is an SMC
|
# Make sure that the state A unique is an SMC
|
||||||
if not isinstance(diff[0][0], SmallMoleculeComponent):
|
if not isinstance(diff[0][0], SmallMoleculeComponent):
|
||||||
errmsg = (
|
errmsg = (
|
||||||
"Only dissapearing SmallMoleculeComponents "
|
"Only disappearing SmallMoleculeComponents "
|
||||||
"are supported by this protocol. "
|
"are supported by this protocol. "
|
||||||
f"Found a {type(diff[0][0])}"
|
f"Found a {type(diff[0][0])}"
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -585,7 +585,7 @@ class PlainMDProtocolUnit(gufe.ProtocolUnit):
|
|||||||
solvent_comp, protein_comp, small_mols = system_validation.get_components(stateA)
|
solvent_comp, protein_comp, small_mols = system_validation.get_components(stateA)
|
||||||
|
|
||||||
# 1. Create stateA system
|
# 1. Create stateA system
|
||||||
# Create a dictionary of OFFMol for each SMC for bookeeping
|
# Create a dictionary of OFFMol for each SMC for bookkeeping
|
||||||
smc_components: dict[SmallMoleculeComponent, OFFMolecule]
|
smc_components: dict[SmallMoleculeComponent, OFFMolecule]
|
||||||
|
|
||||||
smc_components = {i: i.to_openff() for i in small_mols}
|
smc_components = {i: i.to_openff() for i in small_mols}
|
||||||
@@ -692,7 +692,7 @@ class PlainMDProtocolUnit(gufe.ProtocolUnit):
|
|||||||
if not output["last_checkpoint"].exists():
|
if not output["last_checkpoint"].exists():
|
||||||
output["last_checkpoint"] = None
|
output["last_checkpoint"] = None
|
||||||
|
|
||||||
# The NVT PDB can be ommitted if we don't run the simulation
|
# The NVT PDB can be omitted if we don't run the simulation
|
||||||
# Note: we could also just check the file exist
|
# Note: we could also just check the file exist
|
||||||
if (
|
if (
|
||||||
output_settings.equil_nvt_structure
|
output_settings.equil_nvt_structure
|
||||||
|
|||||||
@@ -216,7 +216,7 @@ class LambdaProtocol(object):
|
|||||||
if self.functions[function](0) != 0:
|
if self.functions[function](0) != 0:
|
||||||
raise ValueError("lambda functions must start at 0")
|
raise ValueError("lambda functions must start at 0")
|
||||||
if self.functions[function](1) != 1:
|
if self.functions[function](1) != 1:
|
||||||
raise ValueError("lambda fucntions must end at 1")
|
raise ValueError("lambda functions must end at 1")
|
||||||
|
|
||||||
# now validatate that it's monotonic
|
# now validatate that it's monotonic
|
||||||
global_lambda = np.linspace(0., 1., n)
|
global_lambda = np.linspace(0., 1., n)
|
||||||
@@ -268,7 +268,7 @@ class LambdaProtocol(object):
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
shedule : np.ndarray
|
schedule : np.ndarray
|
||||||
The lambda schedule to plot the function along. If ``None`` plot
|
The lambda schedule to plot the function along. If ``None`` plot
|
||||||
the one stored within this class. Default ``None``.
|
the one stored within this class. Default ``None``.
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -408,7 +408,7 @@ class HybridTopologyFactory:
|
|||||||
"""
|
"""
|
||||||
Convenience method to invert a dictionary (since we do it so often).
|
Convenience method to invert a dictionary (since we do it so often).
|
||||||
|
|
||||||
Paramters:
|
Parameters:
|
||||||
----------
|
----------
|
||||||
dictionary : dict
|
dictionary : dict
|
||||||
Dictionary you want to invert
|
Dictionary you want to invert
|
||||||
@@ -657,7 +657,7 @@ class HybridTopologyFactory:
|
|||||||
):
|
):
|
||||||
errmsg = (f"new index exceptions {new_indices} include "
|
errmsg = (f"new index exceptions {new_indices} include "
|
||||||
"unique new and environment atoms, which is "
|
"unique new and environment atoms, which is "
|
||||||
"dissallowed")
|
"disallowed")
|
||||||
raise AssertionError
|
raise AssertionError
|
||||||
|
|
||||||
def _handle_constraints(self):
|
def _handle_constraints(self):
|
||||||
@@ -710,7 +710,7 @@ class HybridTopologyFactory:
|
|||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
atm_map : dict[int, int]
|
atm_map : dict[int, int]
|
||||||
The atom map correspondance between the two Systems.
|
The atom map correspondence between the two Systems.
|
||||||
env_atoms: set[int]
|
env_atoms: set[int]
|
||||||
A list of environment atoms for the target System. This
|
A list of environment atoms for the target System. This
|
||||||
checks that no alchemical atoms are being tied to.
|
checks that no alchemical atoms are being tied to.
|
||||||
@@ -1940,7 +1940,7 @@ class HybridTopologyFactory:
|
|||||||
atom_pair[0], atom_pair[1])
|
atom_pair[0], atom_pair[1])
|
||||||
|
|
||||||
# TODO: work out why there's a bunch of commented out code here
|
# TODO: work out why there's a bunch of commented out code here
|
||||||
# Exerpt:
|
# Excerpt:
|
||||||
# If it's not handled by an exception in the original system, we
|
# If it's not handled by an exception in the original system, we
|
||||||
# just add the regular parameters as an exception
|
# just add the regular parameters as an exception
|
||||||
# TODO: this implies that the old-old nonbonded interactions (those
|
# TODO: this implies that the old-old nonbonded interactions (those
|
||||||
@@ -2142,7 +2142,7 @@ class HybridTopologyFactory:
|
|||||||
# If it's a subset of unique_new_atoms, then this is an
|
# If it's a subset of unique_new_atoms, then this is an
|
||||||
# intra-unique interaction and should have its exceptions
|
# intra-unique interaction and should have its exceptions
|
||||||
# specified in the regular nonbonded force. However, this is
|
# specified in the regular nonbonded force. However, this is
|
||||||
# handled elsewhere as above due to pecularities with exception
|
# handled elsewhere as above due to peculiarities with exception
|
||||||
# handling
|
# handling
|
||||||
if index_set.issubset(self._atom_classes['unique_new_atoms']):
|
if index_set.issubset(self._atom_classes['unique_new_atoms']):
|
||||||
continue
|
continue
|
||||||
@@ -2210,7 +2210,7 @@ class HybridTopologyFactory:
|
|||||||
def _handle_old_new_exceptions(self):
|
def _handle_old_new_exceptions(self):
|
||||||
"""
|
"""
|
||||||
Find the exceptions associated with old-old and old-core interactions,
|
Find the exceptions associated with old-old and old-core interactions,
|
||||||
as well as new-new and new-core interactions. Theses exceptions will
|
as well as new-new and new-core interactions. These exceptions will
|
||||||
be placed in CustomBondedForce that will interpolate electrostatics and
|
be placed in CustomBondedForce that will interpolate electrostatics and
|
||||||
a softcore potential.
|
a softcore potential.
|
||||||
|
|
||||||
|
|||||||
@@ -258,7 +258,7 @@ class RelativeHybridTopologyProtocol(gufe.Protocol):
|
|||||||
mapping : Optional[Union[ComponentMapping, list[ComponentMapping]]]
|
mapping : Optional[Union[ComponentMapping, list[ComponentMapping]]]
|
||||||
all mappings between transforming components.
|
all mappings between transforming components.
|
||||||
alchemical_components : dict[str, list[Component]]
|
alchemical_components : dict[str, list[Component]]
|
||||||
Dictionary contatining the alchemical components for
|
Dictionary containing the alchemical components for
|
||||||
states A and B.
|
states A and B.
|
||||||
|
|
||||||
Raises
|
Raises
|
||||||
|
|||||||
@@ -348,7 +348,7 @@ class HybridTopologySetupUnit(gufe.ProtocolUnit, HybridTopologyUnitMixin):
|
|||||||
Dictionary of OpenFF Molecules keyed by SmallMoleculeComponent
|
Dictionary of OpenFF Molecules keyed by SmallMoleculeComponent
|
||||||
to be present in system B.
|
to be present in system B.
|
||||||
mapping : LigandAtomMapping
|
mapping : LigandAtomMapping
|
||||||
LigandAtomMapping defining the correspondance betwee state A
|
LigandAtomMapping defining the correspondence between state A
|
||||||
and B's alchemical ligand.
|
and B's alchemical ligand.
|
||||||
stateA_topology : openmm.app.Topology
|
stateA_topology : openmm.app.Topology
|
||||||
The OpenMM topology for state A.
|
The OpenMM topology for state A.
|
||||||
@@ -479,7 +479,7 @@ class HybridTopologySetupUnit(gufe.ProtocolUnit, HybridTopologyUnitMixin):
|
|||||||
stateB_positions : openmm.unit.Quantity
|
stateB_positions : openmm.unit.Quantity
|
||||||
Positions of partials for state B System.
|
Positions of partials for state B System.
|
||||||
system_mapping : dict[str, dict[int, int]]
|
system_mapping : dict[str, dict[int, int]]
|
||||||
Dictionary of mappings defining the correspondance between
|
Dictionary of mappings defining the correspondence between
|
||||||
the two state Systems.
|
the two state Systems.
|
||||||
"""
|
"""
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
@@ -1058,7 +1058,7 @@ class HybridTopologyMultiStateSimulationUnit(gufe.ProtocolUnit, HybridTopologyUn
|
|||||||
}
|
}
|
||||||
|
|
||||||
# note we if/else around sampler method because in the future
|
# note we if/else around sampler method because in the future
|
||||||
# we will try to re-use this method and just have _SAMPLERs be
|
# we will try to reuse this method and just have _SAMPLERs be
|
||||||
# defined elsewhere
|
# defined elsewhere
|
||||||
sampler_method = simulation_settings.sampler_method.lower()
|
sampler_method = simulation_settings.sampler_method.lower()
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
Base classes for the equilibrium OpenMM SepTop free energy ProtocolUnits.
|
Base classes for the equilibrium OpenMM SepTop free energy ProtocolUnits.
|
||||||
|
|
||||||
Thist mostly implements BaseSepTopUnit whose methods can be
|
This mostly implements BaseSepTopUnit whose methods can be
|
||||||
overriden to define different types of alchemical transformations.
|
overridden to define different types of alchemical transformations.
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
----
|
----
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ class MultistateEquilFEAnalysis:
|
|||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
forward_reverse_samples : int
|
forward_reverse_samples : int
|
||||||
Number of samples to take in the foward and reverse analysis of
|
Number of samples to take in the forward and reverse analysis of
|
||||||
the free energies.
|
the free energies.
|
||||||
"""
|
"""
|
||||||
# Do things that get badly cached later
|
# Do things that get badly cached later
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ def convert_real_time_analysis_iterations(
|
|||||||
) -> tuple[Optional[int], Optional[int]]:
|
) -> tuple[Optional[int], Optional[int]]:
|
||||||
"""Convert time units in Settings to various other units
|
"""Convert time units in Settings to various other units
|
||||||
|
|
||||||
Interally openmmtools uses various quantities with units of time,
|
Internally openmmtools uses various quantities with units of time,
|
||||||
steps, and iterations.
|
steps, and iterations.
|
||||||
|
|
||||||
Our Settings objects instead have things defined in time (fs or ps).
|
Our Settings objects instead have things defined in time (fs or ps).
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ def get_system_generator(
|
|||||||
"""
|
"""
|
||||||
Create a SystemGenerator based on Protocol settings.
|
Create a SystemGenerator based on Protocol settings.
|
||||||
|
|
||||||
Paramters
|
Parameters
|
||||||
---------
|
---------
|
||||||
forcefield_settings : OpenMMSystemGeneratorFFSettings
|
forcefield_settings : OpenMMSystemGeneratorFFSettings
|
||||||
Force field settings, including necessary information
|
Force field settings, including necessary information
|
||||||
@@ -204,7 +204,7 @@ def get_omm_modeller(
|
|||||||
for comp, mol in small_mols.items():
|
for comp, mol in small_mols.items():
|
||||||
_add_small_mol(comp, mol, system_modeller, component_resids)
|
_add_small_mol(comp, mol, system_modeller, component_resids)
|
||||||
|
|
||||||
# Add solvent if neeeded
|
# Add solvent if needed
|
||||||
if solvent_comp is not None:
|
if solvent_comp is not None:
|
||||||
# Do unit conversions if necessary
|
# Do unit conversions if necessary
|
||||||
solvent_padding = None
|
solvent_padding = None
|
||||||
|
|||||||
@@ -208,7 +208,7 @@ class EvaluateBoreschAtoms(AnalysisBase):
|
|||||||
in that order.
|
in that order.
|
||||||
angle_force_constant : openff.units.Quantity
|
angle_force_constant : openff.units.Quantity
|
||||||
The force constant for the angle.
|
The force constant for the angle.
|
||||||
temperature : openff.units.Quanity
|
temperature : openff.units.Quantity
|
||||||
The system temperature in units compatible with Kelvin.
|
The system temperature in units compatible with Kelvin.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
@@ -567,7 +567,7 @@ def _get_lowest_variance_restraint_hostanchor(
|
|||||||
restraint atoms, in that order.
|
restraint atoms, in that order.
|
||||||
angle_force_constant : openff.units.Quantity
|
angle_force_constant : openff.units.Quantity
|
||||||
The force constant for the angle.
|
The force constant for the angle.
|
||||||
temperature : openff.units.Quanity
|
temperature : openff.units.Quantity
|
||||||
The system temperature in units compatible with Kelvin.
|
The system temperature in units compatible with Kelvin.
|
||||||
|
|
||||||
Returns
|
Returns
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ GUFEKEY_JSON_REGEX = re.compile('":gufe-key:": "(?P<token>[A-Za-z0-9_]+-[0-9a-f]
|
|||||||
|
|
||||||
class _ResultContainer(abc.ABC):
|
class _ResultContainer(abc.ABC):
|
||||||
"""
|
"""
|
||||||
Abstract class, represents all data under some level of the heirarchy.
|
Abstract class, represents all data under some level of the hierarchy.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, parent, path_component):
|
def __init__(self, parent, path_component):
|
||||||
@@ -143,7 +143,7 @@ class ResultClient(_ResultContainer):
|
|||||||
def store_transformation(self, transformation):
|
def store_transformation(self, transformation):
|
||||||
"""Store a :class:`.Transformation`.
|
"""Store a :class:`.Transformation`.
|
||||||
|
|
||||||
Parmeters
|
Parameters
|
||||||
---------
|
---------
|
||||||
transformation: :class:`.Transformation`
|
transformation: :class:`.Transformation`
|
||||||
the transformation to store
|
the transformation to store
|
||||||
@@ -153,7 +153,7 @@ class ResultClient(_ResultContainer):
|
|||||||
def store_network(self, network):
|
def store_network(self, network):
|
||||||
"""Store a :class:`.AlchemicalNetwork`.
|
"""Store a :class:`.AlchemicalNetwork`.
|
||||||
|
|
||||||
Parmeters
|
Parameters
|
||||||
---------
|
---------
|
||||||
network: :class:`.AlchemicalNetwork`
|
network: :class:`.AlchemicalNetwork`
|
||||||
the network to store
|
the network to store
|
||||||
@@ -165,7 +165,7 @@ class ResultClient(_ResultContainer):
|
|||||||
registry = {}
|
registry = {}
|
||||||
|
|
||||||
def recursive_build_object_cache(gufe_key):
|
def recursive_build_object_cache(gufe_key):
|
||||||
"""DFS to rebuild object heirarchy"""
|
"""DFS to rebuild object hierarchy"""
|
||||||
# This implementation is a bit fragile, because ensuring that we
|
# This implementation is a bit fragile, because ensuring that we
|
||||||
# don't duplicate objects in memory depends on the fact that
|
# don't duplicate objects in memory depends on the fact that
|
||||||
# `key_decode_dependencies` gets keyencoded objects from a cache
|
# `key_decode_dependencies` gets keyencoded objects from a cache
|
||||||
@@ -237,7 +237,7 @@ class ResultClient(_ResultContainer):
|
|||||||
def _load_next_level(self, transformation):
|
def _load_next_level(self, transformation):
|
||||||
return TransformationResult(self, transformation)
|
return TransformationResult(self, transformation)
|
||||||
|
|
||||||
# override these two inherited properies since this is always the end of
|
# override these two inherited properties since this is always the end of
|
||||||
# the recursive chain
|
# the recursive chain
|
||||||
@property
|
@property
|
||||||
def path(self):
|
def path(self):
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ class TestT4LysozymeTIP4PExtraSettingsDryRun(TestT4LysozymeDryRun):
|
|||||||
s.forcefield_settings.nonbonded_cutoff = 0.8 * offunit.nanometer
|
s.forcefield_settings.nonbonded_cutoff = 0.8 * offunit.nanometer
|
||||||
s.forcefield_settings.forcefields = [
|
s.forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
s.integrator_settings.reassign_velocities = True
|
s.integrator_settings.reassign_velocities = True
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ def test_validate_solvent_endstates_solvent_dissapearing(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
errmsg = "Only dissapearing small molecule components"
|
errmsg = "Only disappearing small molecule components"
|
||||||
with pytest.raises(ValueError, match=errmsg):
|
with pytest.raises(ValueError, match=errmsg):
|
||||||
AbsoluteBindingProtocol._validate_endstates(stateA, stateB)
|
AbsoluteBindingProtocol._validate_endstates(stateA, stateB)
|
||||||
|
|
||||||
|
|||||||
@@ -406,12 +406,12 @@ def test_setup_solv_benzene(benzene_system, protocol_dry_settings, tmpdir):
|
|||||||
def test_dry_run_vsite_fail(benzene_system, tmpdir, protocol_dry_settings):
|
def test_dry_run_vsite_fail(benzene_system, tmpdir, protocol_dry_settings):
|
||||||
protocol_dry_settings.vacuum_forcefield_settings.forcefields = [
|
protocol_dry_settings.vacuum_forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
protocol_dry_settings.solvent_forcefield_settings.forcefields = [
|
protocol_dry_settings.solvent_forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
protocol_dry_settings.solvation_settings.solvent_model = "tip4pew"
|
protocol_dry_settings.solvation_settings.solvent_model = "tip4pew"
|
||||||
@@ -451,12 +451,12 @@ def test_dry_run_vsite_fail(benzene_system, tmpdir, protocol_dry_settings):
|
|||||||
def test_setup_dry_sim_solv_benzene_tip4p(benzene_system, protocol_dry_settings, tmpdir):
|
def test_setup_dry_sim_solv_benzene_tip4p(benzene_system, protocol_dry_settings, tmpdir):
|
||||||
protocol_dry_settings.vacuum_forcefield_settings.forcefields = [
|
protocol_dry_settings.vacuum_forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
protocol_dry_settings.solvent_forcefield_settings.forcefields = [
|
protocol_dry_settings.solvent_forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
protocol_dry_settings.solvation_settings.solvent_model = "tip4pew"
|
protocol_dry_settings.solvation_settings.solvent_model = "tip4pew"
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ def test_validate_alchem_nonsmc(benzene_modifications):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
errmsg = "Only dissapearing SmallMoleculeComponents"
|
errmsg = "Only disappearing SmallMoleculeComponents"
|
||||||
with pytest.raises(ValueError, match=errmsg):
|
with pytest.raises(ValueError, match=errmsg):
|
||||||
AbsoluteSolvationProtocol._validate_endstates(stateA, stateB)
|
AbsoluteSolvationProtocol._validate_endstates(stateA, stateB)
|
||||||
|
|
||||||
|
|||||||
@@ -380,7 +380,7 @@ def test_dry_run_ligand_tip4p(benzene_system, tmpdir):
|
|||||||
settings.engine_settings.compute_platform = None
|
settings.engine_settings.compute_platform = None
|
||||||
settings.forcefield_settings.forcefields = [
|
settings.forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
# we need a larger padding distance when using the dodecahedron box
|
# we need a larger padding distance when using the dodecahedron box
|
||||||
|
|||||||
@@ -568,7 +568,7 @@ def tip4p_hybrid_factory(
|
|||||||
settings.engine_settings.compute_platform = None
|
settings.engine_settings.compute_platform = None
|
||||||
settings.forcefield_settings.forcefields = [
|
settings.forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
settings.solvation_settings.solvent_padding = 1.5 * unit.nanometer
|
settings.solvation_settings.solvent_padding = 1.5 * unit.nanometer
|
||||||
@@ -900,7 +900,7 @@ def test_setup_user_charges(benzene_modifications, vac_settings, tmpdir):
|
|||||||
prop_chgs = np.array(prop_chgs.split(), dtype=float)
|
prop_chgs = np.array(prop_chgs.split(), dtype=float)
|
||||||
np.testing.assert_allclose(prop_chgs, charge_array.m)
|
np.testing.assert_allclose(prop_chgs, charge_array.m)
|
||||||
|
|
||||||
# Create new smc with overriden charges
|
# Create new smc with overridden charges
|
||||||
benzene_offmol = benzene_modifications["benzene"].to_openff()
|
benzene_offmol = benzene_modifications["benzene"].to_openff()
|
||||||
toluene_offmol = benzene_modifications["toluene"].to_openff()
|
toluene_offmol = benzene_modifications["toluene"].to_openff()
|
||||||
benzene_rand_chg = assign_fictitious_charges(benzene_offmol)
|
benzene_rand_chg = assign_fictitious_charges(benzene_offmol)
|
||||||
@@ -910,7 +910,7 @@ def test_setup_user_charges(benzene_modifications, vac_settings, tmpdir):
|
|||||||
benzene_smc = openfe.SmallMoleculeComponent.from_openff(benzene_offmol)
|
benzene_smc = openfe.SmallMoleculeComponent.from_openff(benzene_offmol)
|
||||||
toluene_smc = openfe.SmallMoleculeComponent.from_openff(toluene_offmol)
|
toluene_smc = openfe.SmallMoleculeComponent.from_openff(toluene_offmol)
|
||||||
|
|
||||||
# Check that the new smcs have the new overriden charges
|
# Check that the new smcs have the new overridden charges
|
||||||
check_propchgs(benzene_smc, benzene_rand_chg)
|
check_propchgs(benzene_smc, benzene_rand_chg)
|
||||||
check_propchgs(toluene_smc, toluene_rand_chg)
|
check_propchgs(toluene_smc, toluene_rand_chg)
|
||||||
|
|
||||||
@@ -1001,7 +1001,7 @@ def test_virtual_sites_no_reassign(
|
|||||||
"""
|
"""
|
||||||
solv_settings.forcefield_settings.forcefields = [
|
solv_settings.forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
solv_settings.solvation_settings.solvent_padding = 1.0 * unit.nanometer
|
solv_settings.solvation_settings.solvent_padding = 1.0 * unit.nanometer
|
||||||
|
|||||||
@@ -952,7 +952,7 @@ def test_dry_run_benzene_toluene_tip4p(
|
|||||||
):
|
):
|
||||||
protocol_dry_settings.forcefield_settings.forcefields = [
|
protocol_dry_settings.forcefield_settings.forcefields = [
|
||||||
"amber/ff14SB.xml", # ff14SB protein force field
|
"amber/ff14SB.xml", # ff14SB protein force field
|
||||||
"amber/tip4pew_standard.xml", # FF we are testsing with the fun VS
|
"amber/tip4pew_standard.xml", # FF we are testing with the fun VS
|
||||||
"amber/phosaa10.xml", # Handles THE TPO
|
"amber/phosaa10.xml", # Handles THE TPO
|
||||||
]
|
]
|
||||||
protocol_dry_settings.solvent_solvation_settings.solvent_model = "tip4pew"
|
protocol_dry_settings.solvent_solvation_settings.solvent_model = "tip4pew"
|
||||||
|
|||||||
@@ -524,7 +524,7 @@ class TestStableSelection:
|
|||||||
|
|
||||||
def test_small_chain(self, t4_lysozyme_trajectory_universe):
|
def test_small_chain(self, t4_lysozyme_trajectory_universe):
|
||||||
"""
|
"""
|
||||||
Artifically set min_structure_size so large that no chains are recognised.
|
Artificially set min_structure_size so large that no chains are recognised.
|
||||||
"""
|
"""
|
||||||
stable_protein = stable_secondary_structure_selection(
|
stable_protein = stable_secondary_structure_selection(
|
||||||
atomgroup=t4_lysozyme_trajectory_universe.atoms,
|
atomgroup=t4_lysozyme_trajectory_universe.atoms,
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ def test_bad_mapping(atom_mapping_basic_test_files, lomap_old_mapper):
|
|||||||
next(mapping_gen)
|
next(mapping_gen)
|
||||||
|
|
||||||
|
|
||||||
# TODO: Remvoe these test when element changes are allowed - START
|
# TODO: Remove these test when element changes are allowed - START
|
||||||
def test_simple_no_element_changes(atom_mapping_basic_test_files, lomap_old_mapper):
|
def test_simple_no_element_changes(atom_mapping_basic_test_files, lomap_old_mapper):
|
||||||
# basic sanity check on the LigandAtomMapper
|
# basic sanity check on the LigandAtomMapper
|
||||||
mol1 = atom_mapping_basic_test_files["methylcyclohexane"]
|
mol1 = atom_mapping_basic_test_files["methylcyclohexane"]
|
||||||
@@ -101,4 +101,4 @@ def test_bas_mapping_no_element_changes(atom_mapping_basic_test_files, lomap_old
|
|||||||
next(mapping_gen)
|
next(mapping_gen)
|
||||||
|
|
||||||
|
|
||||||
# TODO: Remvoe these test when element changes are allowed - END
|
# TODO: Remove these test when element changes are allowed - END
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ from typing import Callable
|
|||||||
|
|
||||||
def requires_package(package_name: str) -> Callable:
|
def requires_package(package_name: str) -> Callable:
|
||||||
"""
|
"""
|
||||||
Helper function to denote that a funciton requires some optional
|
Helper function to denote that a function requires some optional
|
||||||
dependency. A function decorated with this decorator will raise
|
dependency. A function decorated with this decorator will raise
|
||||||
`MissingDependencyError` if the package is not found by
|
`MissingDependencyError` if the package is not found by
|
||||||
`importlib.import_module()`.
|
`importlib.import_module()`.
|
||||||
|
|||||||
Reference in New Issue
Block a user