AMBER Archive (2009)Subject: Re: [AMBER] Need help with point to plane distance calculation in nab
From: IN SUK JOUNG (i.joung_at_gmail.com)
Date: Thu Jan 08 2009 - 13:00:20 CST
My rough calculation gives...
When the point is (x,y,z), distance = abs( ( z - Ax - By - C ) / ( A^2 + B^2
+ 1 ) )
You should check if it is valid by yourself.
On Thu, Jan 8, 2009 at 11:39 AM, M. L. Dodson <
activesitedynamics_at_comcast.net> wrote:
> Hello all,
>
> I'm having a brain cramp coming up with the correct algebra for an
> algorithm giving the distance from a point to a plane along a normal
> to the plane. In nab, I can calculate the least squares best fit of a
> plane of form z = Ax + By + C to a series of atomic positions
> (represented by a nab atom expression, complete_aex1, in the molecule
> mol) by using:
>
> plane(mol, complete_aex1, A, B, C),
>
> where complete_aex1 is an atom expression identifying the atoms whose
> positions are to be fit by the plane.
>
> I want to calculate the distance from that plane to another atom
> (given by aex2) ALONG A NORMAL to the plane.
>
> I need the correct POINT in the plane where the normal intersects. At
> first I set the x and y coords of the POINT to be the x and y coords
> of the atom given by aex2, say X and Y. Then set z coord of the POINT
> to be z = AX + BY + C. Then I calculated the distance between the
> position of atom aex2 and that point in the plane. But this (pretty
> clearly, it seems to me), is NOT along a normal to the plane.
>
> Can any of you geometers out there hit me with a clue bat? An
> algorithm will do. You do not need to know nab to answer.
>
> Thanks,
> Bud Dodson
> --
> M. L. Dodson
> Business Email: activesitedynamics-at-comcast-dot-net
> Personal Email: mldodson-at-comcast-dot-net
> Phone: eight_three_two-56_three-386_one
>
> _______________________________________________
> AMBER mailing list
> AMBER_at_ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
--
Best,
In-Suk Joung
_______________________________________________
AMBER mailing list
AMBER_at_ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
|