1 |
#ifndef __MAKESTAMPS_H__ |
2 |
#define __MAKESTAMPS_H__ |
3 |
|
4 |
#include <stdlib.h> |
5 |
#include <string.h> |
6 |
|
7 |
#include "io/BASS_interface.h" |
8 |
#include "types/MoleculeStamp.hpp" |
9 |
#include "types/AtomStamp.hpp" |
10 |
#include "types/BondStamp.hpp" |
11 |
#include "types/BendStamp.hpp" |
12 |
#include "types/TorsionStamp.hpp" |
13 |
#include "types/RigidBodyStamp.hpp" |
14 |
#include "types/CutoffGroupStamp.hpp" |
15 |
|
16 |
class LinkedMolStamp{ |
17 |
|
18 |
public: |
19 |
LinkedMolStamp(){ mol_stamp = NULL; next = NULL; prev = NULL; } |
20 |
~LinkedMolStamp(); |
21 |
|
22 |
MoleculeStamp* match( char* id ); |
23 |
LinkedMolStamp* extract( char* id ); |
24 |
void setStamp( MoleculeStamp* the_stamp ){ mol_stamp = the_stamp; } |
25 |
MoleculeStamp* getStamp(){ return mol_stamp; } |
26 |
void add( LinkedMolStamp* newbie ); |
27 |
void setPrev( LinkedMolStamp* thePrev ){ prev = thePrev; } |
28 |
void setNext( LinkedMolStamp* theNext ){ next = theNext; } |
29 |
LinkedMolStamp* getNext() { return next; } |
30 |
|
31 |
private: |
32 |
MoleculeStamp* mol_stamp; |
33 |
LinkedMolStamp* next; |
34 |
LinkedMolStamp* prev; |
35 |
}; |
36 |
|
37 |
class MakeStamps{ |
38 |
|
39 |
public: |
40 |
MakeStamps(); |
41 |
~MakeStamps(); |
42 |
|
43 |
int newMolecule( event* the_event ); |
44 |
int moleculeAssign( event* the_event ); |
45 |
int moleculeEnd( event* the_event ); |
46 |
|
47 |
int newAtom( event* the_event ); |
48 |
int atomPosition( event* the_event ); |
49 |
int atomOrientation( event* the_event ); |
50 |
int atomAssign( event* the_event ); |
51 |
int atomEnd( event* the_event ); |
52 |
|
53 |
int newRigidBody( event* the_event ); |
54 |
int rigidBodyAssign( event* the_event ); |
55 |
int rigidBodyMembers( event* the_event ); |
56 |
int rigidBodyEnd( event* the_event ); |
57 |
|
58 |
int newCutoffGroup( event* the_event ); |
59 |
int cutoffGroupAssign( event* the_event ); |
60 |
int cutoffGroupMembers( event* the_event ); |
61 |
int cutoffGroupEnd( event* the_event ); |
62 |
|
63 |
int newBond( event* the_event ); |
64 |
int bondAssign( event* the_event ); |
65 |
int bondMembers( event* the_event ); |
66 |
int bondConstraint( event* the_event ); |
67 |
int bondEnd( event* the_event ); |
68 |
|
69 |
int newBend( event* the_event ); |
70 |
int bendAssign( event* the_event ); |
71 |
int bendMembers( event* the_event ); |
72 |
int bendConstraint( event* the_event ); |
73 |
int bendEnd( event* the_event ); |
74 |
|
75 |
int newTorsion( event* the_event ); |
76 |
int torsionAssign( event* the_event ); |
77 |
int torsionMembers( event* the_event ); |
78 |
int torsionConstraint( event* the_event ); |
79 |
int torsionEnd( event* the_event ); |
80 |
|
81 |
LinkedMolStamp* extractMolStamp( char* the_id ); |
82 |
|
83 |
private: |
84 |
|
85 |
int hash_size; |
86 |
int hash_shift; |
87 |
int hash( char* text ); |
88 |
LinkedMolStamp** my_mols; |
89 |
void addMolStamp( MoleculeStamp* the_stamp ); |
90 |
|
91 |
MoleculeStamp* current_mol; |
92 |
AtomStamp* current_atom; |
93 |
BondStamp* current_bond; |
94 |
BendStamp* current_bend; |
95 |
TorsionStamp* current_torsion; |
96 |
RigidBodyStamp* current_rigidbody; |
97 |
CutoffGroupStamp* current_cutoffgroup; |
98 |
|
99 |
}; |
100 |
|
101 |
#endif |