analysis Package

correctRMSD Module

AdaptivePELE.analysis.correctRMSD.calculate_rmsd_traj(nativePDB, resname, symmetries, rmsdColInReport, traj, reportName, top, epoch, outputFilename, fmt_str, new_report)[source]
AdaptivePELE.analysis.correctRMSD.main(controlFile, trajName, reportName, folder, top, outputFilename, nProcessors, output_folder, format_str, new_report, trajs_to_select)[source]

Calculate the corrected rmsd values of conformation taking into account molecule symmetries

Parameters
  • controlFile (str) – Control file

  • folder (str) – Path the simulation

  • top (str) – Path to the topology

  • outputFilename (str) – Name of the output file

  • nProcessors (int) – Number of processors to use

  • output_folder (str) – Path where to store the new reports

  • format_str (str) – String with the format of the report

  • new_report (bool) – Whether to write rmsd to a new report file

AdaptivePELE.analysis.correctRMSD.parseArguments()[source]

Parse the command-line options

Returns

object – Object containing the options passed

AdaptivePELE.analysis.correctRMSD.readControlFile(controlFile)[source]

Extract parameters from controlFile

Parameters

controlFile (str) – Control file

Returns

str, str, list, int – Name of the ligand in the pdb, filename containing the native structure, list of the symmetry groups, column corresponding to the rmsd in the report file

foldersFirstBindingEvent Module

AdaptivePELE.analysis.foldersFirstBindingEvent.main(folders, column, threshold, stepsPerEpoch, sequential, unbinding)[source]

Calculate first binding event statistics (mean, median, std)

Parameters
  • folders (list) – List of folders

  • column (int) – Column with binding event related metric

  • threshold (float) – Threshold for a binding event to be considered

  • stepsPerEpoch (int) – Number of steps per epoch to be consdidered

  • sequential (bool) – Whether the simulation to analyse is and adaptive or sequential simulation

AdaptivePELE.analysis.foldersFirstBindingEvent.parseArguments()[source]

Parse the command-line options

Returns

list, int, float, int, bool – List of folders, column with binding event related metric, threshold for a binding event to be considered, number of steps per epoch to be consdidered, wether the simulation to analyse is and adaptive or sequential simulation

makePNGs Module

Create two PNG images with RMSD-MC steps and BE-RMSD for a set of different adaptive runs

AdaptivePELE.analysis.makePNGs.parseArguments()[source]

Parse command line arguments

numberOfClusters Module

AdaptivePELE.analysis.numberOfClusters.buildClustersPerValue(clustersPerEpoch, numberOfEpochs)[source]

Get the number of clusters that have each value

Parameters
  • clustersPerEpoch (list) – List with dictionaries for all epochs. The dictionary has the set of different values (according to column) and their number

  • numberOfEpochs (int) – Total number of epochs in the simulation

Returns

dict – Dictionary with the number of clusters that have each value

AdaptivePELE.analysis.numberOfClusters.findDifferentClustersForAllEpochs(column, templetizedClusteringSummaryFile, numberOfEpochs)[source]
Get the distribution of values of a certain column in the clustering

summary for each epoch

Parameters
  • column (int) – Column of interest

  • templetizedClusteringSummaryFile (str) – Template name of the clustering summary file

  • numberOfEpochs (int) – Total number of epochs in the simulation

Returns

list – List with dictionaries for all epochs. The dictionary has the set of different values (according to column) and their number

AdaptivePELE.analysis.numberOfClusters.findDifferentClustersInEpoch(column, summaryFile)[source]
Get the distribution of values of a certain column in the clustering

summary

Parameters
  • column (int) – Column of interest

  • summaryFile (str) – Clustering summary file

Returns

dict – Dictionary with the set of different elements in column and the number of elements in this epoch

AdaptivePELE.analysis.numberOfClusters.getAllDifferentValues(clustersPerEpoch)[source]

Get all the different values ocurring during a simulation

Parameters

clustersPerEpoch (list) – List with dictionaries for all epochs. The dictionary has the set of different values (according to column) and their number

Returns

set – Set containing all values ocurring during a simulation

AdaptivePELE.analysis.numberOfClusters.getClusteringSummaryContent(summaryFile)[source]

Get the contents of clustering summary file

Parameters

summaryFile (str) – Clustering summary file

Returns

list – List with the contents of the clustering summary file

AdaptivePELE.analysis.numberOfClusters.getNumberOfClustersPerEpochForGivenColumn(column, templetizedClusteringSummaryFile, folder)[source]

Get the number of clusters that have each value at each epoch

Parameters
  • column (int) – Column of interest

  • templetizedClusteringSummaryFile (str) – Template name of the clustering summary file

  • folder (str) – Folder where the simulation data is stored

Returns

dict – Dictionary with the number of clusters that have each value

AdaptivePELE.analysis.numberOfClusters.getTotalNumberOfClustersPerEpoch(templetizedClusteringSummaryFile, folder)[source]

Get the number of clusters in each epoch

Parameters
  • templetizedClusteringSummaryFile (str) – Template name of the clustering summary file

  • folder (str) – Folder where the simulation data is stored

Returns

list – List with the number of cluster in each simulation epoch

AdaptivePELE.analysis.numberOfClusters.main(filename, outputPath)[source]
Plot a summary of the clustering for a simulation:
  1. Number of clusters for each threshold value at each epoch

  2. Number of clusters for each density value at each epoch

  3. Histogram of the number of contacts

