m3g / CellListMap.jl

Flexible implementation of cell lists to map the calculations of particle-pair dependent functions, such as forces, energies, neighbor lists, etc.
https://m3g.github.io/CellListMap.jl/
MIT License
87 stars 4 forks source link

Removing periodic boundary conditions #97

Closed edwinb-ai closed 6 months ago

edwinb-ai commented 6 months ago

Is it possible to remove the periodic boundary conditions at some point using the PeriodicSystems interface?

My use case is to compute and save to disk the unwrapped particle coordinates (without applying periodic boundary conditions) for computing dynamical quantities such as the mean squared displacement.

lmiq commented 6 months ago

But does the system has periodic boundary conditions or not? CellListMap does not modify the original coordinates provided, so if you propagate your coordinates in you simulation without wrapping them manually, they will "appear" as not having periodic boundary conditions and the MSD will be the one expected. This is what one normally expects: the system does have PBCs, but the coordinates can be saved without wrapping, thus facilitating the computation of these quantities. Is this the case?

edwinb-ai commented 6 months ago

I see, you are right, I have now implemented periodic boundary conditions and it works as expected.

Maybe I had the wrong impression of having to specify a unit cell in the neighborlist function, as per the documentation, but I understand now that this is not enforced by the cells themsleves, it is a matter of how the coordinates are propagated.

Thanks for the clarification.