35 |
|
* |
36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
< |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
38 |
> |
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008). |
39 |
|
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
|
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
56 |
|
|
57 |
|
SelectionEvaluator::SelectionEvaluator(SimInfo* si) |
58 |
|
: info(si), nameFinder(info), distanceFinder(info), hullFinder(info), |
59 |
< |
indexFinder(info), |
59 |
> |
indexFinder(info), hasSurfaceArea_(false), |
60 |
|
isLoaded_(false){ |
61 |
|
nStuntDouble = info->getNGlobalAtoms() + info->getNGlobalRigidBodies(); |
62 |
|
} |
376 |
|
int property, int comparator, |
377 |
|
float comparisonValue) { |
378 |
|
RealType propertyValue = 0.0; |
379 |
+ |
Vector3d pos; |
380 |
+ |
|
381 |
|
switch (property) { |
382 |
|
case Token::mass: |
383 |
|
propertyValue = sd->getMass(); |
403 |
|
break; |
404 |
|
case Token::z: |
405 |
|
propertyValue = sd->getPos().z(); |
406 |
+ |
break; |
407 |
+ |
case Token::wrappedX: |
408 |
+ |
pos = sd->getPos(); |
409 |
+ |
info->getSnapshotManager()->getCurrentSnapshot()->wrapVector(pos); |
410 |
+ |
propertyValue = pos.x(); |
411 |
+ |
break; |
412 |
+ |
case Token::wrappedY: |
413 |
+ |
pos = sd->getPos(); |
414 |
+ |
info->getSnapshotManager()->getCurrentSnapshot()->wrapVector(pos); |
415 |
+ |
propertyValue = pos.y(); |
416 |
|
break; |
417 |
+ |
case Token::wrappedZ: |
418 |
+ |
pos = sd->getPos(); |
419 |
+ |
info->getSnapshotManager()->getCurrentSnapshot()->wrapVector(pos); |
420 |
+ |
propertyValue = pos.z(); |
421 |
+ |
break; |
422 |
|
case Token::r: |
423 |
|
propertyValue = sd->getPos().length(); |
424 |
|
break; |
447 |
|
match = propertyValue != comparisonValue; |
448 |
|
break; |
449 |
|
} |
450 |
+ |
|
451 |
|
if (match) |
452 |
|
bs.setBitOn(sd->getGlobalIndex()); |
453 |
|
|
458 |
|
int property, int comparator, |
459 |
|
float comparisonValue, int frame) { |
460 |
|
RealType propertyValue = 0.0; |
461 |
+ |
Vector3d pos; |
462 |
|
switch (property) { |
463 |
|
case Token::mass: |
464 |
|
propertyValue = sd->getMass(); |
484 |
|
break; |
485 |
|
case Token::z: |
486 |
|
propertyValue = sd->getPos(frame).z(); |
487 |
+ |
break; |
488 |
+ |
case Token::wrappedX: |
489 |
+ |
pos = sd->getPos(frame); |
490 |
+ |
info->getSnapshotManager()->getSnapshot(frame)->wrapVector(pos); |
491 |
+ |
propertyValue = pos.x(); |
492 |
+ |
break; |
493 |
+ |
case Token::wrappedY: |
494 |
+ |
pos = sd->getPos(frame); |
495 |
+ |
info->getSnapshotManager()->getSnapshot(frame)->wrapVector(pos); |
496 |
+ |
propertyValue = pos.y(); |
497 |
+ |
break; |
498 |
+ |
case Token::wrappedZ: |
499 |
+ |
pos = sd->getPos(frame); |
500 |
+ |
info->getSnapshotManager()->getSnapshot(frame)->wrapVector(pos); |
501 |
+ |
propertyValue = pos.z(); |
502 |
|
break; |
503 |
+ |
|
504 |
|
case Token::r: |
505 |
|
propertyValue = sd->getPos(frame).length(); |
506 |
|
break; |
732 |
|
OpenMDBitSet bs(nStuntDouble); |
733 |
|
|
734 |
|
bs = hullFinder.findHull(); |
735 |
< |
|
735 |
> |
surfaceArea_ = hullFinder.getSurfaceArea(); |
736 |
> |
hasSurfaceArea_ = true; |
737 |
|
return bs; |
738 |
|
} |
739 |
|
|
742 |
|
OpenMDBitSet bs(nStuntDouble); |
743 |
|
|
744 |
|
bs = hullFinder.findHull(frame); |
745 |
< |
|
745 |
> |
|
746 |
|
return bs; |
747 |
|
} |
748 |
|
|