A molecular dynamics method for simulations in the canonical ensemble | Synapse