Gareth Stockwell wrote:
Hi Kristl,I'm not sure if PyMOL can do it, but it's not too hard to do a bit of vector algebra which gives the answer. Let the coordinates of the nitrogens be A, B, C, D, and the iron atom F. Compute the centre of your nitrogens: X = (A + B + C + D) / 4 Then you work out a normal to the plane of the nitrogens using a cross product of vectors connecting three of your nitrogens * N = (AB x AC) (NB this gives a vector pointing 'out of the page' if A,B,C,D are labelled anticlockwise) Now the distance you want is the projection of the vector XF onto the normal N. This is given by N . (F - X) ----------- |N| If the atoms are labelled in the order described above, this number will be +ve if the iron is 'above the page' and -ve if it is below. Hope that's of some help, Gareth * There is no way to define a plane guaranteed to contain all four nitrogen atoms - the way I described only uses three of them. If you want to do this robustly, you should really compute the best-fitting plane for all four Ns, and return the iron-plane distance along with a measure of the error of the plane fitting.
moleman2 (Gerard Kleywegt, http://xray.bmc.uu.se/usf/moleman2_man.html) has a command (ON LS) for determining a least squares plane and its normal for a set of atoms - not sure about deviations from the plane, but once you have the plane and the coordinate you can calculate this as described by Gareth.
Cheers, Charlie -- Dr Charles S. Bond University of Dundee Tel: +44-1382-348325 Honorary Lecturer Dow St, Dundee Fax: +44-1382-345764 BBSRC David Phillips Fellow DD1 5EH, Scotland [email protected] School of Life Sciences http://stein.bioch.dundee.ac.uk/~charlie
