BioSimSpace.FreeEnergy.Binding

class BioSimSpace.FreeEnergy.Binding(system_bound, system_free=None, protocol=None, work_dir=None, engine=None, setup_only=False, property_map={}, ignore_warnings=False, show_errors=True)

A class for configuring and running binding free energy simulations.

__init__(system_bound, system_free=None, protocol=None, work_dir=None, engine=None, setup_only=False, property_map={}, ignore_warnings=False, show_errors=True)

Constructor.

Parameters
  • system_bound (System) – The molecular system for the bound leg.

  • system_free (System) – The molecular system for the free leg. If None, then the free leg is omitted.

  • protocol (Protocol.FreeEnergy, [Protocol.FreeEnergy,) – Protocol.FreeEnergy] The simulation protocol. If one obect is passed, then the same protocol will be used for both legs of the simulation. Passing two objects enables a different protocol for each leg, e.g. a different lambda schedule, or run time.

  • work_dir (str) – The working directory for the simulation.

  • engine (str) – The molecular dynamics engine used to run the simulation. Available options are “GROMACS”, or “SOMD”. If this argument is omitted then BioSimSpace will choose an appropriate engine for you.

  • setup_only (bool) – Whether to only support simulation setup. If True, then no simulation processes objects will be created, only the directory hierarchy and input files to run a simulation externally. This can be useful when you don’t intend to use BioSimSpace to run the simulation. Note that a ‘work_dir’ must also be specified.

  • 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” }

  • ignore_warnings (bool) – Whether to ignore warnings when generating the binary run file. This option is specific to GROMACS and will be ignored when a different molecular dynamics engine is chosen.

  • show_errors (bool) – Whether to show warning/error messages when generating the binary run file. This option is specific to GROMACS and will be ignored when a different molecular dynamics engine is chosen.

Methods

__init__(system_bound[, system_free, …])

Constructor.

analyse()

Analyse the binding free energy data.

getData([name, file_link, work_dir])

Return a link to a zip file containing the data files required for post-simulation analysis.

run([serial])

Run the simulation.

wait()

Wait for the simulation to finish.

workDir()

Return the working directory.

analyse()

Analyse the binding free energy data.

Returns

  • pmf_free ([(float, Energy, Energy)]) – The potential of mean force (PMF) for the free leg of the simulation. The data is a list of tuples, where each tuple contains the lambda value, the PMF, and the standard error.

  • pmf_bound ([(float, Energy, Energy)]) – The potential of mean force (PMF) for the bound leg of the simulation. The data is a list of tuples, where each tuple contains the lambda value, the PMF, and the standard error.

  • free_energy ((Energy, Energy)) – The binding free energy difference and its associated error.

  • overlap_free ([ [ float, float, … ] ]) – The overlap matrix. This gives the overlap between each window of the free leg. This parameter is only computed for the SOMD engine and will be None when GROMACS is used.

  • overlap_bound ([ [ float, float, … ] ]) – The overlap matrix. This gives the overlap between each window of the bound leg. This parameter is only computed for the SOMD engine and will be None when GROMACS is used.

classmethod getData(name='data', file_link=False, work_dir=None)

Return a link to a zip file containing the data files required for post-simulation analysis.

Parameters
  • name (str) – The name of the zip file.

  • file_link (bool) – Whether to return a FileLink when working in Jupyter.

  • work_dir (str) – The working directory for the simulation.

Returns

ouput – A path, or file link, to an archive of the process input.

Return type

str, IPython.display.FileLink

run(serial=True)

Run the simulation.

Parameters

serial (bool) – Whether to run the individual processes for the lambda windows in serial.

wait()

Wait for the simulation to finish.

workDir()

Return the working directory.

Returns

work_dir – The path of the working directory.

Return type

str