clustering Package¶
clustering Module¶
- 
class AdaptivePELE.clustering.clustering.AltStructures[source]¶
- Bases: - object- Helper class, each cluster will have an instance of AltStructures that will maintain a priority queue (pq) of alternative structures to spawn from encoded as tuples (priority, PDB). - 
addStructure(PDB, threshold, resname, resnum, resChain, contactThreshold, similarityEvaluator, trajPosition)[source]¶
- Perform a subclustering, with sub-clusters of size threshold/2 - Parameters
- PDB ( - PDB) – Structure to cluster
- threshold (float) – Size of the cluster 
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance at which to atoms are considered in contact 
- similarityEvaluator ( - SimilarityEvaluator) – Object that determinates the similarity between two structures
- trajPosition (int, int, int) – Tuple of (epoch, trajectory, snapshot) that permit identifying the structure added 
 
 
 - 
altSpawnSelection(centerPair)[source]¶
- Select an alternative PDB from the cluster center to spawn from 
 - 
cleanPQ()[source]¶
- Ensure that the alternative structures priority queue has no more elements than the limit in order to ensure efficiency 
 
- 
- 
class AdaptivePELE.clustering.clustering.CMClusteringEvaluator(similarityEvaluator, symmetryEvaluator)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.ClusteringEvaluator- Helper object to carry out the RMSD clustering - Parameters
- similarityEvaluator ( - CMSimilarityEvaluator) – object that calculates the similarity between two contact maps
- symmetryEvaluator ( - SymmetryContactMapEvaluator) – object to introduce the symmetry in the contacts maps
 
 - 
checkAttributes(pdb, resname, resnum, resChain, contactThresholdDistance)[source]¶
- Check wether all attributes are set for this iteration - Parameters
- pdb ( - PDB) – Structure to compare
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
 
 
 - 
getInnerLimit(cluster)[source]¶
- Return the threshold of the cluster - Parameters
- cluster ( - Cluster) – Cluster to compare
- Returns
- float – Threshold of the cluster 
 
 - 
isElement(pdb, cluster, resname, resnum, resChain, contactThresholdDistance)[source]¶
- Evaluate wether a conformation is a member of a cluster - Parameters
- pdb ( - PDB) – Structure to compare
- cluster ( - Cluster) – Cluster to compare
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
 
- Returns
- bool, float – Whether the structure belong to the cluster and the distance between them 
 
 - 
limitMax= {4: 0.2, 6: 0.8, 8: 2, 10: 4}¶
 - 
limitSlope= {4: 60, 6: 15, 8: 6, 10: 3}¶
 
- 
class AdaptivePELE.clustering.clustering.CMSimilarityEvaluator(typeEvaluator)[source]¶
- Bases: - object- Evaluate the similarity of two contactMaps by calculating the ratio of the number of differences over the average of elements in the contacts maps, their correlation or their Jaccard index, that is, the ratio between the intersection of the two contact maps and their union - 
isSimilarCluster(contactMap, clusterContactMap, symContactMapEvaluator)[source]¶
- Evaluate if two contactMaps are similar or not, return True if yes, False otherwise - Parameters
- contactMap (numpy.Array) – contactMap of the structure to compare 
- contactMap – contactMap of the structure to compare 
- symContactMapEvaluator ( - SymmetryContactMapEvaluator) – Contact Map symmetry evaluator object
 
- Returns
- float – distance between contact maps 
 
 
- 
- 
class AdaptivePELE.clustering.clustering.Cluster(pdb, thresholdRadius=None, contactMap=None, contacts=None, metrics=None, metricCol=None, density=None, contactThreshold=8, altSelection=False, trajPosition=None)[source]¶
- Bases: - object- A cluster contains a representative structure(pdb), the number of elements, its density, threshold, number of contacts, a contactMap(sometimes) and a metric - Parameters
- pdb ( - PDB) – Pdb of the representative structure
- thresholdRadius (float) – Threshold of the cluster 
- contactMap (numpy.Array) – The contact map of the ligand and the protein 
- contacts (float) – Ratio of the number of alpha carbons in contact with the ligand 
- metrics (numpy.Array) – Array of the metrics corresponding to the cluster 
- metricCol (int) – Column of the prefered metric 
- density (float) – Density of the cluster 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
- altSelection (bool) – Flag that controls wether to use the alternative structures (default 8) 
- trajPosition (int, int, int) – Tuple of (epoch, trajectory, snapshot) that permit identifying the structure added 
 
 - 
addElement(metrics)[source]¶
- Add a new element to the cluster - Parameters
- metrics (numpy.Array) – Array of metrics of the new structure 
 
 - 
