[AMBER] Major Cpptraj Update (GitHub)

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Wed, 20 Jan 2021 14:54:44 -0500

Hi All,

I don't normally post about Cpptraj updates on the mailing list but
I've just made a fairly large update to Cpptraj that I thought was
worth announcing. Note that this only applies to the GitHub version of

This is the first major version increase in a long time (to version
5.0.0). The main change is in how Cpptraj handles unit cell
information under the hood. Previously, CPPTRAJ assumed that unit cell
vectors read from trajectory files were X-aligned; i.e., the cell A
vector is aligned with the Cartesian X vector, and the B vector is in
the XY plane. While this is true for many MD software packages, if
this is not in fact the case (e.g. non-orthorhombic cells in Charmm)
then things like imaging can fail.

Cpptraj has now been rewritten so it can handle unit cell vectors in
any alignment. In general, performance has not suffered too much. Most
actions show a small (<2%) or no performance hit, and some actions
have improved speed between about 10% and 40% (detailed in the merge
request notes, linked below). Also, while I was in the code I managed
to find and fix bugs in the GIST, LIE, and PairDist actions (see merge
request notes for full details).

The biggest effect of this change is that imaging now occurs on a
per-frame basis, so things like unit cells that rotate or even change
shape from frame to frame are now properly handled. It also means that
coordinate rotation that would previously make imaging impossible
(from e.g. rms, principal, etc) is now also handled properly. In other
words, doing something like rms-fitting before imaging will no longer
fail! However, being able to write out rotated unit cell vectors
depends on the output trajectory format since most assume an X-aligned
cell. Currently the only formats that support writing "rotated" unit
cell vectors are Gromacs XTC and TRR (since they store the full unit
cell vectors themselves). I plan on extending the Amber NetCDF format
to store full unit cell vectors soon (I hope). Also, the helPME
library which handles the reciprocal part of the PME calculation
doesn't yet support directly setting unit cell vectors, so PME in
cpptraj doesn't support rotated unit cells at this time.

Another major change (done initially to support rotated unit cells) is
that the COORDS data set has been rewritten so that no data is lost
from input trajectories (aside from precision); i.e. values like time,
replica indices, etc are no longer lost when converting to COORDS

I've done my best to test this as thoroughly as possible, but if you
see problems with this version please let me know right away. For more
details, see here: https://github.com/Amber-MD/cpptraj/pull/870

Stay safe and healthy out there,


AMBER mailing list
Received on Wed Jan 20 2021 - 12:00:02 PST
Custom Search