Bugfix in fix restrain

Hej,

I found a small glitch in fix restrain. If multiple restrains are applied energies will not be accumulated. I've attached a bugfix for that to this mail (Basically I've just added every time the energy is calculated a plus sign: energy += ...). I promise next time I find and fix a bug I'll send this over git :).

Furthermore I've changed a bit the dihedral routine, so the multiplier can now be set for each dihedral restrain as the last input parameter.

Best

Robert

fix_restrain.cpp (17.2 KB)

fix_restrain.h (2.45 KB)

Hej,

I found a small glitch in fix restrain. If multiple restrains are applied
energies will not be accumulated. I've attached a bugfix for that to this
mail (Basically I've just added every time the energy is calculated a plus
sign: energy += ...). I promise next time I find and fix a bug I'll send
this over git :).

Furthermore I've changed a bit the dihedral routine, so the multiplier can
now be set for each dihedral restrain as the last input parameter.

if you change the behavior of a style, you also need to update the
documentation accordingly.
since it is also good practice to separate new features from bugfixes,
i'll selectively include the bugfix in branch of a pending pull
request with collected small bugfixes, but will wait for a pull
request from you with the new feature.

axel.