getContacts()[source]¶
- Get the contacts ratio of the cluster - Returns
- float – contact ratio of the cluster 
 
 - 
getMetric()[source]¶
- Get the value of the prefered metric if present, otherwise return None - Returns
- float – Value of the prefered metric 
 
 - 
getMetricFromColumn(numcol)[source]¶
- Get the value of the metric in column numcol if present, otherwise return None - Parameters
- numcol (int) – Column of the desired metric 
- Returns
- float – Value of the prefered metric 
 
 - 
printCluster(verbose=False)[source]¶
- Print cluster information - Parameters
- verbose (bool) – Flag to control the verbosity of the code (default is False) 
 
 
- 
class AdaptivePELE.clustering.clustering.Clustering(resname='', resnum=0, resChain='', reportBaseFilename=None, columnOfReportFile=None, contactThresholdDistance=8, altSelection=False)[source]¶
- Bases: - object- Base class for clustering methods, it defines a cluster method that contacts and accumulative inherit and use - Parameters
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
 
 - 
addSnapshotToCluster(trajNum, snapshot, origCluster, snapshotNum, metrics=None, col=None, topology=None)[source]¶
- Cluster a snapshot using the leader algorithm - Parameters
- trajNum (int) – Trajectory number 
- snapshot (str) – Snapshot to add 
- origCluster (int) – Cluster found in the previos snapshot 
- snapshotNum (int) – Number of snapshot in its trajectory 
- metrics (numpy.Array) – Array with the metrics of the snapshot 
- col (int) – Column of the desired metrics 
- topology (list) – Topology for non-pdb trajectories 
 
- Returns
- int – Cluster to which the snapshot belongs 
 
 - 
cluster(paths, ignoreFirstRow=False, topology=None, epoch=None, outputPathConstants=None)[source]¶
- Cluster the snaptshots contained in the paths folder - Parameters
- paths (list) – List of folders with the snapshots 
- ignoreFirstRow (bool) – Flag wether to ignore the first snapshot of a trajectory 
- topology ( - Topology) – Topology object containing the set of topologies needed for the simulation
- epoch (int) – Epoch number 
- outputPathConstants ( - OutputPathConstants) – Contains outputPath-related constants
 
 
 - 
filterClustersAccordingToBox(simulationRunnerParams)[source]¶
- Filter the clusters to select only the ones whose representative structures will fit into the selected box - Parameters
- simulationRunnerParams ( - SimulationParameters) –- SimulationParametersSimulation parameters object
- Returns list, list
- – list of the filtered clusters, list of bools flagging wether the cluster is selected or not 
 
 - 
filterClustersAccordingToMetric(clustersFiltered, filter_value, condition, col_filter)[source]¶
- Filter the clusters to select only the ones whose metric fits an specific criterion - Parameters
- clustersFiltered (list) – List of clusters to be processed 
- filter_value (float) – Value to use in the filtering 
- condition (str) – Whether to use > or < condition in the filtering 
- col_filter (int) – Column of the report to use 
 
- Returns list, list
- – list of the filtered clusters, list of bools flagging whether the cluster is selected or not 
 
 - 
getCluster(clusterNum)[source]¶
- Get the cluster at index clusterNum - Returns
- Cluster– Cluster at clusterNum
 
 - 
getClusterListForSpawning()[source]¶
- Return the clusters object to be used in the spawning - Returns
- Clusters– Container object for the clusters
 
 - 
getMetricsFromColumn(col)[source]¶
- Get the metric of the clusters - Parameters
- col (int) – Column to select the metric 
- Returns
- np.array – Array containing the metric of the clusters 
 
 - 
getOptimalMetric(column=None, simulationType='min')[source]¶
- Find the cluster with the best metric - Parameters
- column (int) – Column of the metric that defines the best cluster, if not specified, the cluster metric is chosen 
- simulationType (str) – Define optimal metric as the maximum or minimum, max or min 
 
- Returns
- int – Number of cluster with the optimal metric 
 
 - 
setCol(col)[source]¶
- Set the column of the prefered column to col - Parameters
- col (int) – Column of the prefered column 
 
 - 
updateRepeatParameters(repeat, steps)[source]¶
- Update parameters that should be extracted from the simulation object - Parameters
- repeat (bool) – Whether to avoid repeating steps (False for PELE, True for md) 
- steps (int) – steps per epoch 
 
 
 - 
writeClusterMetric(path, metricCol)[source]¶
- Write the metric of each node in the conformation network in a tab-separated file - Parameters
- path (str) – Path where to write the network 
- metricCol (int) – Column of the metric of interest 
 
 
 - 
