Skip to content

Commit

Permalink
Merge pull request #766 from OpenFreeEnergy/issue-742
Browse files Browse the repository at this point in the history
Fixing API settings things
  • Loading branch information
richardjgowers authored Mar 11, 2024
2 parents 8c39a2e + fd91902 commit 663019b
Show file tree
Hide file tree
Showing 10 changed files with 247 additions and 128 deletions.
1 change: 1 addition & 0 deletions docs/reference/api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ OpenFE API Reference
openmm_rfe
openmm_solvation_afe
openmm_md
openmm_protocol_settings
26 changes: 22 additions & 4 deletions docs/reference/api/openmm_md.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
OpenMM Molecular Dynamics Protocol
==================================
OpenMM Molecular Dynamics (MD) Protocol
=======================================

.. _md protocol api:

A Protocol for running MD simulation using OpenMM.


Protocol API Specification
--------------------------

.. module:: openfe.protocols.openmm_md

.. autosummary::
:nosignatures:
:toctree: generated/

PlainMDProtocol
PlainMDProtocolUnit
PlainMDProtocolResult

This Protocol implements a standard MD execution for a solvated protein system.

Protocol Settings
-----------------

.. module:: openfe.protocols.openmm_md
.. module:: openfe.protocols.openmm_md.plain_md_settings

.. autopydantic_model:: PlainMDProtocolSettings
:model-show-json: False
Expand All @@ -19,3 +36,4 @@ Protocol Settings
:inherited-members: SettingsBaseModel
:exclude-members: get_defaults
:member-order: bysource

145 changes: 145 additions & 0 deletions docs/reference/api/openmm_protocol_settings.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
OpenMM Protocol Settings
========================

This page documents the Settings classes used by OpenMM-based Protocols.

Details on which of these Settings classes are used by a given Protocol
can be found on the individual Protocol API reference documentation pages:

* :ref:`OpenMM Absolute Solvation Free Energy <afe solvation protocol api>`
* :ref:`OpenMM Relative Free Energy <rfe protocol api>`
* :ref:`OpenMM Molecular Dynamics Protocol <md protocol api>`


Shared OpenMM Protocol Settings
-------------------------------

The following are Settings clases which are shared between multiple
OpenMM-based Protocols. Please note that not all Protocols use these
Settings classes.


.. module:: openfe.protocols.openmm_utils.omm_settings

.. autopydantic_model:: IntegratorSettings
: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
:member-order: bysource

.. autopydantic_model:: MDOutputSettings
: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
:member-order: bysource

.. autopydantic_model:: MDSimulationSettings
: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
:member-order: bysource

.. autopydantic_model:: OpenMMEngineSettings
: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
:member-order: bysource

.. autopydantic_model:: OpenFFPartialChargeSettings
: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
:member-order: bysource

.. autopydantic_model:: OpenMMSolvationSettings
: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
:member-order: bysource

.. autopydantic_model:: OpenMMSystemGeneratorFFSettings
: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
:member-order: bysource

.. autopydantic_model:: ThermoSettings
: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
:member-order: bysource


Shared MultiState OpenMM Protocol Settings
------------------------------------------

Protocol Settings shared between MultiState simulation protocols.

These currently include the following Protocols:

* :ref:`OpenMM Absolute Solvation Free Energy <afe solvation protocol api>`
* :ref:`OpenMM Relative Free Energy <rfe protocol api>`


.. autopydantic_model:: MultiStateOutputSettings
: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
:member-order: bysource

.. autopydantic_model:: MultiStateSimulationSettings
: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
:member-order: bysource

62 changes: 8 additions & 54 deletions docs/reference/api/openmm_rfe.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OpenMM Relative Free Energy Protocol
====================================

.. _rfe protocol api:

This section provides details about the OpenMM Relative Free Energy Protocol
implemented in OpenFE.

Expand All @@ -14,6 +16,7 @@ Protocol API specification
:toctree: generated/

RelativeHybridTopologyProtocol
RelativeHybridTopologyProtocolUnit
RelativeHybridTopologyProtocolResult

Protocol Settings
Expand All @@ -34,29 +37,13 @@ Below are the settings which can be tweaked in the protocol. The default setting
:exclude-members: get_defaults
:member-order: bysource

.. module:: openfe.protocols.openmm_rfe.equil_rfe_settings

.. autopydantic_model:: OpenMMSystemGeneratorFFSettings
: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
:member-order: bysource
Protocol Specific Settings Classes
----------------------------------

.. autopydantic_model:: ThermoSettings
: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
:member-order: bysource
Below are Settings classes which are unique to the `RelativeHybridTopologyProtocol`.

.. module:: openfe.protocols.openmm_rfe.equil_rfe_settings

.. autopydantic_model:: AlchemicalSettings
:model-show-json: False
Expand All @@ -79,36 +66,3 @@ Below are the settings which can be tweaked in the protocol. The default setting
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource

.. autopydantic_model:: OpenMMEngineSettings
: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
:member-order: bysource

.. autopydantic_model:: IntegratorSettings
: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
:member-order: bysource

.. autopydantic_model:: MultiStateSimulationSettings
: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
:member-order: bysource
61 changes: 11 additions & 50 deletions docs/reference/api/openmm_solvation_afe.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
OpenMM Absolute Solvation Free Energy Protocol
==============================================

.. _afe solvation protocol api:

This section provides details about the OpenMM Absolute Solvation Free Energy Protocol
implemented in OpenFE.

Expand All @@ -14,6 +16,8 @@ Protocol API specification
:toctree: generated/

AbsoluteSolvationProtocol
AbsoluteSolvationVacuumUnit
AbsoluteSolvationSolventUnit
AbsoluteSolvationProtocolResult

Protocol Settings
Expand All @@ -25,7 +29,7 @@ Below are the settings which can be tweaked in the protocol. The default setting

.. module:: openfe.protocols.openmm_afe.equil_afe_settings

.. autopydantic_model:: OpenMMSystemGeneratorFFSettings
.. autopydantic_model:: AbsoluteSolvationSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
Expand All @@ -34,58 +38,17 @@ Below are the settings which can be tweaked in the protocol. The default setting
:model-show-validator-summary: False
:field-list-validators: False
:inherited-members: SettingsBaseModel
:exclude-members: get_defaults
:member-order: bysource
:noindex:

.. autopydantic_model:: ThermoSettings
: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
:member-order: bysource
:noindex:

.. autopydantic_model:: AlchemicalSettings
: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
:member-order: bysource
:noindex:
Protocol Specific Settings Classes
----------------------------------

.. autopydantic_model:: LambdaSettings
: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
:member-order: bysource
:noindex:
Below are Settings classes which are unique to the `AbsoluteSolvationProtocol`.

.. autopydantic_model:: OpenMMEngineSettings
: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
:member-order: bysource
:noindex:

.. autopydantic_model:: IntegratorSettings
.. autopydantic_model:: AlchemicalSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
Expand All @@ -95,9 +58,8 @@ Below are the settings which can be tweaked in the protocol. The default setting
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:

.. autopydantic_model:: MultiStateSimulationSettings
.. autopydantic_model:: LambdaSettings
:model-show-json: False
:model-show-field-summary: False
:model-show-config-member: False
Expand All @@ -107,4 +69,3 @@ Below are the settings which can be tweaked in the protocol. The default setting
:field-list-validators: False
:inherited-members: SettingsBaseModel
:member-order: bysource
:noindex:
Loading

0 comments on commit 663019b

Please sign in to comment.