4 |
|
#include "Atom.hpp" |
5 |
|
#include "SRI.hpp" |
6 |
|
#include "MoleculeStamp.hpp" |
7 |
< |
#include "Exclude.hpp" |
7 |
> |
#include "RigidBody.hpp" |
8 |
|
|
9 |
|
typedef struct{ |
10 |
|
|
13 |
|
int nBonds; // ... .. .. . .bonds .. .. . . . . |
14 |
|
int nBends; // . . . . .. . .bends . . . . .. . |
15 |
|
int nTorsions; // .. . . .. . . torsions . . .. . . |
16 |
+ |
int nRigidBodies; // .. .. .. . rigid bodies ... .. |
17 |
|
int nOriented; // .. . . . .. . oriented atoms . . . |
18 |
< |
|
18 |
> |
|
19 |
|
Atom** myAtoms; // the array of atoms |
19 |
– |
Exclude** myExcludes;// the array of Excluded pairs |
20 |
|
Bond** myBonds; // arrays of all the short range interactions |
21 |
|
Bend** myBends; |
22 |
|
Torsion** myTorsions; |
23 |
< |
|
24 |
< |
|
23 |
> |
vector<RigidBody*> myRigidBodies; |
24 |
> |
vector<StuntDouble*> myIntegrableObjects; |
25 |
|
} molInit; |
26 |
|
|
27 |
|
class Molecule{ |
32 |
|
~Molecule( void ); |
33 |
|
|
34 |
|
void initialize( molInit &theInit ); |
35 |
– |
|
36 |
– |
int getNAtoms ( void ) {return nAtoms;} |
37 |
– |
int getNBonds ( void ) {return nBonds;} |
38 |
– |
int getNBends ( void ) {return nBends;} |
39 |
– |
int getNTorsions( void ) {return nTorsions;} |
40 |
– |
int getNOriented( void ) {return nOriented;} |
41 |
– |
int getNExcludes( void ) {return nExcludes;} |
42 |
– |
int getNMembers ( void ) {return nMembers;} |
43 |
– |
int getStampID ( void ) {return stampID;} |
35 |
|
|
36 |
< |
Atom** getMyAtoms ( void ) {return myAtoms;} |
37 |
< |
Bond** getMyBonds ( void ) {return myBonds;} |
38 |
< |
Bend** getMyBends ( void ) {return myBends;} |
39 |
< |
Torsions** getmyTorsions( void ) {return myTorsions;} |
40 |
< |
Exclude** getmyExcludes( void ) {return myExcludes;} |
36 |
> |
void setMyIndex( int theIndex ){ myIndex = theIndex;} |
37 |
> |
int getMyIndex( void ) { return myIndex; } |
38 |
> |
|
39 |
> |
int getGlobalIndex( void ) { return globalIndex; } |
40 |
> |
void setGlobalIndex( int theIndex ) { globalIndex = theIndex; } |
41 |
> |
|
42 |
> |
int getNAtoms ( void ) {return nAtoms;} |
43 |
> |
int getNBonds ( void ) {return nBonds;} |
44 |
> |
int getNBends ( void ) {return nBends;} |
45 |
> |
int getNTorsions( void ) {return nTorsions;} |
46 |
> |
int getNRigidBodies( void ) {return myRigidBodies.size();} |
47 |
> |
int getNOriented( void ) {return nOriented;} |
48 |
> |
int getNMembers ( void ) {return nMembers;} |
49 |
> |
int getStampID ( void ) {return stampID;} |
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 |
> |
vector<RigidBody*> getMyRigidBodies( void ) {return myRigidBodies;} |
56 |
> |
vector<StuntDouble*>& getIntegrableObjects(void) {return myIntegrableObjects;} |
57 |
|
|
58 |
< |
void setStampID( int info ) {stampID = info;} |
58 |
> |
void setStampID( int info ) {stampID = info;} |
59 |
|
|
60 |
|
void calcForces( void ); |
61 |
+ |
void atoms2rigidBodies( void ); |
62 |
|
double getPotential( void ); |
63 |
|
|
64 |
+ |
void printMe( void ); |
65 |
|
|
66 |
+ |
void getCOM( double COM[3] ); |
67 |
+ |
void moveCOM( double delta[3] ); |
68 |
+ |
double getCOMvel( double COMvel[3] ); |
69 |
+ |
|
70 |
+ |
double getTotalMass(); |
71 |
+ |
|
72 |
|
private: |
73 |
|
|
74 |
|
int stampID; // the ID in the BASS component stamp array |
76 |
|
int nBonds; // ... .. .. . .bonds .. .. . . . . |
77 |
|
int nBends; // . . . . .. . .bends . . . . .. . |
78 |
|
int nTorsions; // .. . . .. . . torsions . . .. . . |
79 |
+ |
int nRigidBodies; // .. . . .. .rigid bodies . . .. . . |
80 |
|
int nOriented; // .. . . . .. . oriented atoms . . . |
81 |
|
int nMembers; // .. . . . . . .atoms (legacy code) . . . |
66 |
– |
int nExcludes; // . . . . .. .. excludes .. . . |
82 |
|
|
83 |
+ |
int myIndex; // mostly just for debug (and for making pressure calcs work) |
84 |
+ |
int globalIndex; |
85 |
+ |
|
86 |
|
Atom** myAtoms; // the array of atoms |
87 |
|
Bond** myBonds; // arrays of all the short range interactions |
88 |
|
Bend** myBends; |
89 |
|
Torsion** myTorsions; |
90 |
< |
Exclude** myExcludes; // array of the excluded pairs of long range forces |
91 |
< |
|
90 |
> |
vector<RigidBody*> myRigidBodies; |
91 |
> |
vector<StuntDouble*> myIntegrableObjects; |
92 |
> |
|
93 |
|
}; |
94 |
|
|
95 |
|
#endif |