本文整理汇总了C++中Molecule::getGlobalIndex方法的典型用法代码示例。如果您正苦于以下问题:C++ Molecule::getGlobalIndex方法的具体用法?C++ Molecule::getGlobalIndex怎么用?C++ Molecule::getGlobalIndex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Molecule
的用法示例。
在下文中一共展示了Molecule::getGlobalIndex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
void IndexFinder::init() {
SimInfo::MoleculeIterator mi;
Molecule::AtomIterator ai;
Molecule::RigidBodyIterator rbIter;
Molecule::BondIterator bondIter;
Molecule::BendIterator bendIter;
Molecule::TorsionIterator torsionIter;
Molecule::InversionIterator inversionIter;
Molecule* mol;
Atom* atom;
RigidBody* rb;
Bond* bond;
Bend* bend;
Torsion* torsion;
Inversion* inversion;
for (mol = info_->beginMolecule(mi); mol != NULL;
mol = info_->nextMolecule(mi)) {
SelectionSet ss(nObjects_);
ss.bitsets_[MOLECULE].setBitOn(mol->getGlobalIndex());
for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) {
ss.bitsets_[STUNTDOUBLE].setBitOn(atom->getGlobalIndex());
}
for (rb = mol->beginRigidBody(rbIter); rb != NULL;
rb = mol->nextRigidBody(rbIter)) {
ss.bitsets_[STUNTDOUBLE].setBitOn(rb->getGlobalIndex());
}
for (bond = mol->beginBond(bondIter); bond != NULL;
bond = mol->nextBond(bondIter)) {
ss.bitsets_[BOND].setBitOn(bond->getGlobalIndex());
}
for (bend = mol->beginBend(bendIter); bend != NULL;
bend = mol->nextBend(bendIter)) {
ss.bitsets_[BEND].setBitOn(bend->getGlobalIndex());
}
for (torsion = mol->beginTorsion(torsionIter); torsion != NULL;
torsion = mol->nextTorsion(torsionIter)) {
ss.bitsets_[TORSION].setBitOn(torsion->getGlobalIndex());
}
for (inversion = mol->beginInversion(inversionIter); inversion != NULL;
inversion = mol->nextInversion(inversionIter)) {
ss.bitsets_[INVERSION].setBitOn(inversion->getGlobalIndex());
}
selectionSets_[mol->getGlobalIndex()] = ss;
}
}