BioSimSpace.Process.Plumed

class BioSimSpace.Process.Plumed(work_dir)[source]

A class for interfacing with PLUMED.

__init__(work_dir)[source]

Constructor.

Parameters:

work_dir (str) – The working directory of the process that is interfacing with PLUMED.

Methods

__init__(work_dir)

Constructor.

createConfig(system, protocol[, property_map])

Create a PLUMED configuration file.

getCollectiveVariable(index[, time_series])

Get the value of a collective variable.

getFreeEnergy([index, stride, kt])

Get the current free energy estimate.

getTime([time_series])

Get the simulation run time.

createConfig(system, protocol, property_map={})[source]

Create a PLUMED configuration file.

Parameters:
  • system (System) – A BioSimSpace system object.

  • protocol (Protocol.Metadynamics, Protocol.Steering, The metadynamics or steered molecular dynamics protocol.)

  • property_map (dict) – A dictionary that maps system “properties” to their user defined values. This allows the user to refer to properties with their own naming scheme, e.g. { “charge” : “my-charge” }

Returns:

config, auxiliary_files – The list of PLUMED configuration strings and paths to any auxiliary files required by the collective variables.

Return type:

[str], [str]

getCollectiveVariable(index, time_series=False)[source]

Get the value of a collective variable.

Parameters:
  • index (int) – The index of the collective variable (CV), or CV component. If there are a mixture of single and multi-component CVs, then they are indexed by the total number of components in the CV list that was passed to the protocol. For example, if there are two CVs, the first with one component and the second with two, then index 1 would refer to the first component of the second CV.

  • time_series (bool) – Whether to return a list of time series records.

Returns:

collective_variable – The value of the collective variable.

Return type:

Type

getFreeEnergy(index=None, stride=None, kt=1.0000 KT)[source]

Get the current free energy estimate.

Parameters:
  • index (int) – The index of the collective variable (CV), or CV component. If there are a mixture of single and multi-component CVs, then they are indexed by the total number of components in the CV list that was passed to the protocol. For example, if there are two CVs, the first with one component and the second with two, then index 1 would refer to the first component of the second CV. If None, then all variables and components will be considered.

  • stride (int) – The stride for integrating the free energy. This can be used to check for convergence.

  • kt (Energy) – The temperature in energy units for integrating out variables.

  • free_energies ([Type, …], [[Type, Type, …], …]) – The free energy estimate for the chosen collective variables.

getTime(time_series=False)[source]

Get the simulation run time.

Parameters:

time_series (bool) – Whether to return a list of time series records.

Returns:

time – The simulation run time.

Return type:

Time