next up previous contents index
Next: Function prop_names_string Up: Module atoms_module Previous: Function centre_of_mass   Contents   Index

Function cosangle_to_line


\begin{boxedminipage}{\textwidth}
\begin{verbatim}c = cosangle_to_line(this,atom,dir,test_atom)\end{verbatim}
\end{boxedminipage}

For use with the Directionality routine above. Given an atom (atom) and a direction (dir) return the absolute value of the cosine of the angle between the the line running through atom in direction dir and the line between atom and test_atom

The idea is that this will be called with the origin atom from Directionality as atom, the eigenvector associated with the smallest eigenvalue as dir and a potentially new atom to connect to atom with a spline as test_atom.

If the result is close to 1 then accept the test_atom, and reject if close to zero

this -- type(atoms), intent(in)

atom -- integer, intent(in)

dir -- real(dp), dimension(3), intent(in)

test_atom -- integer, intent(in)

Return value -- real(dp)

prop_names_string function

gabor 2009-06-30