Re: [AMBER] About dpeaks implementation in cpptraj

From: Daniel Roe <>
Date: Mon, 19 Nov 2018 09:23:26 -0500


First, be aware that the density peaks method is the least well-tested
clustering method employed in cpptraj; cpptraj should be warning you
to this effect (let me know if not). So please do use with caution!

On Mon, Nov 19, 2018 at 8:50 AM Casalini Tommaso
<> wrote:
> If I take a look at the summary file, the cluster with the lowest index seems to be the most populated one, since, according to the printed text, includes the higher frames fraction. It seems that there is discrepancy in the use of the indexes. My question is: who is right?

They both are. When clustering starts, cpptraj has no idea which
cluster will be the most populated, so when choosing the initial
points it just goes in order (i.e. the first selected point is
assigned to cluster 0 and so on). After clustering is complete cpptraj
knows the final populations, and sorts by cluster population so that
the most populated cluster is cluster 0. I recommend writing out
cluster number vs frame (via 'out <file>') and check that the
higher-density points end up in the clusters you expect.

> I use cpptraj V17.00

I highly recommend updating to the latest version.

> I have another question, which is more general: I would like to identify different populations using the 2N dihedral angles of the backbone. Is it possible to compute a distance between structures using them and not, e.g., alpha carbon atoms?

Yes! You can do it by using the dihedral data sets as your distance
metric. Cpptraj will correct for periodicity so long as the data set
is correctly marked as a torsion, so if you're reading the data in (as
opposed to generating with e.g. the 'dihedral' command) make sure you
use 'dataset mode torsion <data sets>' to mark your data sets as
torsions prior to using 'cluster'. Here's a simply example using two

trajin ../
dihedral gly7phi :6.C :7.N :7.CA :7.C
dihedral gly7psi :7.N :7.CA :7.C :8.N
createcrd crd1
cluster crdset crd1 c1 data gly7phi,gly7psi clusters 5 out
twodihds.gnu summary twodihds.summary.dat info
create twodihds.d1.c1.dat gly7phi gly7psi c1 noxcol

See the manual for full details on what the keywords are doing here.
If you have a lot of torsions it's probably easier to use
'multidihedral' instead of several 'dihedral' commands.

Hope this helps,


AMBER mailing list
Received on Mon Nov 19 2018 - 06:30:05 PST
Custom Search