timemachine
timemachine copied to clipboard
Assert that box sizes are not zero.
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.
Perhaps the context constructor should even assert something stronger, e.g. that the minimum box edge length >= cutoff / 2?
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.
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...
Can we close this?