next up previous contents index
Next: Elements Up: Module atoms_module Previous: Elements   Contents   Index

Type Connection

We do not use a minimum image convention, rather, collect all the images of a neigbouring atom that fall withing the neighbour cutoff. The different images are made distinct in the connection list by having different shift vectors associated with them.

To save storage, the neighbour1 table contains all information about the connection but is only filled in for $i <= j$. neighbour2 is just a list of those of $i$'s neighbours with $i > j$ together with an index into the neighbour1 table of atom $j$.

In normal use (i.e. outside this module) you don't need direct access to the tables so you should use the interface functions atoms_n_neighbours and atoms_neighbour which hide the distiction between the cases $i <= j$ and $i > j$.

neighbour1(i)%int neighbour1(i)%real
1 2 3 4 1
$j$ shift_a shift_b shift_c $r_{ij}$

neighbour2(i)%int
1 2
$j$ $n$

N.B. If $i$ and $j$ are neighbours with shift shift, then norm(atoms%pos(j) - atoms%pos(i) + shift) is a minimum. Mnemonic: shift is added to $j$ to get closer to $i$.


Subsections
next up previous contents index
Next: Elements Up: Module atoms_module Previous: Elements   Contents   Index
gabor 2009-06-30