159 |
|
case Token::expressionEnd: |
160 |
|
break; |
161 |
|
case Token::all: |
162 |
< |
bs = OpenMDBitSet(nStuntDouble); |
163 |
< |
bs.setAll(); |
162 |
> |
bs = allInstruction(); |
163 |
|
stack.push(bs); |
164 |
|
break; |
165 |
|
case Token::none: |
445 |
|
|
446 |
|
return bs; |
447 |
|
} |
448 |
+ |
|
449 |
+ |
OpenMDBitSet SelectionEvaluator::allInstruction() { |
450 |
+ |
OpenMDBitSet bs(nStuntDouble); |
451 |
+ |
|
452 |
+ |
SimInfo::MoleculeIterator mi; |
453 |
+ |
Molecule* mol; |
454 |
+ |
Molecule::AtomIterator ai; |
455 |
+ |
Atom* atom; |
456 |
+ |
Molecule::RigidBodyIterator rbIter; |
457 |
+ |
RigidBody* rb; |
458 |
+ |
|
459 |
+ |
// Doing the loop insures that we're actually on this processor. |
460 |
+ |
|
461 |
+ |
for (mol = info->beginMolecule(mi); mol != NULL; |
462 |
+ |
mol = info->nextMolecule(mi)) { |
463 |
|
|
464 |
+ |
for(atom = mol->beginAtom(ai); atom != NULL; atom = mol->nextAtom(ai)) { |
465 |
+ |
bs.setBitOn(atom->getGlobalIndex()); |
466 |
+ |
} |
467 |
+ |
|
468 |
+ |
for (rb = mol->beginRigidBody(rbIter); rb != NULL; |
469 |
+ |
rb = mol->nextRigidBody(rbIter)) { |
470 |
+ |
bs.setBitOn(rb->getGlobalIndex()); |
471 |
+ |
} |
472 |
+ |
} |
473 |
|
|
474 |
+ |
return bs; |
475 |
+ |
} |
476 |
+ |
|
477 |
|
OpenMDBitSet SelectionEvaluator::hull() { |
478 |
|
OpenMDBitSet bs(nStuntDouble); |
479 |
|
|
482 |
|
return bs; |
483 |
|
} |
484 |
|
|
459 |
– |
|
460 |
– |
|
485 |
|
RealType SelectionEvaluator::getCharge(Atom* atom) { |
486 |
|
RealType charge =0.0; |
487 |
|
AtomType* atomType = atom->getAtomType(); |