From: Yogesh Sharma (yogesh.rma13_at_gmail.com)
Date: Mon Nov 29 2021 - 12:51:18 CST

hi all

I used dipwatch gui to get dipole vector for the molecule from mol2 file
# frame dip_x dip_y dip_z |dip|
0 -0.05827735364437103 -1.521030306816101 -0.7441486716270447
 1.6943100925406684

Then we can use orient package to get (z) principle axis
set I [draw principalaxes $sel]
set A [orient $sel [lindex $I 2] {0 0 1}]

further, I can use dotproduct to get the angle between both vectors

proc angle { a b } {
set am [veclength $a]
   set bm [veclength $b]
   set dotprod [vecdot $a $b]
   return [expr 57.2958 * acos($dotprod / ($am * $bm))]
}

Now I am confused about how to define the dipole vector and the vector
corresponding to z only?
Can someone help me fill the gaps?

On Wed, Nov 10, 2021 at 11:14 AM Yogesh Sharma <yogesh.rma13_at_gmail.com>
wrote:

> sir i was referring to " ``bipolar'' orientation" text in nanotubes
> tutorial. basically I am interested in the observation that was made in
> this figure
>
> https://urldefense.com/v3/__https://www.researchgate.net/profile/Helmut-Grubmueller/publication/23677697/figure/fig3/AS:277277918154757@1443119615765/a-Bipolar-orientation-of-water-molecules-inside-the-aquaporin-1-channel-as-derived.png__;!!DZ3fjg!sTwGRI79iLfXvbIgq-t73anXFFxVefU4sajGKSpbvh06llSgrxB-nB6_3ljcTvY4Eg$
>
> I have modified nanotubes and i want to see molecular orientation through
> it. earlier i have done it using gmx gangle (geometrically) but it would be
> great if i can get dipole to Z angle.
> * with regards*
> *Yogesh Sharma*
>
>
>
> On Wed, Nov 10, 2021 at 3:44 AM John Stone <johns_at_ks.uiuc.edu> wrote:
>
>> Hi,
>> I just looked at the tutorial text you referenced, but I don't see any
>> discussion of scripts, nor of computing angles therein. Can you be
>> specific
>> about where you saw this?
>>
>> Best,
>> John Stone
>> vmd_at_ks.uiuc.edu
>>
>> On Mon, Nov 08, 2021 at 02:49:45PM +0530, Yogesh Sharma wrote:
>> > HiÂ
>> > I am looking to compute angle between molecular dipole and the
>> nanotube
>> > oriented in z direction over a 100ns trajectory. I got a reference
>> for
>> > the same in Vmd tutorials. But not getting the script for the same.
>> Can
>> > someone provide the link or trick to do so?
>> > [1]
>> https://www.ks.uiuc.edu/Training/Tutorials/science/nanotubes/nanotubes-html/node7.html
>> >
>> > References
>> >
>> > Visible links
>> > 1.
>> https://www.ks.uiuc.edu/Training/Tutorials/science/nanotubes/nanotubes-html/node7.html
>>
>> --
>> NIH Center for Macromolecular Modeling and Bioinformatics
>> Beckman Institute for Advanced Science and Technology
>> University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
>> http://www.ks.uiuc.edu/~johns/ Phone: 217-244-3349
>> http://www.ks.uiuc.edu/Research/vmd/
>>
>