Protocols in OpenFE#

A Protocol is a computational method for estimating the free energy difference between two chemical systems.

Just as there are multiple possible methods for estimating free energy differences, there are multiple available Protocols to choose from.

For example, included in the openfe package are the following:

More protocols are in development, and a full list of available protocols can be found at Details of Specific Protocols.

Because Protocols share a common interface for how they are created and executed, it is relatively straightforward to try out a new method, or benchmark several to choose the best for a particular project.

Defining Settings and Creating Protocols#

A Settings object contains all the parameters needed by a Protocol. Each Protocol has a .default_settings() method, which will provide a sensible default starting point and relevant documentation.

For example, to create an instance of the OpenMM RFE Protocol with default settings:

from openfe.protocols import openmm_rfe

settings = openmm_rfe.RelativeHybridTopologyProtocol.default_settings()
protocol = openmm_rfe.RelativeHybridTopologyProtocol(settings)

Protocol objects cannot be modified once created. This is crucial for data provenance. Therefore, the Settings objects must be customised before the Protocol object is created. For example, to customise the production run length of the RFE Protocol:

from openfe.protocols import openmm_rfe

settings = openmm_rfe.RelativeHybridTopologyProtocol.default_settings()
settings.simulation_settings.production_length = '10 ns'

protocol = openmm_rfe.RelativeHybridTopologyProtocol(settings)

Creating Transformations from Protocols#

With only settings defined, a Protocol contains no chemistry-specific information. This means that a single Protocol object can be applied to multiple pairs of ChemicalSystem objects to measure each free energy difference.

The Transformation class connects two ChemicalSystem objects with a Protocol, and often a AtomMapping (depending on the system).

A Transformation object is then capable of creating computational work via the Transformation.create() method. For further details on this, refer to the Execution section.

Finally, a Protocol is responsible for using the data generated in this process to perform further analysis, such as generating an estimate of the free energy difference. For further details on this refer to the Results Gathering section, or the details of each method in Details of Specific Protocols.