Here is my version of the harmonic. It removes the internal scaling
factors since those only make sense given various assumptions about the
system. Instead offers a function which allows you to compute the spring
constant from a standard deviation (and a temperature) if you want those
assumptions to hold. This way harmonic can be used to construct more
complicated potentials as well as to mimic modeller/charm if desired. No
existing code meaningfully depended on the old behavior. The test code
has been patched.
We talked about this before, as obviously anybody that uses the current
Harmonic behavior will have to change all of their code. But since
nobody appears to care either way (I don't recall seeing any responses
to that thread) I will go ahead and commit Daniel's patch later today.
You can then figure out how to fix your code. ;)