void MultiColvarBase::performTask( const unsigned& task_index, const unsigned& current, MultiValue& myvals ) const { AtomValuePack myatoms( myvals, this ); // Retrieve the atom list if( !setupCurrentAtomList( current, myatoms ) ) return; // Do a quick check on the size of this contribution calculateWeight( myatoms ); if( myatoms.getValue(0)<getTolerance() ){ updateActiveAtoms( myatoms ); return; } // Compute everything double vv=doCalculation( task_index, myatoms ); myatoms.setValue( 1, vv ); return; }
void MultiColvarBase::performTask(){ // Currently no atoms have derivatives so deactivate those that are active atoms_with_derivatives.deactivateAll(); // Currently no central atoms have derivatives so deactive them all atomsWithCatomDer.deactivateAll(); // Retrieve the atom list if( !setupCurrentAtomList( getCurrentTask() ) ) return; // Do a quick check on the size of this contribution calculateWeight(); // printf("HELLO WEIGHT %f \n",getElementValue(1) ); if( getElementValue(1)<getTolerance() ){ updateActiveAtoms(); return; } // Compute everything double vv=doCalculation(); // Set the value of this element in ActionWithVessel setElementValue( 0, vv ); return; }