diff --git a/lib/colvars/colvar.cpp b/lib/colvars/colvar.cpp index 25ffec8986..6adb8f84dd 100644 --- a/lib/colvars/colvar.cpp +++ b/lib/colvars/colvar.cpp @@ -167,6 +167,9 @@ colvar::colvar (std::string const &conf) // check the available features of each cvc for (size_t i = 0; i < cvcs.size(); i++) { + if ((cvcs[i])->b_debug_gradients) + enable (task_gradients); + if ((cvcs[i])->sup_np != 1) { if (cvm::debug() && b_linear) cvm::log ("Warning: You are using a non-linear polynomial " diff --git a/lib/colvars/colvarmodule.h b/lib/colvars/colvarmodule.h index 997b0ea1b3..e1b39f7c33 100644 --- a/lib/colvars/colvarmodule.h +++ b/lib/colvars/colvarmodule.h @@ -2,7 +2,7 @@ #define COLVARMODULE_H #ifndef COLVARS_VERSION -#define COLVARS_VERSION "2013-06-07" +#define COLVARS_VERSION "2013-06-10" #endif #ifndef COLVARS_DEBUG diff --git a/src/USER-COLVARS/colvarproxy_lammps.cpp b/src/USER-COLVARS/colvarproxy_lammps.cpp index 7019db3858..159b8a554f 100644 --- a/src/USER-COLVARS/colvarproxy_lammps.cpp +++ b/src/USER-COLVARS/colvarproxy_lammps.cpp @@ -155,7 +155,7 @@ double colvarproxy_lammps::compute() } // zero the forces on the atoms, so that they can be accumulated by the colvars - for (size_t i = 0; i < colvars_atoms.size(); i++) { + for (size_t i = 0; i < applied_forces.size(); i++) { applied_forces[i].x = applied_forces[i].y = applied_forces[i].z = 0.0; }