Clustering different chains and simulations

GROMACS version: 2018.3
GROMACS modification: No

I have run 6 simulations of 100 ns with 4 peptides in each water box (all same peptide) and I want to do clustering with all together. I mean, generating clusters for the structures of the 6 simulations and of the 4 chains as if they belong to the same simulation. Do you know how to do that?

What I am able to do is to analyze each chain independently. For this, first I created an index with the independent chains:
gmx make_ndx -f md_0_1.gro -o chainA.ndx
4 & ri 1-12 #(Backbone for the rmsd)
1 & ri 1-12 #(Protein for the output)
And then I used that index to run the clustering:
gmx cluster -n chainA.ndx -f md_0_1.xtc -s md_0_1.tpr -method gromos -cl cluster.pdb -g cluster.log -cutoff 0.1 -b 50000 -dt 50 #(I only analyze the last 50 ns)

If I don’t select each chain, of course, I get clustering of groups of 4 chains.

So the problems for the clustering are two:
-How to compare structures from different simulations.
-How to compare structures of different chains in the same simulation.

For the first part I think in something like trjcat to combine simulations but for the second problem I have no clue.


As far as I understood, you have 4 identical peptides in the simulation box and you want to cluster their structural feature (considering them as they were single molecule). From a technical point of view, you can save a traj file containing only 1 peptide each time (using gmx trjconv). Then analyze all the so-obtain trajectories togethers.
Note that the sampling of each peptide is affected by the presence of the other peptides.
Best regards


Thank you. I have advanced a bit but still it is not solved.

I tried what you proposed. First I generated each independent trajectory:
gmx trjconv -f md_0_1.xtc -s md_0_1.tpr -n 000cluster.ndx -b 50000 -dt 50 -o 0precluster11.xtc
gmx trjconv -f md_0_1.xtc -s md_0_1.tpr -n 000cluster.ndx -b 50000 -dt 50 -o 0precluster12.xtc
gmx trjconv -f md_0_1.xtc -s md_0_1.tpr -n 000cluster.ndx -b 50000 -dt 50 -o 0precluster13.xtc
gmx trjconv -f md_0_1.xtc -s md_0_1.tpr -n 000cluster.ndx -b 50000 -dt 50 -o 0precluster14.xtc
(selecting Protein + each chain)

Then I joined the 4 trajectories in a new one:
gmx trjcat -f 0precluster1*.xtc -settime -o 0trajall1.xtc

And then I run the clustering:
gmx cluster -f 0trajall1.trr -s md_0_1.tpr -method gromos -cl cluster.pdb -g cluster.log -cutoff 0.1

But the file md_0_1.tpr seems not to be accepted. It does not fit with the trajectory file and it is a needed file.

Any solution for this?


you can try to use an gro file containing only one peptide in box (e.i first snapshot of the trajectory) in place of the tpr or use the option -n index.ndx where you have one group with one peptide.

I notice that you generate first 0trajall1.xtc and than you use 0trajall1.trr as input in gmx cluster (I guess it is a typo).



yes, it was a typo. I modified a gro file to have only one peptide and it works now.

Thanks a lot.