Re: [AMBER] Dipole from a mask

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Tue, 6 Nov 2012 13:31:42 -0700

Hi,

You have the correct syntax for the distance selection operator, but
as with ptraj this currently this requires a reference structure to be
loaded with the 'reference' command. However, this will only perform
distance selection based on that reference frame - unfortunately,
masks that update with every frame are not yet implemented (except
within the 'mask' action). If you a mask to update update every frame
in general, a current workaround could be to call cpptraj/ptraj on
each individual frame, using that frame as a reference structure, e.g.

#!/bin/bash
NFRAMES=<frames>
TOP=<topfile>
rm cpptraj.out
for ((FRAME=1; FRAME <= NFRAMES; FRAME++)) ; do
  EXT=`printf "%06i" $FRAME`
  cpptraj $TOP >> cpptraj.out <<EOF
reference mdcrd.run1 $FRAME
trajin mdcrd.run1 $FRAME $FRAME
vector ve1 :402<:5.0 dipole out fileout.$EXT
go
EOF
done
cat fileout.* | grep -v "#" > filetotal
rm fileout.*

Hope this is helpful.

-Dan

On Mon, Nov 5, 2012 at 2:29 PM, Ismail, Mohd F. <farid.ou.edu> wrote:
> Hi, I have a box of molecule A dissolved in water. I want to calculate the dipole moment of the water forming the cage around molecule A (i.e. the first layer of water molecule surrounding molecule A). I tried using cpptraj but I don't think I have what I really want.
>
> In general, I create a script file that contains these lines (1) and (2), and do cpptraj -i dipole.script -p prmtop > output. The commands in the script used:
>
> (1) trajin mdcrd.run1
> vector ve1 (:402<:5.0) dipole out fileout
>
> >From what I understood, the :402 should be the residue number of molecule A, <: should give all the residue within, and the 5.0 is the distance. But when I change the value of 5.0 to 10.0, I still get the same dipole vector, thus I don't think I am doing it right.
>
> After a few trials, I just get the error in three separate lines, with no output file written.
> "selectDistd(): No coordinate info for distance operator.
> Error: selectDistd failed.
> Segmentation fault"
>
> (2) trajin mdcrd.run1
> vector ve1 [:402<:5.0] dipole out fileout
>
> if I try this, I will just get the error
> "Unknown symbol ([) expression when parsing atom mask ([:402<5.0])
> parsing atom mask: unknown symbol (?)
> Segmentation fault"
>
> Can anyone shed some light on what I am missing here?
>
>
> *******************************
> Mohd Farid Ismail
> Graduate Student
> Dept. of Chemistry/Biochemistry
> University of Oklahoma
> Norman 73019
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber



-- 
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 201
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-9119 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Nov 06 2012 - 13:00:04 PST
Custom Search