--- trunk/src/selection/NameFinder.cpp 2013/12/05 18:19:26 1953 +++ trunk/src/selection/NameFinder.cpp 2015/01/09 19:06:35 2052 @@ -60,6 +60,8 @@ namespace OpenMD { nObjects_.push_back(info_->getNGlobalBends()); nObjects_.push_back(info_->getNGlobalTorsions()); nObjects_.push_back(info_->getNGlobalInversions()); + nObjects_.push_back(info_->getNGlobalMolecules()); + loadNames(); } @@ -93,6 +95,7 @@ namespace OpenMD { std::string molName = mol->getMoleculeName(); TreeNode* molNode = createNode(root_, molName); + molNode->bs.bitsets_[MOLECULE].setBitOn(mol->getGlobalIndex()); for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { std::string atomName = atom->getType(); @@ -110,13 +113,18 @@ namespace OpenMD { molNode->bs.bitsets_[STUNTDOUBLE].setBitOn(rb->getGlobalIndex()); rbNode->bs.bitsets_[STUNTDOUBLE].setBitOn(rb->getGlobalIndex()); - //create nodes for atoms belong to this rigidbody - for(atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) { - std::string rbAtomName = atom->getType(); - TreeNode* rbAtomNode = createNode(rbNode, rbAtomName); + // COMMENTED OUT because rigid bodies are IntegrableObjects + // (e.g. they are independently mobile, so selecting their + // member atoms will give some odd results if we are computing + // degrees of freedom elsewhere. - rbAtomNode->bs.bitsets_[STUNTDOUBLE].setBitOn(atom->getGlobalIndex()); - } + // //create nodes for atoms belong to this rigidbody + // for(atom = rb->beginAtom(ai); atom != NULL; atom = rb->nextAtom(ai)) { + // std::string rbAtomName = atom->getType(); + // TreeNode* rbAtomNode = createNode(rbNode, rbAtomName); + + // rbAtomNode->bs.bitsets_[STUNTDOUBLE].setBitOn(atom->getGlobalIndex()); + // } } for (bond = mol->beginBond(bondIter); bond != NULL;