| 1 | #ifndef __MOLECULESTAMP_H__ | 
| 2 | #define __MOLECULESTAMP_H__ | 
| 3 | #include <vector> | 
| 4 | #include <utility> | 
| 5 | #include "AtomStamp.hpp" | 
| 6 | #include "BondStamp.hpp" | 
| 7 | #include "BendStamp.hpp" | 
| 8 | #include "TorsionStamp.hpp" | 
| 9 | #include "RigidBodyStamp.hpp" | 
| 10 | #include "CutoffGroupStamp.hpp" | 
| 11 | #include "LinkedAssign.hpp" | 
| 12 |  | 
| 13 | using namespace std; | 
| 14 | class MoleculeStamp{ | 
| 15 |  | 
| 16 | public: | 
| 17 | MoleculeStamp(); | 
| 18 | ~MoleculeStamp(); | 
| 19 |  | 
| 20 | char* assignString( char* lhs, char* rhs ); | 
| 21 | char* assignDouble( char* lhs, double rhs ); | 
| 22 | char* assignInt( char* lhs, int rhs ); | 
| 23 | char* checkMe( void ); | 
| 24 |  | 
| 25 | char* addAtom( AtomStamp* the_atom, int atomIndex ); | 
| 26 | char* addRigidBody( RigidBodyStamp* the_rigidbody, int rigidBodyIndex ); | 
| 27 | char* addCutoffGroup( CutoffGroupStamp* the_cutoffgroup, int cutoffGroupIndex ); | 
| 28 | char* addBond( BondStamp* the_bond, int bondIndex ); | 
| 29 | char* addBend( BendStamp* the_bend, int bendIndex ); | 
| 30 | char* addTorsion( TorsionStamp* the_torsion, int torsionIndex ); | 
| 31 |  | 
| 32 | char* getID( void )         { return name; } | 
| 33 | int   getNAtoms( void )     { return n_atoms; } | 
| 34 | int   getNBonds( void )     { return n_bonds; } | 
| 35 | int   getNBends( void )     { return n_bends; } | 
| 36 | int   getNTorsions( void )  { return n_torsions; } | 
| 37 | int   getNRigidBodies(void) { return n_rigidbodies; } | 
| 38 | int   getNCutoffGroups(void){ return n_cutoffgroups; } | 
| 39 | int   getNIntegrable(void)  { return n_integrable; } | 
| 40 |  | 
| 41 | AtomStamp* getAtom( int index ) { return atoms[index]; } | 
| 42 | BondStamp* getBond( int index ) { return bonds[index]; } | 
| 43 | BendStamp* getBend( int index ) { return bends[index]; } | 
| 44 | TorsionStamp* getTorsion( int index ) { return torsions[index]; } | 
| 45 | RigidBodyStamp* getRigidBody( int index ) { return rigidBodies[index]; } | 
| 46 | CutoffGroupStamp* getCutoffGroup( int index ) { return cutoffGroups[index]; } | 
| 47 |  | 
| 48 |  | 
| 49 | bool isBondInSameRigidBody(BondStamp*bond); | 
| 50 | bool isAtomInRigidBody(int atomIndex, int& whichRigidBody, int& consAtomIndex); | 
| 51 | vector<pair<int, int> > getJointAtoms(int rb1, int rb2); | 
| 52 |  | 
| 53 | int haveExtras( void ) { return have_extras; } | 
| 54 | LinkedAssign* getUnhandled( void ) { return unhandled; } | 
| 55 |  | 
| 56 | static char errMsg[500]; | 
| 57 | private: | 
| 58 |  | 
| 59 |  | 
| 60 | char name[100]; | 
| 61 | int n_atoms; | 
| 62 | int n_bonds; | 
| 63 | int n_bends; | 
| 64 | int n_torsions; | 
| 65 | int n_rigidbodies; | 
| 66 | int n_cutoffgroups; | 
| 67 | int n_integrable; | 
| 68 |  | 
| 69 | int have_name, have_atoms, have_bonds, have_bends, have_torsions; | 
| 70 | int have_rigidbodies, have_cutoffgroups; | 
| 71 |  | 
| 72 | AtomStamp** atoms; | 
| 73 | BondStamp** bonds; | 
| 74 | BendStamp** bends; | 
| 75 | TorsionStamp** torsions; | 
| 76 | RigidBodyStamp** rigidBodies; | 
| 77 | CutoffGroupStamp** cutoffGroups; | 
| 78 |  | 
| 79 | LinkedAssign* unhandled; // the unhandled assignments | 
| 80 | short int have_extras; | 
| 81 | }; | 
| 82 |  | 
| 83 | #endif |