writeConformationNodePopulation(path)[source]¶
- Write the population of each node in the conformation network in a tab-separated file - Parameters
- path (str) – Path where to write the network 
 
 - 
writeOutput(outputPath, degeneracy, outputObject, writeAll)[source]¶
- Writes all the clustering information in outputPath - Parameters
- outputPath (str) – Folder that will contain all the clustering information 
- degeneracy (list) – Degeneracy of each cluster. It must be in the same order as in the self.clusters list 
- outputObject (str) – Output name for the pickle object 
- writeAll (bool) – Wether to write pdb files for all cluster in addition of the summary 
 
 
 
- 
class AdaptivePELE.clustering.clustering.ClusteringBuilder[source]¶
- Bases: - object- 
buildClustering(clusteringBlock, reportBaseFilename=None, columnOfReportFile=None)[source]¶
- Builder to create the appropiate clustering object - Parameters
- clusteringBlock (dict) – Parameters of the clustering process 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
 
- Returns
- Clustering– Clustering object selected
 
 
- 
- 
class AdaptivePELE.clustering.clustering.Clusters[source]¶
- Bases: - object- 
addCluster(cluster)[source]¶
- Add a new cluster - Parameters
- cluster ( - Cluster) – Cluster object to insert
 
 - 
getCluster(clusterNum)[source]¶
- Get the cluster at position clusterNum - Parameters
- clusterNum (int) – Index of the cluster to retrieve 
- Returns
- Cluster– Cluster at position clusterNum
 
 - 
getNumberClusters()[source]¶
- Get the number of clusters contained - Returns
- int – Number of clusters contained 
 
 
- 
- 
class AdaptivePELE.clustering.clustering.ConformationNetwork[source]¶
- Bases: - object- Object that contains the conformation network, a network with clusters as nodes and edges representing trantions between clusters. The network is stored using the networkx package[1] - 1
- Networkx python package https://networkx.github.io 
 - 
add_edge(source, target)[source]¶
- Add an edge to the network (wrapper for networkx method) - Parameters
- source (int) – Name of the source node 
- target (int) – Name of the target node 
 
 
 - 
add_node(node, **kwargs)[source]¶
- Add a node to the network (wrapper for networkx method) - Parameters
- node (int) – Name of the node 
- kwargs (keyword arguments, optional) – Set or change attributes using key=value. 
 
 
 - 
createPathwayToCluster(clusterLeave)[source]¶
- Retrace the FDT from a specific cluster to the root where it was discovered - Parameters
- clusterLeave (int) – End point of the pathway to reconstruct 
- Returns
- list – List of snapshots conforming a pathway 
 
 
- 
class AdaptivePELE.clustering.clustering.ContactMapAccumulativeClustering(thresholdCalculator, similarityEvaluator, resname='', resnum=0, resChain='', reportBaseFilename=None, columnOfReportFile=None, contactThresholdDistance=8, symmetries=None, altSelection=False)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.Clustering- Cluster together all snapshots that have similar enough contactMaps. This similarity can be calculated with different methods (see similariyEvaluator documentation) - Parameters
- thresholdCalculator ( - ThresholdCalculator) – ThresholdCalculator object that calculate the threshold according to the contacts ratio
- similarityEvaluator (object) – object that calculates the similarity between two contact maps 
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
- symmetries (list) – List of symmetric groups 
- altSelection (bool) – Flag that controls wether to use the alternative structures (default 8) 
 
 
- 
class AdaptivePELE.clustering.clustering.ContactsClustering(thresholdCalculator, resname='', resnum=0, resChain='', reportBaseFilename=None, columnOfReportFile=None, contactThresholdDistance=8, symmetries=None, altSelection=False, useContacts=True)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.Clustering- Cluster together all snapshots that are closer to the cluster center than certain threshold. This threshold is assigned according to the ratio of number of contacts over the number of heavy atoms of the ligand - Parameters
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- thresholdCalculator ( - ThresholdCalculator) – ThresholdCalculator object that calculate the threshold according to the contacts ratio
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
- symmetries (list) – List of symmetric groups 
- altSelection (bool) – Flag that controls wether to use the alternative structures (default 8) 
- useContacts (bool) – Flag that controls whether to count the protein ligand contacts (useful mostly for ligand only simulations) 
 
 
- 
class AdaptivePELE.clustering.clustering.ContactsClusteringEvaluator(RMSDCalculator_object)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.ClusteringEvaluator- Helper object to carry out the RMSD clustering - Parameters
- RMSDCalculator ( - RMSDCalculator) – object that calculates the RMSD between two conformations
 - 
