TIES_MD.ties_analysis.engines package

Submodules

TIES_MD.ties_analysis.engines.namd module

class TIES_MD.ties_analysis.engines.namd.NAMD(method, output, win_mask, distributions, rep_convg, sampling_convg, vdw_a, vdw_d, ele_a, ele_d, namd_version)

Bases: object

Class to perform TIES analysis on NAMD results

Parameters:
  • method – str, β€˜TI’ or β€˜FEP’

  • output – str, pointing to base dir of where output will be writen

  • win_mask – list of ints, what windows if any to remove from analysis

  • distributions – bool, Do we want to calculate the dG for each rep individually

  • rep_convg – list of ints, what intermediate number of reps do you wish to inspect convergence for

  • sampling_convg – list of ints, what intermediate amount of sampling do you wish to inspect convergence for

  • vdw_a – list of floats, describes lambda schedule for vdw appear

  • vdw_d – list of floats, describes lambda schedule for vdw disappear

  • ele_a – list of floats, describes lambda schedule for elec appear

  • ele_d – list of floats, describes lambda schedule for elec disappear

  • namd_version – float, for which version of NAMD generated alch files

collate_data(data_root, prot, lig, leg)

Function to iterate over replica and window dirs reading NAMD alch file and building numpy array of potentials

Parameters:
  • data_root – str, file path point to base dir for results files

  • prot – str, name of dir for protein

  • lig – str, name of dir for ligand

  • leg – str, name of dir for thermo leg

Returns:

numpy.array for all potential collected

run_analysis(data_root, temp, prot, lig, leg)

Function to run the analysis for each method allowed for this engine.

Parameters:
  • data_root – str, file path point to base dir for results files

  • temp – float for temperature in units of kelvin (not used in NAMD as FEP not implemented)

  • prot – str, name of dir for protein

  • lig – str, name of dir for ligand

  • leg – str, name of dir for thermo leg

Returns:

list of floats, [dg, stdev(dg)]

TIES_MD.ties_analysis.engines.namd.get_iter(file_loc)

Function to get the number of gradient samples in an NAMD alch file

Parameters:

file_loc – file path to alch file

Returns:

int for the number of gradient samples

TIES_MD.ties_analysis.engines.namd.get_replica(string)

Helper function to sort directory paths by specific index in file name

Parameters:

string – File path to results file

Returns:

int for the replica id i.e. rep0 return 0

TIES_MD.ties_analysis.engines.namd.get_window(string)

Helper function to sort directory paths by specific index in file name

Parameters:

string – File path to results file

Returns:

float for the window value i.e. LAMBDA_0.00 return 0.00

TIES_MD.ties_analysis.engines.namd.read_alch_file(file_path, namd_ver, iterations)

Function for reading different NAMD ver. alch files

Parameters:
  • file_path – str, location of namd alch file

  • namd_ver – float, new or old used to specify what format of namd alch file we are looking at (old <= 2.12)

  • iterations – int, Number sample in alch file

Returns:

numpy array, contains potentials from one namd alch file

TIES_MD.ties_analysis.engines.openmm module

class TIES_MD.ties_analysis.engines.openmm.Lambdas(vdw_a, vdw_d, ele_a, ele_d)

Bases: object

Class: holds the information about a lambda schedule in an easily queryable format

Parameters:
  • vdw_a – list, Contains floats for values of VDW appearing lambdas

  • vdw_d – list, Contains floats for values of VDW disappearing lambdas

  • ele_a – list, Contains floats for values of ELEC appearing lambdas

  • ele_d – list, Contains floats for values of ELEC disappearing lambdas

update_attrs_from_schedule()

helper function to update the values of self.lambda_sterics_appear etc if the self.schedule is changed

class TIES_MD.ties_analysis.engines.openmm.OpenMM(method, output, win_mask, distributions, rep_convg, sampling_convg, vdw_a, vdw_d, ele_a, ele_d, fep_combine_reps)

Bases: object

Class to perform TIES analysis on OpenMM_TIES results

Parameters:
  • method – str, β€˜TI’ or β€˜FEP’

  • output – str, pointing to base dir of where output will be writen

  • win_mask – list of ints, what windows if any to remove from analysis

  • distributions – bool, Do we want to calculate the dG for each rep individually

  • rep_convg – list of ints, what intermediate number of reps do you wish to inspect convergence for

  • sampling_convg – list of ints, what intermediate amount of sampling do you wish to inspect convergence for

  • vdw_a – list of floats, describes lambda schedule for vdw appear

  • vdw_d – list of floats, describes lambda schedule for vdw disappear

  • ele_a – list of floats, describes lambda schedule for elec appear

  • ele_d – list of floats, describes lambda schedule for elec disappear

  • fep_combine_reps – bool: 1 or 0 an option to combine fep replicas into one time series

collate_data(data_root, prot, lig, leg)

Function to iterate over replica and window dirs reading OpenMM outputs and building numpy array of potentials

Parameters:
  • data_root – str, file path point to base dir for results files

  • prot – str, name of dir for protein

  • lig – str, name of dir for ligand

  • leg – str, name of dir for thermo leg

Returns:

np.array() containing all the data in the result files concatenated

run_analysis(data_root, temp, prot, lig, leg)

Function to run the analysis for each method allowed for this engine.

Parameters:
  • data_root – str, file path point to base dir for results files

  • temp – float for temperature in units of kelvin

  • prot – str, name of dir for protein

  • lig – str, name of dir for ligand

  • leg – str, name of dir for thermo leg

Returns:

list of floats, [dg, stdev(dg)]

TIES_MD.ties_analysis.engines.openmm.get_replica(string)

Helper function to sort directory paths by specific index in file name

Parameters:

string – File path to results file

Returns:

int for the replica id i.e. rep0 return 0

TIES_MD.ties_analysis.engines.openmm.get_window(string)

Helper function to sort directory paths by specific index in file name

Parameters:

string – File path to results file

Returns:

float for the window value i.e. LAMBDA_0.00 return 0.00

Module contents