diff --git a/src/colvar/PathMSDBase.cpp b/src/colvar/PathMSDBase.cpp index 0f403d9001..3b3ed93198 100644 --- a/src/colvar/PathMSDBase.cpp +++ b/src/colvar/PathMSDBase.cpp @@ -270,21 +270,25 @@ void PathMSDBase::calculate() { Value* val_z_path=getPntrToComponent("zzz"); std::vector s_path(val_s_path.size()); for(unsigned i=0; iset(s_path[i]) ;} - val_z_path->set(-(1./lambda)*std::log(partition)); + val_z_path->set(-(1./lambda)*std::log(partition) + min_distance); + + // clean vector + Tools::set_to_zero(derivs_z); + double tmp; for(unsigned j=0; j