Skip to content
Snippets Groups Projects
Commit a99dea7f authored by Giovanni Bussi's avatar Giovanni Bussi
Browse files

Merge branch 'v2.0' into v2.1

parents b9a46c1e 8ad7c9b0
No related branches found
No related tags found
No related merge requests found
......@@ -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
*/
......
......@@ -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);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment