do ij = 1, M M: number of cell pairs
|
icel = cell_index(1,ij) First cell index of the cell pair
|
jcel = cell_index(2,ij) Second cell index of the cell pair
|
do i = 1, N(icel) N(icel): Number of atoms in icel-th cell
|
do j = 1, N(jcel) |
rij(1) = coord(1,i,icel)-coord(1,j,jcel) |
rij(2) = coord(2,i,icel)-coord(2,j,jcel) |
rij(3) = coord(3,i,icel)-coord(3,j,jcel) |
dij = sqrt(rij(1)2+rij(1)2+rij(1)3) |
if (dij < pairlist cutoff) then |
Neighbor(i,ij) = Neighbor(i,ij) + 1 |
k = Neighbor(i,ij) |
write Neighbor_list(k,i,ij) |
end if |
end do |
end do |
end do |