checkAttributes(pdb, resname, resnum, resChain, contactThresholdDistance)[source]¶
- Check wether all attributes are set for this iteration - Parameters
- pdb ( - PDB) – Structure to compare
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
 
 
 - 
getInnerLimit(cluster)[source]¶
- Return the threshold of the cluster - Parameters
- cluster ( - Cluster) – Cluster to compare
- Returns
- float – Threshold of the cluster 
 
 - 
isElement(pdb, cluster, resname, resnum, resChain, contactThresholdDistance)[source]¶
- Evaluate wether a conformation is a member of a cluster - Parameters
- pdb ( - PDB) – Structure to compare
- cluster ( - Cluster) – Cluster to compare
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
 
- Returns
- bool, float – Whether the structure belong to the cluster and the distance between them 
 
 
- 
class AdaptivePELE.clustering.clustering.MSMClustering(n_clusters, tica=False, resname='', resnum=0, resChain='', symmetries=None, atom_Ids='', writeCA=False, sidechains=False, tica_lagtime=10, tica_nICs=3, tica_kinetic_map=True, tica_commute_map=False)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.Clustering- Cluster the trajectories to estimate a Markov State Model (MSM) - Base class for clustering methods, it defines a cluster method that contacts and accumulative inherit and use - Parameters
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
 
 - 
cluster(paths, topology=None, epoch=None, outputPathConstants=None)[source]¶
- Cluster the snaptshots contained in the paths folder - Parameters
- paths (list) – List of folders with the snapshots 
- topology ( - Topology) – Topology object containing the set of topologies needed for the simulation
- epoch (int) – Epoch number 
- outputPathConstants ( - OutputPathConstants) – Contains outputPath-related constants
 
 
 - 
filterClustersAccordingToBox(simulationRunnerParams)[source]¶
- Filter the clusters to select only the ones whose representative structures will fit into the selected box - Parameters
- simulationRunnerParams ( - SimulationParameters) –- SimulationParametersSimulation parameters object
- Returns list, list
- – list of the filtered clusters, list of bools flagging wether the cluster is selected or not 
 
 - 
filterClustersAccordingToMetric(clustersFiltered, filter_value, condition, col_filter)[source]¶
- Filter the clusters to select only the ones whose metric fits an specific criterion - Parameters
- clustersFiltered (list) – List of clusters to be processed 
- filter_value (float) – Value to use in the filtering 
- condition (str) – Whether to use > or < condition in the filtering 
- col_filter (int) – Column of the report to use 
 
- Returns list, list
- – list of the filtered clusters, list of bools flagging whether the cluster is selected or not 
 
 - 
getClusterListForSpawning()[source]¶
- Return the clusters object to be used in the spawning - Returns
- Clusters– Container object for the clusters
 
 - 
updateRepeatParameters(repeat, steps)[source]¶
- Update parameters that should be extracted from the simulation object - Parameters
- repeat (bool) – Whether to avoid repeating steps (False for PELE, True for md) 
- steps (int) – steps per epoch 
 
 
 - 
writeOutput(outputPath, degeneracy, outputObject, writeAll)[source]¶
- Writes all the clustering information in outputPath - Parameters
- outputPath (str) – Folder that will contain all the clustering information 
- degeneracy (list) – Degeneracy of each cluster. It must be in the same order as in the self.clusters list 
- outputObject (str) – Output name for the pickle object 
- writeAll (bool) – Wether to write pdb files for all cluster in addition of the summary 
 
 
 
- 
class AdaptivePELE.clustering.clustering.NullClustering[source]¶
- Bases: - AdaptivePELE.clustering.clustering.Clustering- Don’t generate any clustering, works essentially as a placeholder for simulation when no clustering is desired - Base class for clustering methods, it defines a cluster method that contacts and accumulative inherit and use - Parameters
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
 
 - 
cluster(paths, topology=None, epoch=None, outputPathConstants=None)[source]¶
- Cluster the snaptshots contained in the paths folder - Parameters
- paths (list) – List of folders with the snapshots 
- topology ( - Topology) – Topology object containing the set of topologies needed for the simulation
- epoch (int) – Epoch number 
- outputPathConstants ( - OutputPathConstants) – Contains outputPath-related constants
 
 
 - 
