4.33. LSQPL: Least-squares planes & lines

Authors: George Davenport and Howard Flack

Contact: Howard Flack, Laboratoire de Cristallographie, University of Geneva,CH-1211 Geneve 4, Switzerland.

LSQPL calculates the least-squares plane or line through a set of specified atoms and the angles between sets of least-squares planes and lines.

4.33.1. Calculations Performed

LSQPL calculates the equations of least-squares lines and planes. The method of calculation is that of Schomaker, Waser, Marsh and Bergman (1959) with the exception of the method used for obtaining the roots of the cubic equation in Lagrangian multipliers. Schomaker et al. used an iterative technique, whereas LSQPL solves for the roots directly by the general solution equations. LSQPL also calculates the values and their estimated standard deviations of the distances of atoms from the least-squares planes or lines, and of the angles between planes and lines. The least-squares plane or line equation is output both in fractional and orthogonal Angstrom coordinates parallel to a*, b', c (Rollett, 1965). Cell and symmetry data are taken from the bdf. The bdf also provides atom coordinates which may be supplemented or updated with values read from the line input on site lines. The atoms used in the calculations may be supplemented by those related by a centre of symmetry at a position indicated on the plane or line lines. LSQPL also permits the selection of defining atoms to be used in the least-squares plane calculations (define line) and non-defining atoms to be used only to calculate the atom-to-plane or -line distances (nondef line).

4.33.2. Choice of Method

The 2.6 version of this program used the algorithm of Ito (1981). The algorithm of Ito works well for the calculation of least-squares planes. However (see Flack, 1990), when applied to the calculation of best-lines through a set of atoms, it either finds the best-plane or has poor convergence properties. The much older algorithm of Schomaker et al. (1959), used in the X- RAY 76 version of LSQPL by Roger Chastain and Wilson de Camp, has the considerable advantage of applying to both least-squares lines and planes. Of the original Davenport LSQPL XTAL program the input/output sections have been retained and the calculation section rewritten by Flack. For the calculation of the variance-covariance matrix of the plane normal/line direction, it should be pointed out that the formula nM = C-1 given by Hamilton (1961,1964) [equation 15 of Hamilton (1961) and equation 22, section 5-8 of Hamilton (1964)] are incorrect. Hamilton's derivation is based on taking expectation values of (mi - µi)(mj - µj) assuming that the three mi are independent random variables. In fact m should be constrained to be a unit vector, leading to only two independent random variables, as clearly indicated in the work of Waser, Marsh and Cordes (1973). The variance- covariance matrix of m should thus be evaluated by elimination of one of the mi contributing to C before inversion followed by augmentation (by propagation of errors), after inversion, for the eliminated variable. A difficulty in the calculation of estimated standard deviations of interplanar or interlinear angles is a sin2 appearing in the denominator of the expression for converting variance(cos) into variance() [Equation 16 of Waser, Marsh & Cordes (1973) and equation 26 of Ito (1981)]. For values of close to 0, this leads to very large e.s.d.s or division by zero. In LSQPL the problem is resolved by using a finite difference rather than a differential formula:

() = | arccos[cos ± (cos)] - |

4.33.3. File Assignments

Reads existing atom and symmetry data from the input archive bdf.

4.33.4. Example

LSQPL
PLANE
DEFINE N11 C12 C13 C14 C15 C16
nondef Ni
LINE
DEFINE Ni N1 C1 S1

4.33.5. References