1 |
#ifndef __MOLECULESTAMP_H__ |
2 |
#define __MOLECULESTAMP_H__ |
3 |
#include <vector> |
4 |
#include <utility> |
5 |
#include "types/AtomStamp.hpp" |
6 |
#include "types/BondStamp.hpp" |
7 |
#include "types/BendStamp.hpp" |
8 |
#include "types/TorsionStamp.hpp" |
9 |
#include "types/RigidBodyStamp.hpp" |
10 |
#include "types/CutoffGroupStamp.hpp" |
11 |
#include "io/LinkedAssign.hpp" |
12 |
|
13 |
|
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); |
51 |
bool isAtomInRigidBody(int atomIndex, int& whichRigidBody, int& consAtomIndex); |
52 |
std::vector<pair<int, int> > getJointAtoms(int rb1, int rb2); |
53 |
|
54 |
int haveExtras( void ) { return have_extras; } |
55 |
LinkedAssign* getUnhandled( void ) { return unhandled; } |
56 |
|
57 |
static char errMsg[500]; |
58 |
private: |
59 |
|
60 |
|
61 |
char name[100]; |
62 |
int n_atoms; |
63 |
int n_bonds; |
64 |
int n_bends; |
65 |
int n_torsions; |
66 |
int n_rigidbodies; |
67 |
int n_cutoffgroups; |
68 |
int n_integrable; |
69 |
|
70 |
int have_name, have_atoms, have_bonds, have_bends, have_torsions; |
71 |
int have_rigidbodies, have_cutoffgroups; |
72 |
|
73 |
AtomStamp** atoms; |
74 |
BondStamp** bonds; |
75 |
BendStamp** bends; |
76 |
TorsionStamp** torsions; |
77 |
RigidBodyStamp** rigidBodies; |
78 |
CutoffGroupStamp** cutoffGroups; |
79 |
|
80 |
LinkedAssign* unhandled; // the unhandled assignments |
81 |
short int have_extras; |
82 |
}; |
83 |
|
84 |
#endif |