[gmx-users] k-means clustering in GROMACS

Nikos Sgourakis sgourn at rpi.edu
Sun Jan 7 22:06:53 CET 2007

Dear GROMACS users,

 Here I have implemented the k-means clustering algorithm in the 
original GROMACS module, gmx_cluster.c (called by the wrapper g_cluster).
 k-means is a heuristic algorithm that finds the partition of n points 
(conformations) in k groups (clusters), such that the sum of the 
distances of each point from the centroid of its belonging cluster is 
To compile, re-run make after replacing the original file: `make g_cluster`
Most of the in-line options of the original program work. However, there 
are no output structure files. Instead, `./g_cluster -method kmeans etc` 
will produce a file with the indeces of all conformations within each 
one of the k clusters (k-means.dat), and a list of all centroids 
(centroids.dat).  The conformations can then be easily retrieved from 
the original trajectory file.
Please, let me know of any difficulties in compiling/running kmeans for 


Nikolaos G. Sgourakis, MSc
Center for Biotechnology and Interdisciplinary studies
Troy, NY 12180

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: gmx_cluster.c
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20070107/6bdc2ce2/attachment.c>

More information about the gromacs.org_gmx-users mailing list