| 1 |
#ifndef _MOLECULE_H_ |
| 2 |
#define _MOLECULE_H_ |
| 3 |
|
| 4 |
#include "Atom.hpp" |
| 5 |
#include "SRI.hpp" |
| 6 |
#include "MoleculeStamp.hpp" |
| 7 |
#include "RigidBody.hpp" |
| 8 |
|
| 9 |
typedef struct{ |
| 10 |
|
| 11 |
int stampID; // the ID in the BASS component stamp array |
| 12 |
int nAtoms; // the number of atoms in the molecule |
| 13 |
int nBonds; // ... .. .. . .bonds .. .. . . . . |
| 14 |
int nBends; // . . . . .. . .bends . . . . .. . |
| 15 |
int nTorsions; // .. . . .. . . torsions . . .. . . |
| 16 |
int nRigidBodies; // .. .. .. . rigid bodies ... .. |
| 17 |
int nOriented; // .. . . . .. . oriented atoms . . . |
| 18 |
|
| 19 |
Atom** myAtoms; // the array of atoms |
| 20 |
Bond** myBonds; // arrays of all the short range interactions |
| 21 |
Bend** myBends; |
| 22 |
Torsion** myTorsions; |
| 23 |
RigidBody** myRigidBodies; |
| 24 |
} molInit; |
| 25 |
|
| 26 |
class Molecule{ |
| 27 |
|
| 28 |
public: |
| 29 |
|
| 30 |
Molecule( void ); |
| 31 |
~Molecule( void ); |
| 32 |
|
| 33 |
void initialize( molInit &theInit ); |
| 34 |
|
| 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;} |
| 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 |
| 73 |
int nAtoms; // the number of atoms in the molecule |
| 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; // .. . . . . . .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 |
| 86 |
Bend** myBends; |
| 87 |
Torsion** myTorsions; |
| 88 |
RigidBody** myRigidBodies; |
| 89 |
|
| 90 |
}; |
| 91 |
|
| 92 |
#endif |