AMBER Archive (2008)

Subject: Re: AMBER: ptraj selection

From: Ilyas Yildirim (yildirim_at_pas.rochester.edu)
Date: Wed Jul 09 2008 - 23:27:35 CDT


On Wed, 9 Jul 2008, David Watson wrote:

> On Jul 9, 2008, at 10:13 PM, Ilyas Yildirim wrote:
>
> > On Wed, 9 Jul 2008, David Watson wrote:
> >
> >> On Jul 9, 2008, at 8:07 PM, Ilyas Yildirim wrote:
> >>
> >>> Dear All,
> >>>
> >>> I have the following ptraj script:
> >>>
> >>> ----------------------------
> >>> trajin gacc_nowater_all.mdcrd.gz
> >>> rms first out rmsd.all.heavy "(:
> >>> 1-4_at_C1',C2',C3',C4',C5',O4',O5',O3',P) | (:1,2_at_N9,C8,C4) | (:
> >>> 3,4_at_N1,C2,C6)"
> >>> -----------------------------
> >>> (The second part of the script is one line).
> >>>
> >>> The ptraj output selects the wrong atoms. Here is the ptraj output:
> >>>
> >>> ----------------------------------------------
> >>> PTRAJ: rms first out rmsd.all.heavy
> >>> "(:1-4_at_C1',C2',C3',C4',C5',O4',O5',O3',P) | (:1,2_at_N9,C8,C4) |
> >>> (:3,4_at_N1,C2,C6)"
> >>> Mask [(:1-4_at_C1',C2',C3',C4',C5',O4',O5',O3',P) | (:1,2_at_N9,C8,C4) |
> >>> (:3,4_at_N1,C2,C6)] represents 23 atoms
> >>> [No output trajectory specified (trajout)]
> >>>
> >>> PTRAJ: Successfully read the input file.
> >>> Coordinate processing will occur on 100000 frames.
> >>> Summary of I/O and actions follows:
> >>>
> >>> INPUT COORDINATE FILES
> >>> File (gacc_nowater_all.mdcrd.gz) is an AMBER trajectory (with box
> >>> info)
> >>> with 100000 sets
> >>>
> >>> NO OUTPUT COORDINATE FILE WAS SPECIFIED
> >>>
> >>> ACTIONS
> >>> 1> RMS to first frame using no mass weighting
> >>> Dumping RMSd vs. time (with time interval 1.00) to a file named
> >>> rmsd.all.heavy
> >>> Atom selection follows :1-4_at_P,N1,C2,C4,C5,C6
> >>> ----------------------------------------------
> >>>
> >>> Can someone tell me what the mistake in the ptraj script is? Thanks
> >>> a lot.
> >>>
> >>
> >> I think the problem lies with the use of quotes and parentheses.
> >
> > Can you explain a little bit more? If I do not use the quotes and
> > paranthesis, ptraj won't read the part after the first '|'. Thanks.
> >
>
> I can only refer you to the 'ambmask' section of the Amber Users'
> Manual, as that is all that I can find on the matter.
> Braces are definitely verboten, whereas parentheses are permitted, but
> I don't see where quotes are permitted.
>
> Perhaps use the parentheses without quotes?
>

The quotes does not look like to create the problem. According to the
manual, the mask should be enclosed in double quotes if the new parser is
used (pp 245, Section 10.1).

I am trying to follow the information given in $AMBERHOME/src/ptraj/mask.c
because the mask part of ptraj in the manual is not clear.

------------ $AMBERHOME/src/ptraj/mask.c ----------------------
.
.
.
 * The syntax for elementary selections is the following
 * :{residue numlist} e.g. [:1-10] [:1,3,5] [:1-3,5,7-9]
 * :{residue namelist} e.g. [:LYS] [:ARG,ALA,GLY]
 * @{atom numlist} e.g. [@12,17] [@54-85] [@12,54-85,90]
 * @{atom namelist} e.g. [@CA] [@CA,C,O,N,H]
 * @/{element namelist} e.g. [@/H] [@/C,H]
 * :* means all residues and @* means all atoms
 *
 * The matching is case sensitive.
 *
 * compound expressions of the following type are allowed:
 * :{residue numlist | namelist}@{atom namelist | numlist | typelist}
 * and are processed as (i.e. replaced by two AND'ed expressions):
 * :{residue numlist | namelist} & @{atom namelist | numlist | typelist}
 * e.g. :1-10_at_CA is equivalent to :1-10 & @CA
 * :LYS@/H is equivalent to :LYS & @/H
 *
 * more examples:
 * :ALA,TRP ... all alanine and tryptophane residues
 * :5,10_at_CA ... CA carbon in residues 5 and 10
 * :* & !@/H ... all non-hydrogen atoms (equivalent to "!@/H")
 * @CA,C,O,N,H ... all backbone atoms
 * !@CA,C,O,N,H ... all non-backbone atoms (=sidechains for proteins only)
 * :1-500_at_O & !(:WAT | :LYS,ARG)
 * ... all backbone oxygens in residues 1-500 but not in
 * water, lysine or arginine residues
.
.
.
-------------------------------------------------------

According to these examples, I do not see any mistake with the mask
"(:1-4_at_C1',C2',C3',C4',C5',O4',O5',O3',P) | (:1,2_at_N9,C8,C4) |
(:3,4_at_N1,C2,C6)". Thanks again.

-- 
  Ilyas Yildirim
  ---------------------------------------------------------------
  = Department of Physics        -                              =
  = University of Rochester      -                              =
  = 585-275-6766 (office)        - 585-267-5644 (home)          =
  = http://www.pas.rochester.edu/~yildirim/                     =
  ---------------------------------------------------------------

----------------------------------------------------------------------- The AMBER Mail Reflector To post, send mail to amber_at_scripps.edu To unsubscribe, send "unsubscribe amber" (in the *body* of the email) to majordomo_at_scripps.edu