Skip to content Skip to sidebar Skip to footer

Calculation Of Contact/coordination Number With Periodic Boundary Conditions

I have data for N atoms including the radius of each atom, the position of each atom and the box dimensions. I want to calculate the number of atoms each atom is in contact with an

Solution 1:

Yes, the double-touch issue explains the problem with the 8-atom simulation. Double-touch pairs are 1-8 and 3-6, both of those wrapping through the x dimension. Note the instances in which a difference in one of the dimensions is close to Lx/2, while the other two distances are relatively small. This means that the atoms reach fully around your space-wrap and touch on the other side. Your current code counts only one of the touches.

To fix this, look at touching pairs for distance values in the range Lx-radius - radius (repeating for Ly and Lz). Any you find need to be "inverted": distance = Lx-distance. Then you look for another set of touches involving only those touching pairs you changed.

Note that this can happen only when a box dimension is less than twice the radius. Can you provide error output for such a case? Since you're getting the problem for a larger box, the above issue won't solve the problem with the larger set. Perhaps something with 8 atoms, but a box size of 2.1?

Post a Comment for "Calculation Of Contact/coordination Number With Periodic Boundary Conditions"