Given an origin atom and a list of other atoms, give information as to whether the other atoms are distributed roughly linearly, planar or spherically around the origin atom.
The most notable use is to check that the splines in adjustable potential will be able to reproduce a randomly oriented force difference well.
The information returned is the set of eigenvectors and associated eigenvalues of the directionality ellipsoid. One large e-value suggests roughly linear clustering, two similar and one small e-values suggest a planar distribution, while three similar e-values suggests almost spherical distribution (when copies of the atoms reflected through the origin atom are also considered).
To acheive a more spherical distribution, atoms along the e-vector(s) with the smallest e-value(s) should be added to the index list (See CosAngle_To_Line below).
The matrix which is diagonalised is an average of the outer products of the unit vectors from the origin atom to the other atoms.
An outer product has 1 eigenvector which is the vector it was constructed from with eigenvalue 1 and the other eigenvectors have eigenvalue 0.
The eigenvalues of the averaged matrix sum to 1.
The input atoms structure
The origin atom
Indices and shifts of the other atoms relative to origin
Eigenvalues of the directionality matrix
Eigenvectors of the directionality matrix
METHOD = 1 Directionality ellipsoid method
METHOD = 2 Singular Value Decomposition method (default)