Class Clustering

java.lang.Object
ffx.potential.utils.Clustering

public class Clustering extends Object
Cluster contains methods utilized in the Cluster.groovy file.
Author:
Aaron J. Nessler, Michael J. Schnieders
  • 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. Created by:
    • 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.