Re: [AMBER] CPPTRAJ - KMeans Value for K

From: Piotr Fajer <>
Date: Mon, 8 Feb 2021 18:15:33 +0000

Trajectory files are indeed 3D, but you are clustering based on rmsd between the i,j frames. So, you are clustering on 2D rmsd array, not on 3D coordinates.


On 2/8/21, 1:07 PM, "Aanshi Gandhi" <> wrote:


    I am using CPPTRAJ for clustering analysis on my trajectory files post simulation using the KMeans algorithm. However I am unsure of the best approach in deciding what number to denote for k. While doing some online reading, I came across a method “Elbow method” where there is an algorithm that sorts through all the values of k and tells you the “best” value to use (based on the lowest amount of variation). When I tried using this on Python, it seems as though it would only work on 2D arrays (whereas I believe the trajectory files are 3D).

    I was wondering if you had any suggestions of similar algorithms cpptraj might have to assist or any other options for me to try?

    Thank you for your help,
    Aanshi Gandhi (she/her)
    M.ASc Candidate, Garton Lab
    Email<> | LinkedIn<;!!PhOWcWs!nJSnkwD2cZnOQpwmOsszzooCOQg8sArfCKA8Xr_eXt-PAGIwYjCz6X8HkuyvP_o$ >

    AMBER mailing list;!!PhOWcWs!nJSnkwD2cZnOQpwmOsszzooCOQg8sArfCKA8Xr_eXt-PAGIwYjCz6X8HyokIVpQ$

AMBER mailing list
Received on Mon Feb 08 2021 - 10:30:02 PST
Custom Search