Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Neighbor lists are broken for rigid bodies. #302

Open
MaxiLechner opened this issue Feb 26, 2024 · 0 comments
Open

Neighbor lists are broken for rigid bodies. #302

MaxiLechner opened this issue Feb 26, 2024 · 0 comments

Comments

@MaxiLechner
Copy link
Contributor

I've found that using neighbor lists together with rigid bodies sometimes gives wrong results when using cell lists to build the neighbor lists.

I think this is caused by rigid_body.union_to_points mapping some of the points outside the simulation box if the center of mass is near the edge of the box in combination with some (potentially missing) bounds checking in the cell_list code.

This bug can be demonstrated with a single dimer interacting via a soft-sphere potential . This isn't a super clean example as changing the orientation from 0 to pi changes the output of the neighbor list calculation even though this results in the same configuration if particle labels are permuted but I haven't yet been able to further narrow it down.

Shifting the output of rigid_body.union_to_points by zero using the shift function seems to do the job to make sure that the correct neighbor list is allocated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant