2 ms·
This type of calculation is used on a very regular basis in molecular dynamics simulation. The wrap-around space is implemented using periodic boundary conditio
by tomahunt 9y ago
This type of calculation is used on a very regular basis in molecular dynamics simulation. The wrap-around space is implemented using periodic boundary conditions. Calculating the distance between points is most often done using what is called the minimum image convention. In one dimension for a "box" of length L the minimum image distance between particles i and j: xij = xj - xi can be calculated through xij <- xij - L*nint(xij/L). This avoids any if statements.