| 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 "RigidBody.hpp" |
| 11 |
+ |
#include "CutoffGroup.hpp" |
| 12 |
|
|
| 13 |
+ |
using namespace std; |
| 14 |
+ |
|
| 15 |
|
typedef struct{ |
| 16 |
|
|
| 17 |
|
int stampID; // the ID in the BASS component stamp array |
| 21 |
|
int nTorsions; // .. . . .. . . torsions . . .. . . |
| 22 |
|
int nRigidBodies; // .. .. .. . rigid bodies ... .. |
| 23 |
|
int nOriented; // .. . . . .. . oriented atoms . . . |
| 24 |
< |
|
| 24 |
> |
int nCutoffGroups; |
| 25 |
> |
|
| 26 |
|
Atom** myAtoms; // the array of atoms |
| 27 |
|
Bond** myBonds; // arrays of all the short range interactions |
| 28 |
|
Bend** myBends; |
| 29 |
|
Torsion** myTorsions; |
| 30 |
|
vector<RigidBody*> myRigidBodies; |
| 31 |
|
vector<StuntDouble*> myIntegrableObjects; |
| 32 |
+ |
vector<CutoffGroup*> myCutoffGroups; |
| 33 |
|
} molInit; |
| 34 |
|
|
| 35 |
|
class Molecule{ |
| 62 |
|
Torsion** getMyTorsions( void ) {return myTorsions;} |
| 63 |
|
vector<RigidBody*> getMyRigidBodies( void ) {return myRigidBodies;} |
| 64 |
|
vector<StuntDouble*>& getIntegrableObjects(void) {return myIntegrableObjects;} |
| 65 |
+ |
|
| 66 |
+ |
CutoffGroup* beginCutoffGroup(vector<CutoffGroup*>::iterator& i){ |
| 67 |
+ |
i = myCutoffGroups.begin(); |
| 68 |
+ |
return i != myCutoffGroups.end()? *i : NULL; |
| 69 |
+ |
} |
| 70 |
+ |
|
| 71 |
+ |
CutoffGroup* nextCutoffGroup(vector<CutoffGroup*>::iterator& i){ |
| 72 |
+ |
i++; |
| 73 |
+ |
return i != myCutoffGroups.end()? *i : NULL; |
| 74 |
+ |
} |
| 75 |
+ |
|
| 76 |
+ |
bool belongToCutoffGroup(int index){ |
| 77 |
+ |
return cutoffAtomSet.find(index) != cutoffAtomSet.end()? true: false; |
| 78 |
+ |
} |
| 79 |
+ |
|
| 80 |
+ |
int getNCutoffGroups() {return nCutoffGroups;} |
| 81 |
|
|
| 82 |
|
void setStampID( int info ) {stampID = info;} |
| 83 |
|
|
| 103 |
|
int nRigidBodies; // .. . . .. .rigid bodies . . .. . . |
| 104 |
|
int nOriented; // .. . . . .. . oriented atoms . . . |
| 105 |
|
int nMembers; // .. . . . . . .atoms (legacy code) . . . |
| 106 |
< |
|
| 106 |
> |
int nCutoffGroups; |
| 107 |
> |
|
| 108 |
|
int myIndex; // mostly just for debug (and for making pressure calcs work) |
| 109 |
|
int globalIndex; |
| 110 |
|
|
| 114 |
|
Torsion** myTorsions; |
| 115 |
|
vector<RigidBody*> myRigidBodies; |
| 116 |
|
vector<StuntDouble*> myIntegrableObjects; |
| 117 |
+ |
vector<CutoffGroup*> myCutoffGroups; |
| 118 |
+ |
set<int> cutoffAtomSet; //global index of atoms belonging to cutoff group |
| 119 |
|
|
| 93 |
– |
bool hasMassRatio; |
| 120 |
|
|
| 121 |
|
}; |
| 122 |
|
|