Movable hash algorithm for search of the neighbor atoms in molecular dynamics simulation

In this paper, we suggested an algorithm called as movable hash, by which the neighbor atoms of a given atom in the process of molecular dynamics simulation can be rapidly determined. The main idea of this algorithm is to divide the simulation box into cells with a size smaller than the diameter of the atom to ensure only one atom in a cell at any time. Each cell is represented by an element of a three-dimensional array, the value of which equals either to the address where the message of the atom in this cell is stored or to nil. Then in one cycle loop of the sub-indexes of the array, we can easily operate to all neighbor atoms of a special atom. The speed to find all neighbor atoms of a given atom by movable hash method is only one third of that by the cell index method when the cell size equals to half of the diameter of the atom.