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

Assert that box sizes are not zero. #381

Open
proteneer opened this issue Apr 1, 2021 · 4 comments
Open

Assert that box sizes are not zero. #381

proteneer opened this issue Apr 1, 2021 · 4 comments

Comments

@proteneer
Copy link
Owner

proteneer commented Apr 1, 2021

We should assert that for rectangular boxes, the diagonal elements are zero, as a box size of zero is just undefined behavior.

jfass pointed out that it probably suffices to just do this check in the context.

@maxentile
Copy link
Collaborator

Perhaps the context constructor should even assert something stronger, e.g. that the minimum box edge length >= cutoff / 2?

@badisa
Copy link
Collaborator

badisa commented Feb 2, 2022

We now check that the box edge lenght >= cutoff / 2. This check is in the non-bonded potential, though verifying it in the context would be good as well.

@maxentile
Copy link
Collaborator

Checking in the context constructor made more sense when the box dimensions were constant for the lifetime of the context -- seems better for this check to be in the nonbonded potential now...

@badisa
Copy link
Collaborator

badisa commented Aug 10, 2022

Can we close this?

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

3 participants