timemachine icon indicating copy to clipboard operation
timemachine copied to clipboard

Assert that box sizes are not zero.

Open proteneer opened this issue 3 years ago • 4 comments

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.

proteneer avatar Apr 01 '21 22:04 proteneer

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

maxentile avatar Apr 01 '21 23:04 maxentile

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.

badisa avatar Feb 02 '22 15:02 badisa

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...

maxentile avatar Feb 02 '22 20:02 maxentile

Can we close this?

badisa avatar Aug 10 '22 14:08 badisa