Closed joaander closed 7 years ago
Fix bug (Issue #246) incorrect value for r_cutsq passed. Add unit test.
Fixing issue 246 by calculating and passing r_cut * r_cut (as expected) to the evaluator class.
Add unit test for checking that cutoff is correctly handled.
Merged in bjensen80/hoomd-blue/fix_special_pair_lj_cutoff_not_squared (pull request #339)
Fix bug (Issue #246) incorrect value for r_cutsq passed. Add unit test.
fixes #246
Approved-by: Jens-Steffen Glaser jsglaser@umich.edu Approved-by: Joshua Anderson joaander@umich.edu
Original report by Bjørnar Jensen (Bitbucket: bjensen80, ).
EvaluatorSpecialPairLJ.h expects:
but is passed:
leading to this comparison being incorrect:
Thus, bond energies will not be evaluated when the bond distance is less than sqrt(r_cut), rather than the expected r_cut.
To fix this issue change the return statement in special_pair.lj.process_coeff():
or:
BTW: The unit test does not check for inside/outside cutoff functionality.