| 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). |
| 39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
| 39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
| 40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
| 41 |
|
*/ |
| 42 |
|
|
| 43 |
|
#include <stack> |
| 46 |
|
#include "primitives/DirectionalAtom.hpp" |
| 47 |
|
#include "primitives/RigidBody.hpp" |
| 48 |
|
#include "primitives/Molecule.hpp" |
| 49 |
< |
#include "io/basic_ifstrstream.hpp" |
| 49 |
> |
#include "io/ifstrstream.hpp" |
| 50 |
|
|
| 51 |
|
namespace OpenMD { |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
SelectionEvaluator::SelectionEvaluator(SimInfo* si) |
| 55 |
< |
: info(si), nameFinder(info), distanceFinder(info), indexFinder(info), |
| 55 |
> |
: info(si), nameFinder(info), distanceFinder(info), hullFinder(info), |
| 56 |
> |
indexFinder(info), |
| 57 |
|
isLoaded_(false){ |
| 58 |
|
nStuntDouble = info->getNGlobalAtoms() + info->getNGlobalRigidBodies(); |
| 59 |
|
} |
| 183 |
|
case Token::within: |
| 184 |
|
withinInstruction(instruction, stack.top()); |
| 185 |
|
break; |
| 186 |
+ |
case Token::hull: |
| 187 |
+ |
stack.push(hull()); |
| 188 |
+ |
break; |
| 189 |
|
//case Token::selected: |
| 190 |
|
// stack.push(getSelectionSet()); |
| 191 |
|
// break; |
| 278 |
|
break; |
| 279 |
|
case Token::z: |
| 280 |
|
propertyValue = sd->getPos().z(); |
| 281 |
+ |
break; |
| 282 |
+ |
case Token::r: |
| 283 |
+ |
propertyValue = sd->getPos().length(); |
| 284 |
|
break; |
| 285 |
|
default: |
| 286 |
|
unrecognizedAtomProperty(property); |
| 449 |
|
} |
| 450 |
|
|
| 451 |
|
|
| 452 |
+ |
OpenMDBitSet SelectionEvaluator::hull() { |
| 453 |
+ |
OpenMDBitSet bs(nStuntDouble); |
| 454 |
+ |
|
| 455 |
+ |
bs = hullFinder.findHull(); |
| 456 |
+ |
|
| 457 |
+ |
return bs; |
| 458 |
+ |
} |
| 459 |
+ |
|
| 460 |
+ |
|
| 461 |
+ |
|
| 462 |
|
RealType SelectionEvaluator::getCharge(Atom* atom) { |
| 463 |
|
RealType charge =0.0; |
| 464 |
|
AtomType* atomType = atom->getAtomType(); |