AMBER Archive (2004)

Subject: Re: AMBER: ptraj parser

From: Viktor Hornak (
Date: Wed Apr 07 2004 - 11:20:40 CDT

Thomas C. Bishop wrote:

> I have found that if the file name begins with the text "nofit"
> then the parser mistakenly picks up this file name as the "nofit" key
> word and scrambles the rest of the line.
> The easy solution is to name the files "sys.nofit.rms" or "notfit" or
> anything that does not begin with "nofit"!

indeed, this seems to be the case. Fortunately, the workaround is quite
easy and should suffice until this bug gets fixed in the ptraj argument
stack parsing routines.

> Just a friendly reminder to all ptraj users
> "Note that the current parser is not very sophisticated." (amber
> manuals, 6,7,8)
> Now can anyone suggest how I select only the heavy atoms for a
> limited number of residues?
> example:
> :1-50@~H* applies the "NOT" to the residue selection AND atom selection.
> :1-50_at_C*,N*,O*,S*,P* should pick up all non-hydrogens for resids
> 1-50 right? or does this miss some atoms?
> Other suggestions for getting the rms that I want?

ptraj should dump all selected atoms to stdout, so that you can check
the correctness of the atom masks you suggest (minimally make sure that
number of selected atoms is what you expect). A more flexible atom
selection parser will be put into ptraj soon (don't ask how soon :-)).
Because ptraj is also distributed separately from amber8 package, there
should be no problem to obtain the updated version...


> ************************** ptraj script ****************
> #!/bin/csh
> set BAC = "@CA,C,N,O"
> set SYS = ":1-105"
> set PRO = ":1-76"
> set DNA = ":77-105"
> set NA = ":106-116"
> set CL = ":117-128"
> set PARM = "nowat.parm"
> set TRAJ1 = "nowat.eq1-2.dcd"
> set BASEDIR = "/data/bishop/sims/"
> setenv AMBERHOME /usr/local/amber/amber8
> $AMBERHOME/exe/ptraj $PARM << EOF
> trajin nowat.eq1-2.dcd 1 5 1
> rms first mass out nofit.sys.rms $SYS nofit
> rms first mass out fit.sys.rms $SYS
> rms first mass out $PRO
> rms first mass out fit.probac.rms $PRO$BAC
> go

Viktor Hornak
Center for Structural Biology
SUNY at Stony Brook             

----------------------------------------------------------------------- The AMBER Mail Reflector To post, send mail to To unsubscribe, send "unsubscribe amber" to