IMP logo
IMP Reference Guide  develop.7482b7c7af, 2026/12/05
The Integrative Modeling Platform
IMP.pmi.analysis.Clustering Class Reference

A class to cluster structures. More...

Detailed Description

A class to cluster structures.

Uses scipy's cdist function to compute distance matrices and sklearn's kmeans clustering module.

Note
This class is only available in Python.

Definition at line 182 of file pmi/analysis.py.

Public Member Functions

 __init__ (self, rmsd_weights=None)
 Constructor.
 do_cluster (self, number_of_clusters, seed=None)
 Run K-means clustering.
 fill (self, frame, Coords)
 Add coordinates for a single model.

Constructor & Destructor Documentation

◆ __init__()

IMP.pmi.analysis.Clustering.__init__ ( self,
rmsd_weights = None )

Constructor.

Parameters
rmsd_weightsFlat list of weights for each particle (if they're coarse)

Definition at line 187 of file pmi/analysis.py.

Member Function Documentation

◆ do_cluster()

IMP.pmi.analysis.Clustering.do_cluster ( self,
number_of_clusters,
seed = None )

Run K-means clustering.

Parameters
number_of_clustersNum means
seedthe random seed

Definition at line 251 of file pmi/analysis.py.

◆ fill()

IMP.pmi.analysis.Clustering.fill ( self,
frame,
Coords )

Add coordinates for a single model.

Definition at line 208 of file pmi/analysis.py.


The documentation for this class was generated from the following file: