next up previous contents index
Next: Subroutine connection_remove_atom Up: Module atoms_module Previous: Subroutine remove_bond   Contents   Index

Subroutine calc_connect_hysteretic


\begin{boxedminipage}{\textwidth}
\begin{verbatim}call calc_connect_hysteret...
...alt_connect,origin,extent, &
own_neighbour])\end{verbatim}
\end{boxedminipage}

Fast $O(N)$ connectivity calculation routine. It divides the unit cell into similarly shaped subcells, of sufficient size that sphere of radius cutoff is contained in a subcell, at least in the directions in which the unit cell is big enough. In narrow directions, the unit cell is replicated on the fly to collect neighbours that are images of the stored atoms. For very small unit cells, there is only one subcell, so the routine is equivalent to the standard $O(N^2)$ method.

this -- type(Atoms), intent(inout), target

alt_connect -- type(Connection), intent(inout), target, optional

origin -- real(dp), optional, dimension(3)

extent -- real(dp), optional, dimension(3,3)

own_neighbour -- logical, optional, intent(in)

connection_remove_atom subroutine

gabor 2009-06-30