Re: [AMBER] Computing forces by trajectory post-processing with sander

From: Alen Ahmetovic <>
Date: Mon, 22 Apr 2019 19:50:40 -0400

Hi Casalini,

It looks to me like you forgot the negative sign in your ntwf flag. You

Computing forces

Unless this in a typing error, I'm not sure otherwise. Sorry I couldn't be
of more help.



On Mon, Apr 22, 2019 at 3:54 PM Casalini Tommaso <> wrote:

> Dear Amber users and developers,
> I would like to compute the forces acting on a certain number of atoms in
> my molecular trajectory.
> In order to do this, I used sander with the following input file:
> Computing forces
> &cntrl
> imin=5,
> irest=1,
> ntx=5,
> ntwf=1,
> ioutfm=0,
> ntwprt=2000,
> ntb=2,
> ntp=1
> /
> I run sander with the appropriate flags, indeed everything goes smoothly
> and the computed energies make sense (I compared them with the previously
> obtained values from the simulations). Anyway, the file "forces.mdcrd"
> where I wanted to store the computed forces is empty.
> I had another look at the manual, which states:
> "Every ntwf steps, the forces will be written to the mdfrc file. If ntwf =
> 0, no force trajectory file
> will be written. If ntwf = -1, forces will be written to the mdcrd, which
> then becomes a combined
> coordinate/force trajectory file, at the interval defined by ntwx. This
> option is available only for binary
> NetCDF output (ioutfm = 1)."
> At this point, it is not clear to me whether the ntwf-not-equal-to-zero
> option is compatible only with ioutfm = 1 in every case, or if this is
> strictly true only when ntwf = -1. Indeed, I obtained an empty file but
> sander did not complain.
> My questions are the following:
> 1) Why did I obtain an empty file for the forces? Did I make some mistake,
> or should I put ioutfm = 1?
> 2) Assuming that I must set ioutfm = 1, I would like to have an ASCII
> formatted file for the force, since I wrote a post-processing code in
> matlab that can be "fed" with .mdcrd files. Can I make a Netcdf-to-ascii
> conversion with cpptraj as I do for molecular trajectories?
> I thank you in advance for your help and support.
> With my best regards,
> Tommaso
> _______________________________________________
> AMBER mailing list
AMBER mailing list
Received on Mon Apr 22 2019 - 17:00:02 PDT
Custom Search