Implementing reactivity in molecular dynamics simulations with harmonic force fields