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 |
> |
RigidBody** myRigidBodies; |
24 |
|
} molInit; |
25 |
|
|
26 |
|
class Molecule{ |
32 |
|
|
33 |
|
void initialize( molInit &theInit ); |
34 |
|
|
35 |
< |
int getNMembers( void ) { return nMembers; } |
36 |
< |
int getStartAtom( void ) { return startAtom; } |
37 |
< |
int getEndAtom( void ) { return endAtom; } |
38 |
< |
int getStampID( void ) { return stampID; } |
35 |
> |
void setMyIndex( int theIndex ){ myIndex = theIndex;} |
36 |
> |
void setGlobalIndex( int theIndex ) { globalIndex = theIndex; } |
37 |
> |
|
38 |
> |
int getMyIndex( void ) { return myIndex; } |
39 |
> |
int getGlobalIndex( void ) { return globalIndex; } |
40 |
> |
|
41 |
> |
int getNAtoms ( void ) {return nAtoms;} |
42 |
> |
int getNBonds ( void ) {return nBonds;} |
43 |
> |
int getNBends ( void ) {return nBends;} |
44 |
> |
int getNTorsions( void ) {return nTorsions;} |
45 |
> |
int getNRigidBodies( void ) {return nRigidBodies;} |
46 |
> |
int getNOriented( void ) {return nOriented;} |
47 |
> |
int getNMembers ( void ) {return nMembers;} |
48 |
> |
int getStampID ( void ) {return stampID;} |
49 |
> |
|
50 |
> |
Atom** getMyAtoms ( void ) {return myAtoms;} |
51 |
> |
Bond** getMyBonds ( void ) {return myBonds;} |
52 |
> |
Bend** getMyBends ( void ) {return myBends;} |
53 |
> |
Torsion** getMyTorsions( void ) {return myTorsions;} |
54 |
> |
RigidBody** getMyRigidBodies( void ) {return myRigidBodies;} |
55 |
|
|
56 |
< |
void setStampID( int info ) { stampID = info; } |
56 |
> |
void setStampID( int info ) {stampID = info;} |
57 |
> |
|
58 |
> |
void calcForces( void ); |
59 |
> |
void atoms2rigidBodies( void ); |
60 |
> |
double getPotential( void ); |
61 |
|
|
62 |
+ |
void printMe( void ); |
63 |
|
|
64 |
+ |
void getCOM( double COM[3] ); |
65 |
+ |
void moveCOM( double delta[3] ); |
66 |
+ |
double getCOMvel( double COMvel[3] ); |
67 |
+ |
|
68 |
+ |
double getTotalMass(); |
69 |
+ |
|
70 |
|
private: |
71 |
|
|
72 |
|
int stampID; // the ID in the BASS component stamp array |
74 |
|
int nBonds; // ... .. .. . .bonds .. .. . . . . |
75 |
|
int nBends; // . . . . .. . .bends . . . . .. . |
76 |
|
int nTorsions; // .. . . .. . . torsions . . .. . . |
77 |
+ |
int nRigidBodies; // .. . . .. .rigid bodies . . .. . . |
78 |
|
int nOriented; // .. . . . .. . oriented atoms . . . |
79 |
< |
int nMembers; |
79 |
> |
int nMembers; // .. . . . . . .atoms (legacy code) . . . |
80 |
|
|
81 |
+ |
int myIndex; // mostly just for debug (and for making pressure calcs work) |
82 |
+ |
int globalIndex; |
83 |
+ |
|
84 |
|
Atom** myAtoms; // the array of atoms |
85 |
< |
Bond** myBonds; // arrays of all the short range interactions |
85 |
> |
Bond** myBonds; // arrays of all the short range interactions |
86 |
|
Bend** myBends; |
87 |
|
Torsion** myTorsions; |
88 |
+ |
RigidBody** myRigidBodies; |
89 |
|
|
59 |
– |
int startAtom; |
60 |
– |
int endAtom; |
61 |
– |
|
62 |
– |
|
90 |
|
}; |
91 |
|
|
92 |
|
#endif |