diff --git a/src/PlumedMain.cpp b/src/PlumedMain.cpp index 30c5e68350744b8a724f76b4abb1d98818e7346f..365d5f8ab2abd3238022cf00783d50ec3d039362 100644 --- a/src/PlumedMain.cpp +++ b/src/PlumedMain.cpp @@ -392,7 +392,23 @@ void PlumedMain::prepareDependencies(){ // allow actions to update their request list before atoms are shared for(ActionSet::iterator p=actionSet.begin();p!=actionSet.end();p++) if((*p)->isActive()) (*p)->prepare(); - } + +/* +Temporary fix to allow atom requests to be update in "prepare()" + +Nasty bug there. Actual requests of lists of atoms were forwarded to Atoms +object *during* dependence preparation, so that any change made immediately +after that was not taken into account. I temporarily solved this by +re-preparing dependencies again after calls to prepare(), but probably the +workflow has to be adjusted to be more robust. +*/ + for(unsigned i=0;i<pilots.size();++i){ + if(pilots[i]->onStep()){ + pilots[i]->activate(); + active=true; + } + }; +} void PlumedMain::shareData(){ if(active)atoms.share();