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