BioSimSpace.FreeEnergy.ATM¶
- class BioSimSpace.FreeEnergy.ATM(system, protocol, platform='CPU', work_dir=None, setup_only=False, property_map={})[source]¶
A class for setting up, running, and analysis RBFE calculations using the Alchemical Transfer Method.
- __init__(system, protocol, platform='CPU', work_dir=None, setup_only=False, property_map={})[source]¶
Constructor.
- Parameters:
system (BioSimSpace._SireWrappers.System) – A prepared ATM system containing a protein and two ligands, one bound and one free. Assumed to already be equilibrated.
protocol (BioSimSpace.Protocol.ATM) – The ATM protocol to use for the simulation.
platform (str) – The platform for the simulation: “CPU”, “CUDA”, or “OPENCL”. For CUDA use the CUDA_VISIBLE_DEVICES environment variable to set the GPUs on which to run, e.g. to run on two GPUs indexed 0 and 1 use: CUDA_VISIBLE_DEVICES=0,1. For OPENCL, instead use OPENCL_VISIBLE_DEVICES.
work_dir (str) – The working directory for the simulation.
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” }
Methods
__init__
(system, protocol[, platform, ...])Constructor.
analyse
(work_dir[, method, ignore_lower, ...])Analyse the ATM simulation.
getData
([name, file_link, work_dir])Return a link to a zip file containing the data files required for post-simulation analysis.
kill
(index)Kill a process for a specific lambda window.
killAll
()Kill any running processes for all lambda windows.
run
([serial])Run the simulations.
wait
()Wait for the simulation to finish.
workDir
()Return the working directory.
- static analyse(work_dir, method='UWHAM', ignore_lower=0, ignore_upper=None, inflex_indices=None)[source]¶
Analyse the ATM simulation.
- Parameters:
work_dir (str) – The working directory where the ATM simulation is located.
method (str) – The method to use for the analysis. Currently only UWHAM is supported.
ignore_lower (int) – Ignore the first N samples when analysing.
inflex_indices ([int]) – The indices at which the direction changes. For example, if direction=[1,1,-1,-1], then inflex_indices=[1,2]. If None, the inflexion point will be found automatically.
- Returns:
ddg (
BioSimSpace.Types.Energy
) – The free energy difference between the two ligands.ddg_err
BioSimSpace.Types.Energy
– The error in the free energy difference.
- getData(name='data', file_link=False, work_dir=None)[source]¶
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 free-energy perturbation simulation.
- Returns:
output – A path, or file link, to an archive of the process input.
- Return type:
str, IPython.display.FileLink
- kill(index)[source]¶
Kill a process for a specific lambda window.
- Parameters:
index (int) – The index of the lambda window.