# LigandReceptorYankProtocol

class `propertyestimator.protocols.yank.``LigandReceptorYankProtocol`(protocol_id)

  A protocol for performing ligand-receptor alchemical free energy calculations using the YANK framework.

  `__init__`(protocol_id)

    Constructs a new LigandReceptorYankProtocol object.

  Methods

  `__init__`(protocol_id) | Constructs a new LigandReceptorYankProtocol object.
  `apply_replicator`(replicator, template_values) | Applies a ProtocolReplicator to this protocol.
  `can_merge`(other[, path_replacements]) | Determines whether this protocol can be merged with another.
  `execute`(directory, available_resources) | Execute the protocol.
  `get_class_attribute`(reference_path) | Returns one of this protocols, or any of its children’s, attributes directly (rather than its value).
  `get_value`(reference_path) | Returns the value of one of this protocols inputs / outputs.
  `get_value_references`(input_path) | Returns a dictionary of references to the protocols which one of this protocols inputs (specified by input_path) takes its value from.
  `merge`(other) | Merges another BaseProtocol with this one.
  `replace_protocol`(old_id, new_id) | Finds each input which came from a given protocol
  `set_uuid`(value) | Store the uuid of the calculation this protocol belongs to
  `set_value`(reference_path, value) | Sets the value of one of this protocols inputs.

  Attributes

  `allow_merging` | Protocol Input - Defines whether this protocols is allowed to merge with other protocols.
  `apply_restraints` | Protocol Input - Determines whether the ligand should be explicitly restrained to the receptor in order to stop the ligand from temporarily unbinding.
  `checkpoint_interval` | Protocol Input - The number of iterations between saving YANK checkpoint files.
  `dependencies` | A list of pointers to the protocols which this protocol takes input from.
  `estimated_free_energy` | Protocol Output - The estimated free energy value and its uncertainty returned by YANK.
  `force_field_path` | Protocol Input - The path to the force field which defines the charge method to use for the calculation.
  `id` | The unique id of this protocol.
  `ligand_residue_name` | Protocol Input - The residue name of the ligand.
  `number_of_equilibration_iterations` | Protocol Input - The number of iterations used for equilibration before production run.
  `number_of_iterations` | Protocol Input - The number of YANK iterations to perform.
  `receptor_residue_name` | Protocol Input - The residue name of the receptor.
  `restraint_type` | Protocol Input - The type of ligand restraint applied, provided that apply_restraints is True The default value of this attribute is `RestraintType.Harmonic`.
  `schema` | A serializable schema for this object.
  `setup_only` | Protocol Input - If true, YANK will only create and validate the setup files, but not actually run any simulations.
  `solvated_complex_coordinates` | Protocol Input - The file path to the solvated complex coordinates.
  `solvated_complex_system` | Protocol Input - The file path to the solvated complex system object.
  `solvated_complex_trajectory_path` | Protocol Output - The file path to the generated ligand trajectory.
  `solvated_ligand_coordinates` | Protocol Input - The file path to the solvated ligand coordinates.
  `solvated_ligand_system` | Protocol Input - The file path to the solvated ligand system object.
  `solvated_ligand_trajectory_path` | Protocol Output - The file path to the generated ligand trajectory.
  `steps_per_iteration` | Protocol Input - The number of steps per YANK iteration to perform.
  `thermodynamic_state` | Protocol Input - The state at which to run the calculations.
  `timestep` | Protocol Input - The length of the timestep to take.
  `verbose` | Protocol Input - Controls whether or not to run YANK at high verbosity.

  class `RestraintType`

    The types of ligand restraints available within yank.

  `ligand_residue_name`

    Protocol Input - The residue name of the ligand. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `receptor_residue_name`

    Protocol Input - The residue name of the receptor. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `solvated_ligand_coordinates`

    Protocol Input - The file path to the solvated ligand coordinates. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `solvated_ligand_system`

    Protocol Input - The file path to the solvated ligand system object. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `solvated_complex_coordinates`

    Protocol Input - The file path to the solvated complex coordinates. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `solvated_complex_system`

    Protocol Input - The file path to the solvated complex system object. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `force_field_path`

    Protocol Input - The path to the force field which defines the charge method to use for the calculation. The default value of this attribute is not set and must be set by the user..

    Type

      str

  `apply_restraints`

    Protocol Input - Determines whether the ligand should be explicitly restrained to the receptor in order to stop the ligand from temporarily unbinding. The default value of this attribute is `True`.

    Type

      bool

  `restraint_type`

    Protocol Input - The type of ligand restraint applied, provided that apply_restraints is True The default value of this attribute is `RestraintType.Harmonic`.

    Type

      LigandReceptorYankProtocol.RestraintType

  `solvated_ligand_trajectory_path`

    Protocol Output - The file path to the generated ligand trajectory.

    Type

      str

  `solvated_complex_trajectory_path`

    Protocol Output - The file path to the generated ligand trajectory.

    Type

      str

  `execute`(directory, available_resources)

    Execute the protocol.

    Protocols may be chained together by passing the output of previous protocols as input to the current one.

    Parameters

      - directory (str) – The directory to store output data in.

      - available_resources (ComputeResources) – The resources available to execute on.

    Returns

      The output of the execution.

    Return type

      Dict[str, Any]

  `allow_merging`

    Protocol Input - Defines whether this protocols is allowed to merge with other protocols. The default value of this attribute is `True`.

    Type

      bool

  `apply_replicator`(replicator, template_values, template_index=-1, template_value=None, update_input_references=False)

    Applies a ProtocolReplicator to this protocol. This method should clone any protocols whose id contains the id of the replicator (in the format $(replicator.id)).

    Parameters

      - replicator (ProtocolReplicator) – The replicator to apply.

      - template_values (list of Any) –

        A list of the values which will be inserted into the newly replicated protocols.

        This parameter is mutually exclusive with template_index and template_value

      - template_index (int , optional) –

        A specific value which should be used for any protocols flagged as to be replicated by the replicator. This option is mainly used when replicating children of an already replicated protocol.

        This parameter is mutually exclusive with template_values and must be set along with a template_value.

      - template_value (Any, optional) –

        A specific index which should be used for any protocols flagged as to be replicated by the replicator. This option is mainly used when replicating children of an already replicated protocol.

        This parameter is mutually exclusive with template_values and must be set along with a template_index.

      - update_input_references (bool) –

        If true, any protocols which take their input from a protocol which was flagged for replication will be updated to take input from the actually replicated protocol. This should only be set to true if this protocol is not nested within a workflow or a protocol group.

        This option cannot be used when a specific template_index or template_value is providied.

    Returns

      A dictionary of references to all of the protocols which have been replicated, with keys of original protocol ids. Each value is comprised of a list of the replicated protocol ids, and their index into the template_values array.

    Return type

      dict of ProtocolPath and list of tuple of ProtocolPath and int

  `can_merge`(other, path_replacements=None)

    Determines whether this protocol can be merged with another.

    Parameters

      - other (`BaseProtocol`) – The protocol to compare against.

      - path_replacements (list of tuple of str, optional) – Replacements to make in any value reference protocol paths before comparing for equality.

    Returns

      True if the two protocols are safe to merge.

    Return type

      bool

  `checkpoint_interval`

    Protocol Input - The number of iterations between saving YANK checkpoint files. The default value of this attribute is `50`. When two protocols are merged, the largest value of this attribute from either protocol is retained.

    Type

      int

  property `dependencies`

    A list of pointers to the protocols which this protocol takes input from.

    Type

      list of ProtocolPath

  `estimated_free_energy`

    Protocol Output - The estimated free energy value and its uncertainty returned by YANK.

    Type

      EstimatedQuantity

  `get_class_attribute`(reference_path)

    Returns one of this protocols, or any of its children’s, attributes directly (rather than its value).

    Parameters

      reference_path (ProtocolPath) – The path pointing to the attribute to return.

    Returns

      The class attribute.

    Return type

      object

  `get_value`(reference_path)

    Returns the value of one of this protocols inputs / outputs.

    Parameters

      reference_path (ProtocolPath) – The path pointing to the value to return.

    Returns

      The value of the input / output

    Return type

      Any

  `get_value_references`(input_path)

    Returns a dictionary of references to the protocols which one of this protocols inputs (specified by input_path) takes its value from.

    Notes

    Currently this method only functions correctly for an input value which is either currently a `ProtocolPath`, or a list / dict which contains at least one `ProtocolPath`.

    Parameters

      input_path (`propertyestimator.workflow.utils.ProtocolPath`) – The input value to check.

    Returns

      A dictionary of the protocol paths that the input targeted by input_path depends upon.

    Return type

      dict of ProtocolPath and ProtocolPath

  property `id`

    The unique id of this protocol.

    Type

      str

  `merge`(other)

    Merges another BaseProtocol with this one. The id of this protocol will remain unchanged.

    It is assumed that can_merge has already returned that these protocols are compatible to be merged together.

    Parameters

      other (BaseProtocol) – The protocol to merge into this one.

    Returns

      A map between any original protocol ids and their new merged values.

    Return type

      Dict[str, str]

  `number_of_equilibration_iterations`

    Protocol Input - The number of iterations used for equilibration before production run. Only post-equilibration iterations are written to file. The default value of this attribute is `1`.

    Type

      int

  `number_of_iterations`

    Protocol Input - The number of YANK iterations to perform. The default value of this attribute is `5000`.

    Type

      int

  `replace_protocol`(old_id, new_id)
    Finds each input which came from a given protocol

      and redirects it to instead take input from a new one.

    Notes

    This method is mainly intended to be used only when merging multiple protocols into one.

    Parameters

      - old_id (str) – The id of the old input protocol.

      - new_id (str) – The id of the new input protocol.

  property `schema`

    A serializable schema for this object.

    Type

      ProtocolSchema

  `set_uuid`(value)

    Store the uuid of the calculation this protocol belongs to

    Parameters

      value (str) – The uuid of the parent calculation.

  `set_value`(reference_path, value)

    Sets the value of one of this protocols inputs.

    Parameters

      - reference_path (ProtocolPath) – The path pointing to the value to return.

      - value (Any) – The value to set.

  `setup_only`

    Protocol Input - If true, YANK will only create and validate the setup files, but not actually run any simulations. This argument is mainly only to be used for testing purposes. The default value of this attribute is `False`.

    Type

      bool

  `steps_per_iteration`

    Protocol Input - The number of steps per YANK iteration to perform. The default value of this attribute is `500`.

    Type

      int

  `thermodynamic_state`

    Protocol Input - The state at which to run the calculations. The default value of this attribute is not set and must be set by the user..

    Type

      ThermodynamicState

  `timestep`

    Protocol Input - The length of the timestep to take. The default value of this attribute is `2 femtosecond`. When two protocols are merged, the largest value of this attribute from either protocol is retained.

    Type

      Quantity

  `verbose`

    Protocol Input - Controls whether or not to run YANK at high verbosity. The default value of this attribute is `False`.

    Type

      bool