ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/mdtools/headers/MoleculeStamp.hpp
Revision: 166
Committed: Thu Nov 7 17:53:34 2002 UTC (21 years, 7 months ago) by mmeineke
File size: 1521 byte(s)
Log Message:
*** empty log message ***

File Contents

# Content
1 #ifndef __MOLECULESTAMP_H__
2 #define __MOLECULESTAMP_H__
3
4 #include "AtomStamp.hpp"
5 #include "BondStamp.hpp"
6 #include "BendStamp.hpp"
7 #include "TorsionStamp.hpp"
8 #include "LinkedAssign.hpp"
9
10 class MoleculeStamp{
11
12 public:
13 MoleculeStamp();
14 ~MoleculeStamp();
15
16 char* assignString( char* lhs, char* rhs );
17 char* assignDouble( char* lhs, double rhs );
18 char* assignInt( char* lhs, int rhs );
19 char* checkMe( void );
20
21 char* addAtom( AtomStamp* the_atom, int atomIndex );
22 char* addBond( BondStamp* the_bond, int bondIndex );
23 char* addBend( BendStamp* the_bend, int bendIndex );
24 char* addTorsion( TorsionStamp* the_torsion, int torsionIndex );
25
26 char* getID( void ) { return name; }
27 int getNAtoms( void ) { return n_atoms; }
28 int getNBonds( void ) { return n_bonds; }
29 int getNBends( void ) { return n_bends; }
30 int getNTorsions( void ) { return n_torsions; }
31
32 AtomStamp* getAtom( int index ) { return atoms[index]; }
33 BondStamp* getBond( int index ) { return bonds[index]; }
34 BendStamp* getBend( int index ) { return bends[index]; }
35 TorsionStamp* getTorsion( int index ) { return torsions[index]; }
36
37 private:
38
39 static char errMsg[500];
40 char name[100];
41 int n_atoms;
42 int n_bonds;
43 int n_bends;
44 int n_torsions;
45
46 int have_name, have_atoms, have_bonds, have_bends, have_torsions;
47
48 AtomStamp** atoms;
49 BondStamp** bonds;
50 BendStamp** bends;
51 TorsionStamp** torsions;
52
53 LinkedAssign* unhandled; // the unhandled assignments
54 short int have_extras;
55 };
56
57 #endif