Skip to content
Snippets Groups Projects
Commit 9f419569 authored by Carlo Camilloni's avatar Carlo Camilloni
Browse files

Merge branch 'v2.2' into v2.3

parents 17744374 a2f25f5b
No related branches found
No related tags found
No related merge requests found
......@@ -175,6 +175,8 @@ For users:
added if necessary.
- Fix a bug in \ref METAD when using INTERVAL and ADAPTIVE gaussians at the same time
- Updated gromacs patch for 5.1.x to 5.1.4
- Fix a performance regression in the calculate loop where derivatives and forces were set to zero even if an action
was not active, this is relevant for postprocessing and for the on-the-fly analysis
For developers:
- Macports portile is now tested on travis at every plumed push.
......
......@@ -652,23 +652,23 @@ void PlumedMain::justCalculate(){
int iaction=0;
// calculate the active actions in order (assuming *backward* dependence)
for(ActionSet::iterator p=actionSet.begin();p!=actionSet.end();++p){
std::string actionNumberLabel;
if(detailedTimers){
Tools::convert(iaction,actionNumberLabel);
actionNumberLabel="4A "+actionNumberLabel+" "+(*p)->getLabel();
stopwatch.start(actionNumberLabel);
}
ActionWithValue*av=dynamic_cast<ActionWithValue*>(*p);
ActionAtomistic*aa=dynamic_cast<ActionAtomistic*>(*p);
{
if(av) av->clearInputForces();
if(av) av->clearDerivatives();
}
{
if(aa) aa->clearOutputForces();
if(aa) if(aa->isActive()) aa->retrieveAtoms();
}
if((*p)->isActive()){
std::string actionNumberLabel;
if(detailedTimers){
Tools::convert(iaction,actionNumberLabel);
actionNumberLabel="4A "+actionNumberLabel+" "+(*p)->getLabel();
stopwatch.start(actionNumberLabel);
}
ActionWithValue*av=dynamic_cast<ActionWithValue*>(*p);
ActionAtomistic*aa=dynamic_cast<ActionAtomistic*>(*p);
{
if(av) av->clearInputForces();
if(av) av->clearDerivatives();
}
{
if(aa) aa->clearOutputForces();
if(aa) if(aa->isActive()) aa->retrieveAtoms();
}
if((*p)->checkNumericalDerivatives()) (*p)->calculateNumericalDerivatives();
else (*p)->calculate();
// This retrieves components called bias
......@@ -677,9 +677,8 @@ void PlumedMain::justCalculate(){
if(av)av->setGradientsIfNeeded();
ActionWithVirtualAtom*avv=dynamic_cast<ActionWithVirtualAtom*>(*p);
if(avv)avv->setGradientsIfNeeded();
if(detailedTimers) stopwatch.stop(actionNumberLabel);
}
if(detailedTimers) stopwatch.stop(actionNumberLabel);
iaction++;
}
stopwatch.stop("4 Calculating (forward loop)");
......
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