Difference for src/colvar.C from version 1.26 to 1.27

version 1.26version 1.27
Line 1144
Line 1144
     // For a periodic colvar, both walls may be applicable at the same time     // For a periodic colvar, both walls may be applicable at the same time
     // in which case we pick the closer one     // in which case we pick the closer one
     if ( (!is_enabled(f_cv_upper_wall)) ||     if ( (!is_enabled(f_cv_upper_wall)) ||
          (this->dist2(x, lower_wall) < this->dist2(x, upper_wall)) ) {          (this->dist2(x_reported, lower_wall) < this->dist2(x_reported, upper_wall)) ) {
  
       cvm::real const grad = this->dist2_lgrad(x, lower_wall);       cvm::real const grad = this->dist2_lgrad(x_reported, lower_wall);
       if (grad < 0.0) {       if (grad < 0.0) {
         fw = -0.5 * lower_wall_k * grad;         fw = -0.5 * lower_wall_k * grad;
         f += fw;         f += fw;
Line 1157
Line 1157
  
     } else {     } else {
  
       cvm::real const grad = this->dist2_lgrad(x, upper_wall);       cvm::real const grad = this->dist2_lgrad(x_reported, upper_wall);
       if (grad > 0.0) {       if (grad > 0.0) {
         fw = -0.5 * upper_wall_k * grad;         fw = -0.5 * upper_wall_k * grad;
         f += fw;         f += fw;
Line 1177
Line 1177
     // atoms only feel the harmonic force     // atoms only feel the harmonic force
     // fr: bias force on extended variable (without harmonic spring), for output in trajectory     // fr: bias force on extended variable (without harmonic spring), for output in trajectory
     // f_ext: total force on extended variable (including harmonic spring)     // f_ext: total force on extended variable (including harmonic spring)
     // f: - initially, external biasing force     // f: - initially, external biasing force (including wall forces)
     //    - after this code block, colvar force to be applied to atomic coordinates, ie. spring force     //    - after this code block, colvar force to be applied to atomic coordinates, ie. spring force
     fr    = f;     fr    = f;
     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);


Legend:
Removed in v.1.26 
changed lines
 Added in v.1.27



Made by using version 1.53 of cvs2html