ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Molecule.hpp
(Generate patch)

Comparing trunk/OOPSE/libmdtools/Molecule.hpp (file contents):
Revision 658 by tim, Thu Jul 31 15:35:07 2003 UTC vs.
Revision 1234 by tim, Fri Jun 4 03:15:31 2004 UTC

# Line 1 | Line 1
1   #ifndef _MOLECULE_H_
2   #define _MOLECULE_H_
3  
4 + #include <set>
5 + #include <vector>
6 +
7   #include "Atom.hpp"
8   #include "SRI.hpp"
9   #include "MoleculeStamp.hpp"
10 < #include "Exclude.hpp"
10 > #include "RigidBody.hpp"
11 > #include "CutoffGroup.hpp"
12 > #include "ConstraintPair.hpp"
13  
14 + using namespace std;
15 +
16   typedef struct{
17    
18    int stampID;   // the ID in the BASS component stamp array
# Line 13 | Line 20 | typedef struct{
20    int nBonds;    // ... .. ..  . .bonds .. .. . . . .
21    int nBends;    // . . . . .. . .bends . . . . .. .
22    int nTorsions; // .. . . .. . . torsions . . .. . .
23 +  int nRigidBodies; // .. .. .. . rigid bodies ... ..
24    int nOriented; // .. . . . .. . oriented atoms . . .
25 <  int nExcludes; // . . .. . . . .exclude pairs.. . . .
18 <
25 >  
26    Atom** myAtoms;      // the array of atoms
20  Exclude** myExcludes;// the array of Excluded pairs
27    Bond** myBonds;      // arrays of all the short range interactions
28    Bend** myBends;
29    Torsion** myTorsions;
30 <
31 <
30 >  vector<RigidBody*>   myRigidBodies;
31 >  vector<StuntDouble*> myIntegrableObjects;
32 >  vector<CutoffGroup*> myCutoffGroups;
33 >  vector<ConstraintPair*> myConstraintPairs;
34   } molInit;
35  
36   class Molecule{
# Line 35 | Line 43 | class Molecule{ (public)
43    void initialize( molInit &theInit );
44  
45    void setMyIndex( int theIndex ){ myIndex = theIndex;}
38  void setGlobalIndex( int theIndex ) { globalIndex = theIndex; }
39
46    int getMyIndex( void ) { return myIndex; }
47 +
48    int getGlobalIndex( void ) { return globalIndex; }
49 <
43 <  int getNAtoms   ( void ) {return nAtoms;}
44 <  int getNBonds   ( void ) {return nBonds;}
45 <  int getNBends   ( void ) {return nBends;}
46 <  int getNTorsions( void ) {return nTorsions;}
47 <  int getNOriented( void ) {return nOriented;}
48 <  int getNExcludes( void ) {return nExcludes;}
49 <  int getNMembers ( void ) {return nMembers;}
50 <  int getStampID  ( void ) {return stampID;}
49 >  void setGlobalIndex( int theIndex ) { globalIndex = theIndex; }
50  
51 <  Atom**     getMyAtoms   ( void ) {return myAtoms;}
52 <  Bond**     getMyBonds   ( void ) {return myBonds;}
53 <  Bend**     getMyBends   ( void ) {return myBends;}
54 <  Torsion**  getMyTorsions( void ) {return myTorsions;}
55 <  Exclude**  getMyExcludes( void ) {return myExcludes;}
56 <  
57 <  void setStampID( int info ) {stampID = info;}
58 <  
51 >  int getNAtoms   ( void )    {return nAtoms;}
52 >  int getNBonds   ( void )    {return nBonds;}
53 >  int getNBends   ( void )    {return nBends;}
54 >  int getNTorsions( void )    {return nTorsions;}
55 >  int getNRigidBodies( void ) {return myRigidBodies.size();}
56 >  int getNOriented( void )    {return nOriented;}
57 >  int getNMembers ( void )    {return nMembers;}
58 >  int getStampID  ( void )    {return stampID;}
59  
60 +  Atom**      getMyAtoms   ( void )    {return myAtoms;}
61 +  Bond**      getMyBonds   ( void )    {return myBonds;}
62 +  Bend**      getMyBends   ( void )    {return myBends;}
63 +  Torsion**   getMyTorsions( void )    {return myTorsions;}
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 +
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 );
88 +  void atoms2rigidBodies( void );
89    double getPotential( void );
90    
91    void printMe( void );
# Line 78 | Line 103 | class Molecule{ (public)
103    int nBonds;    // ... .. ..  . .bonds .. .. . . . .
104    int nBends;    // . . . . .. . .bends . . . . .. .
105    int nTorsions; // .. . . .. . . torsions . . .. . .
106 +  int nRigidBodies; // .. . . .. .rigid bodies . . .. . .
107    int nOriented; // .. . . . .. . oriented atoms . . .
108    int nMembers;  // .. . . . . . .atoms (legacy code) . . .
109 <  int nExcludes; // . . . . .. .. excludes .. . .
110 <
109 >  int nCutoffGroups;
110 >  
111    int myIndex; // mostly just for debug (and for making pressure calcs work)
112    int globalIndex;
113  
# Line 89 | Line 115 | class Molecule{ (public)
115    Bond** myBonds;     // arrays of all the short range interactions
116    Bend** myBends;
117    Torsion** myTorsions;
118 <  Exclude** myExcludes; // array of the excluded pairs of long range forces
119 <  
118 >  vector<RigidBody*>   myRigidBodies;
119 >  vector<StuntDouble*> myIntegrableObjects;
120 >  vector<CutoffGroup*> myCutoffGroups;
121 >  vector<ConstraintPair*> myConstraintPairs;
122 >
123   };
124  
125   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines