ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libBASS/MoleculeStamp.hpp
Revision: 1234
Committed: Fri Jun 4 03:15:31 2004 UTC (20 years, 1 month ago) by tim
File size: 2614 byte(s)
Log Message:
new rattle algorithm is working

File Contents

# User Rev Content
1 mmeineke 377 #ifndef __MOLECULESTAMP_H__
2     #define __MOLECULESTAMP_H__
3 tim 1234 #include <vector>
4     #include <utility>
5 mmeineke 377 #include "AtomStamp.hpp"
6     #include "BondStamp.hpp"
7     #include "BendStamp.hpp"
8     #include "TorsionStamp.hpp"
9 gezelter 957 #include "RigidBodyStamp.hpp"
10 gezelter 1153 #include "CutoffGroupStamp.hpp"
11 mmeineke 377 #include "LinkedAssign.hpp"
12    
13 tim 1234 using namespace std;
14 mmeineke 377 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 gezelter 957 char* addRigidBody( RigidBodyStamp* the_rigidbody, int rigidBodyIndex );
27 gezelter 1153 char* addCutoffGroup( CutoffGroupStamp* the_cutoffgroup, int cutoffGroupIndex );
28 mmeineke 377 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 gezelter 1153 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 mmeineke 377
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 gezelter 957 RigidBodyStamp* getRigidBody( int index ) { return rigidBodies[index]; }
46 gezelter 1153 CutoffGroupStamp* getCutoffGroup( int index ) { return cutoffGroups[index]; }
47 tim 1234
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 gezelter 1153
53 mmeineke 583 int haveExtras( void ) { return have_extras; }
54     LinkedAssign* getUnhandled( void ) { return unhandled; }
55 gezelter 1153
56 mmeineke 377 static char errMsg[500];
57     private:
58 gezelter 1153
59    
60 mmeineke 377 char name[100];
61     int n_atoms;
62     int n_bonds;
63     int n_bends;
64     int n_torsions;
65 gezelter 957 int n_rigidbodies;
66 gezelter 1153 int n_cutoffgroups;
67 gezelter 1103 int n_integrable;
68 mmeineke 377
69     int have_name, have_atoms, have_bonds, have_bends, have_torsions;
70 gezelter 1153 int have_rigidbodies, have_cutoffgroups;
71 mmeineke 377
72     AtomStamp** atoms;
73     BondStamp** bonds;
74     BendStamp** bends;
75     TorsionStamp** torsions;
76 gezelter 957 RigidBodyStamp** rigidBodies;
77 gezelter 1153 CutoffGroupStamp** cutoffGroups;
78 mmeineke 377
79     LinkedAssign* unhandled; // the unhandled assignments
80     short int have_extras;
81     };
82    
83     #endif