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