diff --git a/CHANGES/v2.0.txt b/CHANGES/v2.0.txt index 20958dd4cce0487879c5330769b93b4d0f142142..19e3d757d5f68bc3966ceb135e01b48ea59a76a3 100644 --- a/CHANGES/v2.0.txt +++ b/CHANGES/v2.0.txt @@ -131,10 +131,14 @@ Unreleased changes (will be included in 2.0.4) See <a href="http://github.com/plumed/plumed2/commits/v2.0">branch v2.0 on git repository</a>. For users: +- Fixed a bug in \ref BIASVALUE that could produce wrong acceptance with replica exchange simulations. - Fixed a few innocuous memory leaks. - Fixed reader for xyz files, that now correctly detecs missing columns. Also a related regtest has been changed. +For developers: +- Renamed Value.cpp to BiasValue.cpp + */ diff --git a/src/bias/Value.cpp b/src/bias/BiasValue.cpp similarity index 95% rename from src/bias/Value.cpp rename to src/bias/BiasValue.cpp index 1903c5645f0a6b25e1474232d302820afacb3ad2..30ef5f794a3023d1d81f7918c3d160930dd0cb3f 100644 --- a/src/bias/Value.cpp +++ b/src/bias/BiasValue.cpp @@ -97,6 +97,7 @@ void BiasValue::registerKeywords(Keywords& keys){ "these quantities will named with the arguments of the bias followed by " "the character string _bias. These quantities tell the user how much the bias is " "due to each of the colvars."); + keys.addOutputComponent("bias","default","total bias"); } BiasValue::BiasValue(const ActionOptions&ao): @@ -110,15 +111,19 @@ PLUMED_BIAS_INIT(ao) string ss=getPntrToArgument(i)->getName()+"_bias"; addComponent(ss); componentIsNotPeriodic(ss); } + addComponent("bias"); componentIsNotPeriodic("bias"); } void BiasValue::calculate(){ + double bias=0.0; for(unsigned i=0;i< getNumberOfArguments() ;++i){ double val; val=getArgument(i); // log<<"BIAS "<<val<<"\n"; getPntrToComponent(i)->set(val); setOutputForce(i,-1.); + bias+=val; } + getPntrToComponent(getNumberOfArguments())->set(bias); } }