Increase LJ cutoff to 4*sigma

[#83064836]

The cutoff was reduced to 2 two years ago. Increasing it again solves poor *apparent* energy conservation caused by the fact that we don't cutoff the calculation of LJ potential, though we do cutoff the calculation on LJ force. (The LJ potential drops off fast; at 4*sigma it is negligible.)

(We could just cutoff the potential calculation. However in general the LJ cutoff was too aggressive as there is a clear step change in the force when atoms approach and reach the cutoff distance. Furthermore, with 2 more years of mobile device amd JS engine improvements it's worth risking a slight performance hit to use the more accurate cutoff.)
Settable chem reactions update interval

[#74691454]

When the chemical-reactions plugin is run every 10fs and bond-vibration periods are smaller than that, the plugin fails to observe the bond potential energy exceeding the bond dissociation energy. This hasn't mattered for more-qualitative models that have many molecules, but interactives that allow a user to examine bond formation or breakage more quantitatively may need for the plugin to run every integration step.
Account for LJ-potential difference between bond creation and destruction

[#74691454]

The engine does not compute the LJ force between bonded pairs. Thus, when a bond forms, a certain amount of potential energy "disappears". The previous solution just added this missing energy as kinetic energy, however, this meant that the total energy added when a bond was created exceeded the bond's dissociation energy. The new solution is to remember the LJ potential when the bond was created, include the remembered value in the system's overall potential energy, and absorb or release kinetic energy (according to the LJ potential difference at creation vs. at destruction) when the bond is broken or transferred. (This achieves the same effect as if the engine were calculating the LJ potential of the bond; in retrospect a better solution may be to require the engine to compute LJ potential of bonded pairs when the chemical reactions plugin is used.)
Conserve momentum when creating/destroying bonds

[#74691454]

Previously, when bonds were created or destroyed, kinetic energy was added/removed from the bonded atoms by scaling their velocities. However, this can create strange effects (apparent acceleration in a direction unrelated to the release of bonded energy) which are noticeable and distracting when a student examines bond creation closely. The new solution releases energy into the bonded pair (or removes it from the bonded pair) without affecting their total momentum, just as if a force had been applied between the atoms.
Create radialBonds.creationPotential array in chem reactions plugin

[#74691454]

As it's used only by this plugin.
Fix #addKEToAtomPairAndConserveMomentum method

[#74691454]

Return false when momentum can't be conserved.
If fixes divergence issues that could happen in some chemical reaction
models (e.g. Hydrogen-Oxygen Reaction).
Merge branch 'chemical-reactions-energy-conservation'