You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When passing wrapped=False to the periodic space functions, it seems that in addition to displacement and shift, it is important to define a third function that allows the user to put the particles back in the box. A typical use case would be to use unwrapped positions during a simulation because they are (presumably) faster, and then do something like R = wrap(state.position) to get the final positions. My thinking is that there are two options for the api:
When passing wrapped=False to the periodic space functions, it seems that in addition to displacement and shift, it is important to define a third function that allows the user to put the particles back in the box. A typical use case would be to use unwrapped positions during a simulation because they are (presumably) faster, and then do something like
R = wrap(state.position)
to get the final positions. My thinking is that there are two options for the api:option 1:
displacement, shift = space.periodic(L)
displacement, shift, wrap = space.periodic(L, wrapped=False)
option 2:
displacement, shift = space.periodic(L)
displacement, shift = space.periodic(L, wrapped=False)
displacement, shift, wrap = space.periodic(L, wrapped=False, wrap_function=True)
The second option might be preferable since it would be backwards compatible. I would be happy to take a first shot at this if that would be helpful.
The text was updated successfully, but these errors were encountered: