[gmx-users] gangle for a plane and z axis
ramezanpour.mohsen at gmail.com
Wed Jan 24 01:20:56 CET 2018
Hi Gromacs users,
I would like to calculate the angle distribution between a plane and z
axis using gangle.
In a 5-member ring, there are three atoms of O1-C-O2 which form an angle.
So, I will choose these three atom names to define the plane.
I am not sure how the g_angle makes the vector normal for this plane,
though. I know that it first make two vectors, and then does a cross
product of these two initial vectors to make the normal vector to the
plane. But, what is the direction of the vector normal to this plane?
Looking at the calc_vec function (lines 652 to 690) code from:
It is using functions cprod and rvec_sub.
I found cprod definition here:
cprod (v1,v2,xout) means C = v1 * v2 (so the Right Hand Rule can be used to
get the direction)
I could not find rvec_sub function, though. However, I think:
rvec_sub(x, x, v1) gives the v1 as v1= x-x. i.e. a vector
starting from x and ending on x.
Are these correct?
*Rewards work better than punishment ...*
More information about the gromacs.org_gmx-users