ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/trunk/src/selection/SelectionEvaluator.cpp
(Generate patch)

Comparing trunk/src/selection/SelectionEvaluator.cpp (file contents):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC

# Line 36 | Line 36
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>
# Line 45 | Line 46
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      }            
# Line 148 | Line 150 | namespace OpenMD {
150      OpenMDBitSet bs;
151      std::stack<OpenMDBitSet> stack;
152    
153 <    for (int pc = pcStart; pc < code.size(); ++pc) {
153 >    for (unsigned int pc = pcStart; pc < code.size(); ++pc) {
154        Token instruction = code[pc];
155  
156        switch (instruction.tok) {
# Line 181 | Line 183 | namespace OpenMD {
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;
# Line 217 | Line 222 | namespace OpenMD {
222      int comparator = instruction.tok;
223      int property = instruction.intValue;
224      float comparisonValue = boost::any_cast<float>(instruction.value);
220    float propertyValue;
225      OpenMDBitSet bs(nStuntDouble);
226      bs.clearAll();
227      
# Line 274 | Line 278 | namespace OpenMD {
278      case Token::z:
279        propertyValue = sd->getPos().z();
280        break;
281 +    case Token::r:
282 +      propertyValue = sd->getPos().length();
283 +      break;
284      default:
285        unrecognizedAtomProperty(property);
286      }
# Line 441 | Line 448 | namespace OpenMD {
448    }
449  
450  
451 +  OpenMDBitSet SelectionEvaluator::hull() {
452 +    OpenMDBitSet bs(nStuntDouble);
453 +    
454 +    bs = hullFinder.findHull();
455 +    
456 +    return bs;
457 +  }
458 +
459 +
460 +
461    RealType SelectionEvaluator::getCharge(Atom* atom) {
462      RealType charge =0.0;
463      AtomType* atomType = atom->getAtomType();

Comparing trunk/src/selection/SelectionEvaluator.cpp (property svn:keywords):
Revision 1390 by gezelter, Wed Nov 25 20:02:06 2009 UTC vs.
Revision 1782 by gezelter, Wed Aug 22 02:28:28 2012 UTC

# Line 0 | Line 1
1 + Author Id Revision Date

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines