From: Jayendra Balasubramanian (balas002_at_bama.ua.edu)
Date: Fri Dec 08 2006 - 14:52:31 CST

Hi Myunggi,

            If I understand your question correctly, I have run across a
similar problem, and found that the eigenvector method to determine the
Euclidean plane does not work very well for a case like this. This is the
method I used to determine the best fit plane:

1. Define the collection of atoms.
2. Pick any atom at random from the collection and its two nearest
neighbors. Calculate the normal to the plane formed by the three atoms.
3. Repeat step 2 for every atom in the system - you will get a collection of
normals from all the planes. At this point make sure that all the normals
are pointing in the same direction - if they are not simply change the signs
to make them point in the same direction.
4. Calculate an average normal from the collection of normals - the average
normal will give you the normal to the plane of best fit.

Jay.

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of
Amarda Shehu
Sent: Friday, December 08, 2006 2:21 PM
To: Myunggi Yi
Cc: vmd-l_at_ks.uiuc.edu
Subject: Re: vmd-l: Best fit plane axis

Hi Myunggi,

I hope I understand your question right. It seems to me you want to do a
linear projection of these atom coordinates on a d=2 Euclidean space. You
can use pca (principal component analysis) and only use the two
eigenvectors corresponding to the largest two eignvalues. These two
vectors will be the basis for the best-fitting plane.

-Amarda

On Fri, 8 Dec 2006, Myunggi Yi wrote:

> Dear VMD users,
>
> Do you have any script for calculation of best fit
> plane through selected atoms?
>
> I can imagine for three atoms, but
> for more than three atoms I need some algorithm.
>
> Even if you have some idea or a seed for a script,
> let me know.
>
> Have a nice day.
>
>
> --
> Best wishes,
>
> MYUNGGI YI
> ==================================
> KLB 419
> Institute of Molecular Biophysics
> Florida State University
> Tallahassee, FL 32306
>
> Office: (850) 645-1334
> http://www.scs.fsu.edu/~myunggi
>