Re: [AMBER] Loading Topology & Trajectory Files

From: Gustaf Olsson <>
Date: Wed, 24 Mar 2021 14:00:36 +0000

Nice, I’ll set up some trial runs with pending analyses and if results differ I’ll let you know!

Thank you and best regards
// Gustaf

On 24 Mar 2021, at 14:37, Daniel Roe <<>> wrote:


On Tue, Mar 23, 2021 at 5:51 AM Gustaf Olsson <<>> wrote:
parm .*.prmtop
trajin ...
trajin ..
hbond S1 series out series.dat nointramol image \
donormask :ACT.N donorhmask :ACT.H \
acceptormask :TCA.O \
avgout avg.dat
hbond S2 series out series2.dat nointramol image \
donormask :ACT.O donorhmask :ACT.OH \
acceptormask :TCA.O \
avgout avg2.dat
runanalysis lifetime S1[solutehb] out lifetime.dat
runanalysis lifetime S2[solutehb] out lifetime2.dat

This should work fine. The initial commands prior to 'run' will set up
two separate 'hbond' calculations; generated datasets will be named S1
and S2 respectively. Unlike some other analyses, you have to 'run'
before the 'lifetime' analysis in this case because cpptraj doesn't
know beforehand what hydrogen bonds will be present (although this is
behavior I have some ideas about addressing in the future). As long as
S1 and S2 contain some data, the subsequent 'lifetime' analyses should
run fine.

That said, if you see this is not the case, please let me know so I
can track down and fix any bugs!


Best regards
// Gustaf

On 22 Mar 2021, at 15:37, Daniel Roe <<>> wrote:


You can do all the analysis in one script. However, be aware that
certain analyses (like 'rms' with fitting) will alter the coordinates
for subsequent analyses. This is in general more important for older
versions of cpptraj (< 5.0) but is important to be aware of in all

Below is an example of having everything done in one pass, where the
commands that do not modify coordinates come first. I'm taking
advantage of the fact that you typically want to fit coordinates to a
reference structure for 'rmsf' to remove global rotation/translation
anyway (which is why 'rmsf' comes after 'rms'); here I'm using the
first frame as a reference but you may want to use something else.
Also note I'm just doing the 'bare-bones' versions of these commands;
you'll want to check the manual for full details (particularly for a
more complex command like 'hbond'). Replace <mask> with masks
selecting your desired atoms. If you want a better surface area than
LCPO, replace 'surf' with 'molsurf' (but be aware it is slower). RoG,
HB, LCPO, ToFirst, and Fluct are just used to name the resulting data
sets and can be changed to whatever you like. Hope this helps.

parm topology.parm7
# Actions that do not modify coordinates
rog RoG <mask> out rog.dat
hbond HB <mask> out nhbonds.dat avgout hbavg.dat
surf LCPO <mask> out
# Best-fit RMSD performed by default
rmsd ToFirst first <mask> out rmsd.tofirst.dat
rmsf Fluct <mask> out rmsf.dat

Hope this helps,


PS - You may find the analysis tutorials helpful:

On Fri, Mar 19, 2021 at 5:25 PM Jatin Kashyap <> wrote:

Dear AMBER Community,

I have question about CPPTRAJ. I have to perform RMSD, RMSF, HBOND, SASA,& RoG analysis on around 20 complexes through a shell script based batch job.
For a given complex, do I have to load topology & trajectory file for all of the individual analysis separately or I can just load it once and then perform RMSD, RMSF, HBOND, SASA, & RoG analysis one by one?

Thank you.

Jatin Kashyap
Ph.D. Student
Dr. Dibakar Datta Group
Department of Mechanical and Industrial Engineering
New Jersey Institute of Technology (NJIT)
University Heights
Newark, NJ 07102-1982
Phone- (201)889-5783

AMBER mailing list

AMBER mailing list

AMBER mailing list<>

AMBER mailing list<>

AMBER mailing list
Received on Wed Mar 24 2021 - 07:30:02 PDT
Custom Search