Re: [AMBER] Trajout by distance

From: Daniel Roe <>
Date: Mon, 15 Jul 2019 09:31:32 -0400


You can use the 'outtraj' command with the 'maxmin' keyword to have it
only output frames that match given criteria. So for example, to print
out frames where the C.o.M. distance between molecules 1 and 2 is
between 1 and 4 Angstroms:

parm myparm.parm7
distance d1 ^1 ^2
outtraj maxmin d1 min 1.0 max 4.0

Note that the 'outtraj' command occurs *within* the flow of actions,
as opposed to 'trajout' which only happens after all actions have been
processed, so place it accordingly.

Hope this helps,


On Mon, Jul 15, 2019 at 7:07 AM Pietro Aronica
<> wrote:
> Hello,
> I have a trajectory where my peptide is at a variable distance from my
> protein. I can calculate this distance using the appropriate command,
> but how can I then tell cpptraj to extract the frames where this
> distance is lower than a certain value and trajout a trajectory where my
> peptide is close to the protein? Is there even an easy way of doing
> this? Is there a separate command for it?
> Any help is appreciated.
> Pietro Aronica
> _______________________________________________
> AMBER mailing list

AMBER mailing list
Received on Mon Jul 15 2019 - 07:00:03 PDT
Custom Search