Fix missing force with extended-Lagrangian mass

This commit is contained in:
Giacomo Fiorin
2016-12-27 17:16:32 -05:00
parent 925f42727f
commit b0263e87bb
3 changed files with 127 additions and 1 deletions

View File

@ -314,6 +314,9 @@ colvar::colvar(std::string const &conf)
enable(f_cv_extended_Lagrangian);
provide(f_cv_Langevin);
// The extended mass will apply forces
enable(f_cv_gradient);
xr.type(value());
vr.type(value());
fr.type(value());
@ -1209,6 +1212,10 @@ cvm::real colvar::update_forces_energy()
if (is_enabled(f_cv_extended_Lagrangian)) {
if (cvm::debug()) {
cvm::log("Updating extended-Lagrangian degrees of freedom.\n");
}
cvm::real dt = cvm::dt();
colvarvalue f_ext(fr.type());
f_ext.reset();