Feature #2597

gmx cluster improuvement

Added by Boris Timofeev about 2 years ago. Updated about 2 years ago.

analysis tools
Target version:


In processing of results of REMD there were inconveniences which, I think,
it will be easy to eliminate in future versions of Gromacs.
1. Command
gmx cluster ... -cl somefile.pdb ...
unlike command
gmx trjconv ... -o somefile.pdb ...
doesn't form record about the box sizes in the PDB file:
CRYST1 boxx boxy boxz ...
As a result, subsequent call
gmx hbond .. -f somefile.pdb ....
deals to the error:
Program: gmx hbond, version 2016.2
Source file: src\gromacs\gmxana\gmx_hbond.cpp (line 947)
Fatal error:
Your computational box has shrunk too much.
gmx hbond can not handle this situation, sorry.
Manual addition the record CRYST1 to pdb-file solves this problem.
I suggest to add formation of the record CRYST1 to output pdb,
formed by the gmx cluster command.
2. The gmx trjconv command can select parts of a trajectory by means of the index file: - sub index.ndx:
"Use option -sub. This assumes that the entries in the index file are frame numbers and
dumps each group in the index file to a separate trajectory file."
It would be very convenient if the "gmx cluster" command could form,
optionally, index files for the found clusters.
Now this problem is solved by copying of times from gmx cluster command's log-file
and transformation of times to indexes of frames manually. This is very uncomfortable.

I have already made changes in gmx_cluster.cpp code, having solved both problems. An array of boxes and an array of frame numbers are formed similar to the array of frames times at extraction of trajectories. Please, revise it.

gmx_cluster.cpp (61.2 KB) gmx_cluster.cpp Boris Timofeev, 08/07/2018 10:01 AM

Associated revisions

Revision c1c230e9 (diff)
Added by boristim about 2 years ago

Updates to gmx cluster

As proposed by Boris Timofeev on redmine, this adds to ability
of writing CRYST information to output pdb files, as well as
writing index files for generated clusters.

Fixes #2597

Change-Id: I991889d4116f096a58a22d5482420f0ddc6d0ef9


#1 Updated by Paul Bauer about 2 years ago

Hello, please upload your change to for code review! :) Or if you did so already, please link the redmine issue in the code commit.

#2 Updated by Gerrit Code Review Bot about 2 years ago

Gerrit received a related patchset '2' for Issue #2597.
Uploader: Paul Bauer ()
Change-Id: gromacs~master~I991889d4116f096a58a22d5482420f0ddc6d0ef9
Gerrit URL:

#3 Updated by Mark Abraham about 2 years ago

  • Target version changed from 2016.6 to 2019

Thanks for the suggestion. Features need to be targeted no earlier than the next release, ie 2019. But the idea and implementation seems pretty good :-)

#4 Updated by Mark Abraham about 2 years ago

  • Status changed from New to Resolved

#5 Updated by Anonymous about 2 years ago

#6 Updated by Paul Bauer about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF