From da6a1b5423cad6fae6f7a006b607b8767c5cd3a2 Mon Sep 17 00:00:00 2001 From: richard gowers Date: Tue, 13 Feb 2024 12:00:27 +0000 Subject: [PATCH 1/6] docs: remove Data Objects reference page GufeTokenizable isn't relevant to openfe docs --- docs/reference/api/data.rst | 13 ------------- docs/reference/api/index.rst | 1 - 2 files changed, 14 deletions(-) delete mode 100644 docs/reference/api/data.rst diff --git a/docs/reference/api/data.rst b/docs/reference/api/data.rst deleted file mode 100644 index ef438b2b8..000000000 --- a/docs/reference/api/data.rst +++ /dev/null @@ -1,13 +0,0 @@ -Data Objects and Serialization -============================== - -.. module:: gufe.tokenization - -Almost every OpenFE data object inherits from :class:`GufeTokenizable`, which -enforces immutability and provides functions for data serialization. - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - GufeTokenizable diff --git a/docs/reference/api/index.rst b/docs/reference/api/index.rst index 2ed7668ff..0dc69c329 100644 --- a/docs/reference/api/index.rst +++ b/docs/reference/api/index.rst @@ -6,7 +6,6 @@ OpenFE API Reference .. toctree:: :maxdepth: 2 - data systems_and_components ligand_network alchemical_network_planning From 99a94a683662d4f5557cbd6c41b78c49e971fa9c Mon Sep 17 00:00:00 2001 From: richard gowers Date: Tue, 13 Feb 2024 12:03:08 +0000 Subject: [PATCH 2/6] docs: remove Component from docs this is a base class which isn't immediately usable --- docs/reference/api/systems_and_components.rst | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/docs/reference/api/systems_and_components.rst b/docs/reference/api/systems_and_components.rst index 0732f4ce7..a7e1f8b96 100644 --- a/docs/reference/api/systems_and_components.rst +++ b/docs/reference/api/systems_and_components.rst @@ -10,11 +10,10 @@ We describe a chemical system as being made up of one or more "components," e.g. :nosignatures: :toctree: generated/ - Component - SmallMoleculeComponent - ProteinComponent - SolventComponent - ChemicalSystem + SmallMoleculeComponent + ProteinComponent + SolventComponent + ChemicalSystem Chemical System Generators From 51fb36787a191ece5e7566c63fe1ba42e8b86f64 Mon Sep 17 00:00:00 2001 From: richard gowers Date: Tue, 13 Feb 2024 12:03:24 +0000 Subject: [PATCH 3/6] docs: fixup reference in atom mappings docs --- docs/cookbook/creating_atom_mappings.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/cookbook/creating_atom_mappings.rst b/docs/cookbook/creating_atom_mappings.rst index 39286ae93..c5b36ae93 100644 --- a/docs/cookbook/creating_atom_mappings.rst +++ b/docs/cookbook/creating_atom_mappings.rst @@ -5,7 +5,7 @@ Creating Atom Mappings Once your :ref:`data has been loaded` we can now proceed to defining how Components in these Systems correspond. -``Mapping`` objects are used to defined how ``Component`` objects from different :class:`ChemicalSystems` are related. +``Mapping`` objects are used to defined how ``Component`` objects from different :class:`.ChemicalSystem` objects are related. This guide will show how this concept applies to the case of a pair of ligands we wish to transform between. Generating Mappings From 4a2cf82694c0ad64adb72b1f4792fd8dd4481bba Mon Sep 17 00:00:00 2001 From: richard gowers Date: Tue, 13 Feb 2024 15:00:17 +0000 Subject: [PATCH 4/6] docs: add openmm_md protocol page stub split ligand_network page into two first atom mappings and scorers then entire page to ligand networks --- docs/reference/api/atom_mappers.rst | 80 +++++++++++++++++++++++++++ docs/reference/api/index.rst | 2 + docs/reference/api/ligand_network.rst | 80 --------------------------- docs/reference/api/openmm_md.rst | 21 +++++++ 4 files changed, 103 insertions(+), 80 deletions(-) create mode 100644 docs/reference/api/atom_mappers.rst create mode 100644 docs/reference/api/openmm_md.rst diff --git a/docs/reference/api/atom_mappers.rst b/docs/reference/api/atom_mappers.rst new file mode 100644 index 000000000..ec31b609b --- /dev/null +++ b/docs/reference/api/atom_mappers.rst @@ -0,0 +1,80 @@ +.. _Atom Mappers: + +Atom Mappings +============= + +Tools for mapping atoms in one molecule to those in another. Used to generate efficient ligand networks. + +.. module:: openfe.setup.atom_mapping + +.. rubric:: Abstract Base Class + +.. autosummary:: + :nosignatures: + :toctree: generated/ + + LigandAtomMapper + +.. rubric:: Implementations + +.. autosummary:: + :nosignatures: + :toctree: generated/ + + LomapAtomMapper + PersesAtomMapper + +.. rubric:: Data Types + +.. autosummary:: + :nosignatures: + :toctree: generated/ + + LigandAtomMapping + +.. _Atom Map Scorers: + +Atom Map Scorers +---------------- + +Scoring functions for a mapping between ligands. These are used as objective functions for :any:`Ligand Network Planners`. + + +Lomap Scorers +~~~~~~~~~~~~~ + +Scorers implemented by the `LOMAP `_ package. + +.. apparently we need the atom_mapping because internally autofunction is + trying ``import openfe.setup.lomap_scorers``, which doesn't work (whereas + ``from openfe.setup import lomap_scorers`` does) +.. module:: openfe.setup.atom_mapping.lomap_scorers + +.. autosummary:: + :nosignatures: + :toctree: generated/ + + default_lomap_score + ecr_score + mcsr_score + mncar_score + atomic_number_score + hybridization_score + sulfonamides_score + heterocycles_score + transmuting_methyl_into_ring_score + transmuting_ring_sizes_score + + +Perses Scorers +~~~~~~~~~~~~~~ + +Scorers implemented by the `Perses `_ package. + +.. module:: openfe.setup.atom_mapping.perses_scorers + +.. autosummary:: + :nosignatures: + :toctree: generated/ + + default_perses_scorer diff --git a/docs/reference/api/index.rst b/docs/reference/api/index.rst index 0dc69c329..b32e006df 100644 --- a/docs/reference/api/index.rst +++ b/docs/reference/api/index.rst @@ -7,8 +7,10 @@ OpenFE API Reference :maxdepth: 2 systems_and_components + atom_mappers ligand_network alchemical_network_planning defining_and_executing_simulations openmm_rfe openmm_solvation_afe + openmm_md diff --git a/docs/reference/api/ligand_network.rst b/docs/reference/api/ligand_network.rst index bdc593fd2..67096e85f 100644 --- a/docs/reference/api/ligand_network.rst +++ b/docs/reference/api/ligand_network.rst @@ -52,83 +52,3 @@ Functions to load a :class:`.LigandNetwork` from equivalent classes in other pac load_orion_network load_fepplus_network -.. _Atom Mappers: - -Atom Mappings -------------- - -Tools for mapping atoms in one molecule to those in another. Used to generate efficient ligand networks. - -.. module:: openfe.setup.atom_mapping - -.. rubric:: Abstract Base Class - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - LigandAtomMapper - -.. rubric:: Implementations - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - LomapAtomMapper - PersesAtomMapper - -.. rubric:: Data Types - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - LigandAtomMapping - -.. _Atom Map Scorers: - -Atom Map Scorers ----------------- - -Scoring functions for a mapping between ligands. These are used as objective functions for :any:`Ligand Network Planners`. - - -Lomap Scorers -~~~~~~~~~~~~~ - -Scorers implemented by the `LOMAP `_ package. - -.. apparently we need the atom_mapping because internally autofunction is - trying ``import openfe.setup.lomap_scorers``, which doesn't work (whereas - ``from openfe.setup import lomap_scorers`` does) -.. module:: openfe.setup.atom_mapping.lomap_scorers - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - default_lomap_score - ecr_score - mcsr_score - mncar_score - atomic_number_score - hybridization_score - sulfonamides_score - heterocycles_score - transmuting_methyl_into_ring_score - transmuting_ring_sizes_score - - -Perses Scorers -~~~~~~~~~~~~~~ - -Scorers implemented by the `Perses `_ package. - -.. module:: openfe.setup.atom_mapping.perses_scorers - -.. autosummary:: - :nosignatures: - :toctree: generated/ - - default_perses_scorer diff --git a/docs/reference/api/openmm_md.rst b/docs/reference/api/openmm_md.rst new file mode 100644 index 000000000..bbe494fcb --- /dev/null +++ b/docs/reference/api/openmm_md.rst @@ -0,0 +1,21 @@ +OpenMM Molecular Dynamics Protocol +================================== + +This Protocol implements a standard MD execution for a solvated protein system. + +Protocol Settings +----------------- + +.. module:: openfe.protocols.openmm_md + +.. autopydantic_model:: PlainMDProtocolSettings + :model-show-json: False + :model-show-field-summary: False + :model-show-config-member: False + :model-show-config-summary: False + :model-show-validator-members: False + :model-show-validator-summary: False + :field-list-validators: False + :inherited-members: SettingsBaseModel + :exclude-members: get_defaults + :member-order: bysource From 8a7cece95707899f80755240e977a0fd94e6ebcd Mon Sep 17 00:00:00 2001 From: richard gowers Date: Thu, 15 Feb 2024 13:53:05 +0000 Subject: [PATCH 5/6] add openmmtools dep to docs env --- docs/environment.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/environment.yaml b/docs/environment.yaml index 0933cca80..47117c667 100644 --- a/docs/environment.yaml +++ b/docs/environment.yaml @@ -10,6 +10,7 @@ dependencies: - openff-toolkit >=0.13.0 - openff-units - openmm +- openmmtools - packaging - plugcli - python=3.10 From 1562674b4308b891ad98cd0121f80199ab56fe2a Mon Sep 17 00:00:00 2001 From: richard gowers Date: Thu, 15 Feb 2024 14:25:12 +0000 Subject: [PATCH 6/6] remove openmmtools, mock pymbar import --- docs/conf.py | 3 ++- docs/environment.yaml | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index c107a40f5..f32519365 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -103,9 +103,10 @@ autodoc_mock_imports = [ "matplotlib", - "openmmtools", "mdtraj", "openmmforcefields", + "openmmtools", + "pymbar", ] # Extensions for the myst parser diff --git a/docs/environment.yaml b/docs/environment.yaml index 47117c667..0933cca80 100644 --- a/docs/environment.yaml +++ b/docs/environment.yaml @@ -10,7 +10,6 @@ dependencies: - openff-toolkit >=0.13.0 - openff-units - openmm -- openmmtools - packaging - plugcli - python=3.10