--- trunk/OOPSE/libmdtools/Molecule.hpp 2004/04/28 22:34:02 1140 +++ trunk/OOPSE/libmdtools/Molecule.hpp 2004/05/12 16:38:45 1167 @@ -1,11 +1,17 @@ #ifndef _MOLECULE_H_ #define _MOLECULE_H_ +#include +#include + #include "Atom.hpp" #include "SRI.hpp" #include "MoleculeStamp.hpp" #include "RigidBody.hpp" +#include "CutoffGroup.hpp" +using namespace std; + typedef struct{ int stampID; // the ID in the BASS component stamp array @@ -15,13 +21,14 @@ typedef struct{ int nTorsions; // .. . . .. . . torsions . . .. . . int nRigidBodies; // .. .. .. . rigid bodies ... .. int nOriented; // .. . . . .. . oriented atoms . . . - + Atom** myAtoms; // the array of atoms Bond** myBonds; // arrays of all the short range interactions Bend** myBends; Torsion** myTorsions; vector myRigidBodies; vector myIntegrableObjects; + vector myCutoffGroups; } molInit; class Molecule{ @@ -54,6 +61,18 @@ class Molecule{ (public) Torsion** getMyTorsions( void ) {return myTorsions;} vector getMyRigidBodies( void ) {return myRigidBodies;} vector& getIntegrableObjects(void) {return myIntegrableObjects;} + + CutoffGroup* beginCutoffGroup(vector::iterator& i){ + i = myCutoffGroups.begin(); + return i != myCutoffGroups.end()? *i : NULL; + } + + CutoffGroup* nextCutoffGroup(vector::iterator& i){ + i++; + return i != myCutoffGroups.end()? *i : NULL; + } + + int getNCutoffGroups() {return nCutoffGroups;} void setStampID( int info ) {stampID = info;} @@ -79,7 +98,8 @@ class Molecule{ (public) int nRigidBodies; // .. . . .. .rigid bodies . . .. . . int nOriented; // .. . . . .. . oriented atoms . . . int nMembers; // .. . . . . . .atoms (legacy code) . . . - + int nCutoffGroups; + int myIndex; // mostly just for debug (and for making pressure calcs work) int globalIndex; @@ -89,8 +109,8 @@ class Molecule{ (public) Torsion** myTorsions; vector myRigidBodies; vector myIntegrableObjects; + vector myCutoffGroups; - bool hasMassRatio; };