| 9 |  | #include "MoleculeStamp.hpp" | 
| 10 |  | #include "RigidBody.hpp" | 
| 11 |  | #include "CutoffGroup.hpp" | 
| 12 | + | #include "ConstraintPair.hpp" | 
| 13 |  |  | 
| 14 |  | using namespace std; | 
| 15 |  |  | 
| 22 |  | int nTorsions; // .. . . .. . . torsions . . .. . . | 
| 23 |  | int nRigidBodies; // .. .. .. . rigid bodies ... .. | 
| 24 |  | int nOriented; // .. . . . .. . oriented atoms . . . | 
| 24 | – | int nCutoffGroups; | 
| 25 |  |  | 
| 26 |  | Atom** myAtoms;      // the array of atoms | 
| 27 |  | Bond** myBonds;      // arrays of all the short range interactions | 
| 30 |  | vector<RigidBody*>   myRigidBodies; | 
| 31 |  | vector<StuntDouble*> myIntegrableObjects; | 
| 32 |  | vector<CutoffGroup*> myCutoffGroups; | 
| 33 | + | vector<ConstraintPair*> myConstraintPairs; | 
| 34 |  | } molInit; | 
| 35 |  |  | 
| 36 |  | class Molecule{ | 
| 64 |  | vector<RigidBody*> getMyRigidBodies( void ) {return myRigidBodies;} | 
| 65 |  | vector<StuntDouble*>& getIntegrableObjects(void) {return myIntegrableObjects;} | 
| 66 |  |  | 
| 67 | + | //beginCutoffGroup return the first group and initialize the iterator | 
| 68 |  | CutoffGroup* beginCutoffGroup(vector<CutoffGroup*>::iterator& i){ | 
| 69 |  | i = myCutoffGroups.begin(); | 
| 70 |  | return i != myCutoffGroups.end()? *i : NULL; | 
| 71 |  | } | 
| 72 |  |  | 
| 73 | + | //nextCutoffGroup return next cutoff group based on the iterator | 
| 74 |  | CutoffGroup* nextCutoffGroup(vector<CutoffGroup*>::iterator& i){ | 
| 75 |  | i++; | 
| 76 |  | return i != myCutoffGroups.end()? *i : NULL; | 
| 77 |  | } | 
| 78 |  |  | 
| 76 | – | bool belongToCutoffGroup(int index){ | 
| 77 | – | return cutoffAtomSet.find(index) != cutoffAtomSet.end()? true: false; | 
| 78 | – | } | 
| 79 | – |  | 
| 79 |  | int getNCutoffGroups() {return nCutoffGroups;} | 
| 80 | + |  | 
| 81 | + | int getNConstrains() {return myConstraintPairs.size();} | 
| 82 | + | vector<ConstraintPair*>& getConstraintPairs() {return myConstraintPairs;} | 
| 83 |  |  | 
| 84 | + |  | 
| 85 |  | void setStampID( int info ) {stampID = info;} | 
| 86 |  |  | 
| 87 |  | void calcForces( void ); | 
| 118 |  | vector<RigidBody*>   myRigidBodies; | 
| 119 |  | vector<StuntDouble*> myIntegrableObjects; | 
| 120 |  | vector<CutoffGroup*> myCutoffGroups; | 
| 121 | < | set<int> cutoffAtomSet;  //global index of atoms belonging to cutoff group | 
| 121 | > | vector<ConstraintPair*> myConstraintPairs; | 
| 122 |  |  | 
| 120 | – |  | 
| 123 |  | }; | 
| 124 |  |  | 
| 125 |  | #endif |