Package ffx.potential.utils
Class Clustering
java.lang.Object
ffx.potential.utils.Clustering
Cluster contains methods used in the
Cluster.groovy file.- Since:
- 1.0
- Author:
- Kinoshita Yuya, Nishimura Koki, Karashima Masatoshi Implemented by:, Aaron J. Nessler, Michael J. Schnieders
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidanalyzeClusters(List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> clusters, List<Integer> repStructs, boolean verbose) Analyze a list of CentroidClusters.static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> hierarchicalClustering(List<double[]> distanceMatrix, double threshold) This method performs hierarchical clustering on a distance matrix.static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> iterativeClustering(List<double[]> distMatrix, int trials, double tolerance) Perform an iterative clustering for a specified number of clusters.static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> kMeansClustering(List<double[]> distMatrix, int maxClusters, int numTrials, long seed) Perform a k-means clustering for a specified number of clusters.
-
Constructor Details
-
Clustering
public Clustering()
-
-
Method Details
-
kMeansClustering
public static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> kMeansClustering(List<double[]> distMatrix, int maxClusters, int numTrials, long seed) Perform a k-means clustering for a specified number of clusters.- Parameters:
distMatrix- Coordinate input serves as the data points.maxClusters- Number of clusters to use (k).numTrials- Number of trials for the Multi K-Means++ algorithm.seed- The seed to use for clustering (-1 uses the current system time).- Returns:
- The clusters.
-
hierarchicalClustering
public static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> hierarchicalClustering(List<double[]> distanceMatrix, double threshold) This method performs hierarchical clustering on a distance matrix. If the system isn't headless, a dendrogram is printed of the clustered results. A PDB file for the centroid of each cluster is saved.- Parameters:
distanceMatrix- A List of double[] entries that holds the distance matrix.threshold- the distance used to separate clusters.- Returns:
- Return a list of CentroidClusters.
-
iterativeClustering
public static List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> iterativeClustering(List<double[]> distMatrix, int trials, double tolerance) Perform an iterative clustering for a specified number of clusters. Designed and tested by researchers at Takeda (see method authors).- Parameters:
distMatrix- Coordinate input serves as the data points.trials- Number of iterations to perform clustering.tolerance- RMSD cutoff to divide same values from different.- Returns:
- The clusters.
-
analyzeClusters
public static void analyzeClusters(List<org.apache.commons.math3.ml.clustering.CentroidCluster<Clustering.Conformation>> clusters, List<Integer> repStructs, boolean verbose) Analyze a list of CentroidClusters.- Parameters:
clusters- The List of CentroidClusters to analyze.repStructs- Store a representative conformation for each cluster.verbose- If true, use verbose printing.
-