--- trunk/src/selection/SelectionEvaluator.cpp 2009/11/25 20:02:06 1390 +++ trunk/src/selection/SelectionEvaluator.cpp 2010/03/22 18:45:39 1412 @@ -51,7 +51,8 @@ namespace OpenMD { SelectionEvaluator::SelectionEvaluator(SimInfo* si) - : info(si), nameFinder(info), distanceFinder(info), indexFinder(info), + : info(si), nameFinder(info), distanceFinder(info), hullFinder(info), + indexFinder(info), isLoaded_(false){ nStuntDouble = info->getNGlobalAtoms() + info->getNGlobalRigidBodies(); } @@ -180,6 +181,9 @@ namespace OpenMD { break; case Token::within: withinInstruction(instruction, stack.top()); + break; + case Token::hull: + stack.push(hull()); break; //case Token::selected: // stack.push(getSelectionSet()); @@ -436,11 +440,21 @@ namespace OpenMD { bs = indexFinder.find(indexRange.first, indexRange.second); } } + + return bs; + } + + OpenMDBitSet SelectionEvaluator::hull() { + OpenMDBitSet bs(nStuntDouble); + + bs = hullFinder.findHull(); + return bs; } + RealType SelectionEvaluator::getCharge(Atom* atom) { RealType charge =0.0; AtomType* atomType = atom->getAtomType();