AdaptivePELE.analysis.numberOfClusters.plotClustersPerValue(clustersPerValue)[source]

Plot the number of clusters that have a certain value

Parameters

clustersPerValue (dict) – Dictionary with the number of clusters that have each value

AdaptivePELE.analysis.numberOfClusters.plotContactsHistogram(folder, templetizedClusteringSummaryFile)[source]

Plot the histogram of the number of contacts

Parameters
  • folder (str) – Folder where the simulation data is stored

  • templetizedClusteringSummaryFile (str) – Template name of the clustering summary file

AdaptivePELE.analysis.numberOfClusters.printHelp()[source]

Create command line interface

Returns

str – Output filename ( if specified )

plotAdaptive Module

AdaptivePELE.analysis.plotAdaptive.addLine(data_plot, traj_num, epoch, steps, opt_dict, artists)[source]

Add a line to the plot corresponding to a report file

Parameters
  • data_plot (np.ndarray) – Data from the report file

  • traj_num (int) – Number of the report

  • epoch (int) – Epoch of the report

  • steps (int) – Number of steps of the simulation

  • opt_dict (dict) – Dictionary with plotting options

AdaptivePELE.analysis.plotAdaptive.createPlot(reportName, column1, column2, stepsPerRun, printWithLines, paletteModifier, trajs_range=None, label_x=None, label_y=None, label_colorbar=None, fig_size=(6, 6), simulation_path='.', skip_first_step=False, skip_steps=None, y_top=None, y_bottom=None, x_left=None, x_right=None, filters=None)[source]

Generate a string to be passed to gnuplot

Parameters
  • reportName (str) – Name of the files containing the simulation data

  • column1 (int) – Column to plot in the X axis

  • column2 (int) – Column to plot in the Y axis

  • stepsPerRun (int) – Number of steps per epoch,

  • paletteModifier (int) – Whether to use the epoch as color or a column

  • trajs_range (str) – Range of trajectories to plot

  • label_x (str) – Label of the x-axis

  • label_y (str) – Label of the y-axis

  • label_colorbar (str) – Label of the colorbar

  • fig_size (tuple) – Size of the plot figure (default (6in, 6in))

  • simulation_path (str) – Path to the simulation data

  • skip_first_step (bool) – Whether to avoid plotting the first point in each report

  • skip_steps (int) – Number of steps to skip in the plot

  • y_bottom (float) – Bottom limit of the y axis

  • y_top (float) – Top limit of the y axis

  • x_left – Left limit of the x axis

  • x_right (float) – Right limit of the x axis

  • filters (list) – Filters to applya to data

AdaptivePELE.analysis.plotAdaptive.generatePlot(stepsPerRun, xcol, ycol, reportName, kindOfPrint, paletteModifier, trajs_range, path_to_save, xlabel, ylabel, cblabel, fig_size=(6, 6), show_plot=True, simulation_path='.', skip_first_step=False, skip_steps=None, y_top=None, y_bottom=None, x_left=None, x_right=None, filters=None)[source]

Generate a template string to use with gnuplot

Parameters
  • stepsPerRun (int) – Number of steps per epoch,

  • xcol (int) – Column to plot in the X axis

  • ycol (int) – Column to plot in the Y axis

  • reportName (str) – Name of the files containing the simulation data

  • kindOfPrint (bool) – Kind of lines to plot (solid or points)

  • paletteModifier (int) – Third column to specify color

  • trajs_range (str) – Range of trajectories to plot

  • path_to_save (str) – Path the save the plot

  • xlabel (str) – Label of the x axis

  • ylabel (str) – Label of the y axis

  • cblabel (str) – Label of the colorbar

  • fig_size (tuple) – Size of the plot figure (default (6in, 6in))

  • show_plot (bool) – Wheter to show the plot to screen

  • simulation_path (str) – Path to the simulation data

  • skip_first_step (bool) – Whether to avoid plotting the first point in each report

  • skip_first_step – Whether to avoid plotting the first point in each report

  • skip_steps (int) – Number of steps to skip in the plot

  • y_bottom (float) – Bottom limit of the y axis

  • y_top (float) – Top limit of the y axis

  • x_left – Left limit of the x axis

  • x_right (float) – Right limit of the x axis

  • filters (list) – Filters to applya to data

Returns

str – String to plot using gnuplot

AdaptivePELE.analysis.plotAdaptive.parseArguments()[source]

Parse command line arguments

Returns

argparse.Namespace – Namespace with the input parameters

writeClusteringStructures Module

Write specified cluster representative structures to pdb

AdaptivePELE.analysis.writeClusteringStructures.main(clObject, structures, cond, outputPath)[source]
AdaptivePELE.analysis.writeClusteringStructures.parseArgs()[source]

Parse command line arguments

Returns

object – Object containing command line options

backtrackAdaptiveTrajectory Module

Recreate the trajectory fragments to the led to the discovery of a snapshot, specified by the tuple (epoch, trajectory, snapshot) and write as a pdb file

AdaptivePELE.analysis.backtrackAdaptiveTrajectory.main(trajectory, snapshot, epoch, outputPath, out_filename, topology, use_pdb=False)[source]
AdaptivePELE.analysis.backtrackAdaptiveTrajectory.parseArguments()[source]

Parse the command-line options

Returns

int, int, int, str, str, str – number of trajectory, number of snapshot, number of epoch, output path where to write the files, name of the files, name of the topology