TIES_MD.ties_analysis.methods package

Submodules

TIES_MD.ties_analysis.methods.FEP module

class TIES_MD.ties_analysis.methods.FEP.MBAR_Analysis(MBARs, temp, lambdas, analysis_dir, decorrelate=False)

Bases: object

Class for MBAR analysis

Parameters:
  • MBARs – numpy array for all results

  • temp – float for temperature in units of kelvin

  • lambdas – Lambda class containing schedule

  • distribution – Boolean, if True then dGs will not be averaged and a distribution of results is returned

  • analysis_dir – string file path for where to save analysis output

  • decorrelate – bool, do we want to decorrelate data before processing.

analysis(u_kln=None, N_k=None, mask_windows=None, rep_id=None)

Process a matrix of potentials passes to this function as u_kln or process self.data which is matrix of all replicas

Parameters:
  • u_kln – numpy array matrix of potentials for one replica

  • N_k – list of ints, specifies which entry in u_kln should be read up to for each window

  • mask_windows – list of ints, can be used to specify what windows to remove from u_kln

Returns:

list, containing dG and associated error calculated by MBAR

decorrelate_data(decorrelate)

Decorrolate time series data.

Parameters:

decorrelate – boolean, True if we want decorrelated data else False

Returns:

turple, (np matrix containing decorrelated data, list of ints for end of decorrelated data in matrix)

plot_overlap_mat(mat, rep_id)

Make a plot of the overlap matrix for this simulation

Parameters:
  • mat – numpy array, overlap matrix to make a plot for

  • rep_id – int, what replica are we looking at

replica_analysis(distributions=False, rep_convg=None, sampling_convg=None, mask_windows=None)

Function to make analysis of result from MBAR considering each trajectory as one replica

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

  • rep_convg – list of ints, what number of reps do we want results for.

  • sampling_convg – list of ints, what number of samples do we want results for.

  • mask_windows – list of ints, can be used to specify what windows to remove.

Returns:

containing average of bootstrapped dG and SEM

TIES_MD.ties_analysis.methods.TI module

class TIES_MD.ties_analysis.methods.TI.TI_Analysis(grads, lambdas, analysis_dir)

Bases: object

Class for thermodynamic integration analysis

Parameters:
  • grads – numpy array for all results

  • lambdas – Lambda class containing schedule

  • distribution – Boolean, if True then dGs will not be averaged and a distribution of results is returned

  • analysis_dir – string, pointing to where we want analysis saved

analysis(distributions=False, rep_convg=None, sampling_convg=None, mask_windows=None)

Perform TI analysis

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

  • rep_convg – list of ints, what number of reps do we want results for.

  • sampling_convg – list of ints, what number of samples do we want results for.

  • mask_windows – list of ints, can be used to specify what windows to remove.

Returns:

list, dG calculated by TI and associated standard deviation

intergrate(data, lambdas)

Function to perform numerical integration.

Parameters:
  • data – numpy array of averaged gradients

  • lambdas – class, contains information about lambda schedule

Returns:

turple of dicts, {lambda_parameters: free energy}, {lambda_parameters: free energy variance} for each lambda parameter

plot_du_by_dl()

Function to plot dU/dlam vs state with include calculations for ci

Returns:

None

TIES_MD.ties_analysis.methods.TI.compute_bs_error(replicas)

compute bootstrapped average and variance

Parameters:

replicas – list, values of average dU/dlam in each replica

Returns:

turple of floats, average and var of boot strapped result

TIES_MD.ties_analysis.methods.TI.get_lam_diff(lambda_array)

Compute difference between adjacent lambdas

Parameters:

lambda_array – list of ints

Returns:

numpy array for differences in input

Module contents