| version 1.27 | version 1.28 |
|---|
| |
| f_ext = f + (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); | f_ext = f + (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); |
| f = (-0.5 * ext_force_k) * this->dist2_rgrad(xr, x); | f = (-0.5 * ext_force_k) * this->dist2_rgrad(xr, x); |
| | |
| | if (is_enabled(f_cv_subtract_applied_force)) { |
| | // Report a "system" force without the biases on this colvar |
| | // that is, just the spring force |
| | ft_reported = (-0.5 * ext_force_k) * this->dist2_lgrad(xr, x); |
| | } else { |
| // The total force acting on the extended variable is f_ext | // The total force acting on the extended variable is f_ext |
| // This will be used in the next timestep | // This will be used in the next timestep |
| ft_reported = f_ext; | ft_reported = f_ext; |
| | } |
| | |
| // leapfrog: starting from x_i, f_i, v_(i-1/2) | // leapfrog: starting from x_i, f_i, v_(i-1/2) |
| vr += (0.5 * dt) * f_ext / ext_mass; | vr += (0.5 * dt) * f_ext / ext_mass; |