writeOutput(outputPath, degeneracy, outputObject, writeAll)[source]¶
- Writes all the clustering information in outputPath - Parameters
- outputPath (str) – Folder that will contain all the clustering information 
- degeneracy (list) – Degeneracy of each cluster. It must be in the same order as in the self.clusters list 
- outputObject (str) – Output name for the pickle object 
- writeAll (bool) – Wether to write pdb files for all cluster in addition of the summary 
 
 
 
- 
class AdaptivePELE.clustering.clustering.RMSDOnlyClusteringEvaluator(RMSDCalculator_object)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.ContactsClusteringEvaluator- Helper object to carry out the RMSD clustering - Parameters
- RMSDCalculator ( - RMSDCalculator) – object that calculates the RMSD between two conformations
 - 
checkAttributes(pdb, resname, resnum, resChain, contactThresholdDistance)[source]¶
- Check wether all attributes are set for this iteration - Parameters
- pdb ( - PDB) – Structure to compare
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- contactThreshold (float) – Distance between two atoms to be considered in contact (default 8) 
 
 
 
- 
class AdaptivePELE.clustering.clustering.SequentialLastSnapshotClustering(resname='', resnum=0, resChain='', reportBaseFilename=None, columnOfReportFile=None, contactThresholdDistance=8, altSelection=False)[source]¶
- Bases: - AdaptivePELE.clustering.clustering.Clustering- Assigned the last snapshot of the trajectory to a cluster. Only useful for PELE sequential runs - Base class for clustering methods, it defines a cluster method that contacts and accumulative inherit and use - Parameters
- resname (str) – String containing the three letter name of the ligand in the pdb 
- resnum (int) – Integer containing the residue number of the ligand in the pdb 
- resChain (str) – String containing the chain name of the ligand in the pdb 
- reportBaseFilename (str) – Name of the file that contains the metrics of the snapshots to cluster 
- columnOfReportFile (int) – Column of the report file that contain the metric of interest 
- contactThresholdDistance (float) – Distance at wich a ligand atom and a protein atom are considered in contact(default 8) 
 
 - 
addSnapshotToCluster(snapshot, metrics=None, col=None, topology=None)[source]¶
- Cluster a snapshot using the leader algorithm - Parameters
- trajNum (int) – Trajectory number 
- snapshot (str) – Snapshot to add 
- metrics (numpy.Array) – Array with the metrics of the snapshot 
- col (int) – Column of the desired metrics 
- topology (list) – Topology for non-pdb trajectories 
 
- Returns
- int – Cluster to which the snapshot belongs 
 
 - 
cluster(paths, topology=None, epoch=None, outputPathConstants=None)[source]¶
- Cluster the snaptshots contained in the paths folder - Parameters
- paths (list) – List of folders with the snapshots 
- topology ( - Topology) – Topology object containing the set of topologies needed for the simulation
- epoch (int) – Epoch number 
- outputPathConstants ( - OutputPathConstants) – Contains outputPath-related constants
 
 
 
- 
AdaptivePELE.clustering.clustering.filterRepeatedReports(metrics, column=2)[source]¶
- Filter the matrix containing the report information to avoid rejected steps - Parameters
- metrics (np.ndarray) – Contents of the report file 
- column (int) – Column to check for repeats 
 
- Returns
- np.ndarray – Contents of the report file filtered 
 
- 
AdaptivePELE.clustering.clustering.getAllTrajectories(paths)[source]¶
- Find all the trajectory files in the paths specified - Parameters
- paths (str) – The path where to find the trajectories 
- Returns
- list – A list with the names of all the trajectories in paths 
 
- 
AdaptivePELE.clustering.clustering.loadReportFile(reportFile)[source]¶
- Load a report file and filter it - Parameters
- reportFile (str) – Name of the report file 
- Returns
- np.ndarray – Contents of the report file 
 
clusteringTypes Module¶
thresholdcalculator Module¶
- 
class AdaptivePELE.clustering.thresholdcalculator.ThresholdCalculatorBuilder[source]¶
- Bases: - object- 
build(clusteringBlock)[source]¶
- Bulid the selecte thresholdCaulcualtor object - Parameters
- clusteringBlock (dict) – Parameters block corresponding to the threshold calculator 
- Returns
- ThresholdCalculator– thresholdCalculator object selected
 
 
- 
- 
class AdaptivePELE.clustering.thresholdcalculator.ThresholdCalculatorConstant(value=2)[source]¶
- Bases: - AdaptivePELE.clustering.thresholdcalculator.ThresholdCalculator
- 
class AdaptivePELE.clustering.thresholdcalculator.ThresholdCalculatorHeaviside(conditions=None, values=None)[source]¶
- Bases: - AdaptivePELE.clustering.thresholdcalculator.ThresholdCalculator