Re: [AMBER] Dipole from a mask

From: Ismail, Mohd F. <farid.ou.edu>
Date: Fri, 9 Nov 2012 21:16:26 +0000

Thank you Dr. Roe for the clarification.

*******************************
Mohd Farid Ismail
Graduate Student
Dept. of Chemistry/Biochemistry
University of Oklahoma
Norman 73019

________________________________________
From: Daniel Roe [daniel.r.roe.gmail.com]
Sent: Friday, November 09, 2012 9:05 AM
To: AMBER Mailing List
Subject: Re: [AMBER] Dipole from a mask

Hi,

On Thu, Nov 8, 2012 at 10:07 PM, Ismail, Mohd F. <farid.ou.edu> wrote:
> I have a question about the behavior of distance based mask that is not clearly stated in the manual. Lets say in the 5.0 radius, the mask includes an atom from a water molecule that is not part of the cage, will the whole water molecule be included in the mask. From varying the radius, it seems to be the case. Is this true?

>From section 7.2.2 (Mask Syntax):
"The syntax for selection by distance is ’<:’, ’>:’, (residue based),
and ’<.’, ’>.’, (atom based). The ’<’ character means within, and ’>’
means without, e.g. [:11-17 <. 2.4] means all atoms within 2.4 A
distance to :11-17."

So since you used the ':' character, the entire residue is selected if
any of the residue atoms matches the criterion. If you just want the
atoms use the '.' symbol.

> Another question that I have, is the image built automatically? The system is a periodic box of molecule A in water, > and some of the molecule might be near the edge

Imaging is not performed during distance-based mask parsing to avoid
making the calculation intolerably slow. If you require imaging,
perform with the 'center'/'image' (ptraj) or 'autoimage' (cpptraj)
commands prior to doing the distance based mask.

-Dan

>
> *******************************
> Mohd Farid Ismail
> Graduate Student
> Dept. of Chemistry/Biochemistry
> University of Oklahoma
> Norman 73019
>
> ________________________________________
> From: Daniel Roe [daniel.r.roe.gmail.com]
> Sent: Thursday, November 08, 2012 10:05 AM
> To: AMBER Mailing List
> Subject: Re: [AMBER] Dipole from a mask
>
> Hi,
>
> On Wed, Nov 7, 2012 at 3:26 PM, Ismail, Mohd F. <farid.ou.edu> wrote:
>> Thank you Dr. Roe. The script is good. The only issue is for what ever reason, it won't work with cpptraj on my machine. It works if I switch to ptraj. I'm using AmberTools12.
>
> Yes, I should have caught this before - the vector code in AT12
> cpptraj is still using the old ptraj code under the hood, which
> doesn't understand how cpptraj deals with reference structures. I have
> since rewritten it and I was using the new cpptraj vector code when I
> tested that script - my apologies.
>
> Using ptraj should be fine but with one important caveat: unlike
> cpptraj, ptraj can't pick a frame from a reference trajectory (i.e. it
> always uses the first one), so you would need to split your trajectory
> into separate frames and then read them back in. The modified script
> for ptraj would be:
>
> #!/bin/bash
> NFRAMES=<frames>
> TOP=<topfile>
> rm ptraj.out
> # Step 1 - Create restarts
> ptraj $TOP >> ptraj.out <<EOF
> trajin mdcrd.run1 1 $NFRAMES
> trajout mdcrd.run1.rst7 restart
> EOF
> # Step 2 - Perform analysis
> for ((FRAME=1; FRAME <= NFRAMES; FRAME++)) ; do
> ptraj $TOP >> ptraj.out <<EOF
> reference mdcrd.run1.rst7.$FRAME
> trajin mdcrd.run1.rst7.$FRAME
> vector ve1 :402<:5.0 dipole out fileout.$EXT
> go
> EOF
> done
> cat fileout.* | grep -v "#" > filetotal
> rm fileout.*
>
> Sorry for the confusion. Hope this helps,
>
> -Dan
>
>>
>> *******************************
>> Mohd Farid Ismail
>> Graduate Student
>> Dept. of Chemistry/Biochemistry
>> University of Oklahoma
>> Norman 73019
>>
>> ________________________________________
>> From: Daniel Roe [daniel.r.roe.gmail.com]
>> Sent: Tuesday, November 06, 2012 2:31 PM
>> To: AMBER Mailing List
>> Subject: Re: [AMBER] Dipole from a mask
>>
>> 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
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Nov 09 2012 - 13:30:03 PST
Custom Search