44 |
|
|
45 |
|
#include <stdlib.h> |
46 |
|
#include <string.h> |
47 |
+ |
#include <string> |
48 |
+ |
#include <map> |
49 |
|
|
50 |
|
#include "io/BASS_interface.h" |
51 |
|
#include "types/MoleculeStamp.hpp" |
56 |
|
#include "types/RigidBodyStamp.hpp" |
57 |
|
#include "types/CutoffGroupStamp.hpp" |
58 |
|
|
57 |
– |
class LinkedMolStamp{ |
58 |
– |
|
59 |
– |
public: |
60 |
– |
LinkedMolStamp(){ mol_stamp = NULL; next = NULL; prev = NULL; } |
61 |
– |
~LinkedMolStamp(); |
62 |
– |
|
63 |
– |
MoleculeStamp* match( char* id ); |
64 |
– |
LinkedMolStamp* extract( char* id ); |
65 |
– |
void setStamp( MoleculeStamp* the_stamp ){ mol_stamp = the_stamp; } |
66 |
– |
MoleculeStamp* getStamp(){ return mol_stamp; } |
67 |
– |
void add( LinkedMolStamp* newbie ); |
68 |
– |
void setPrev( LinkedMolStamp* thePrev ){ prev = thePrev; } |
69 |
– |
void setNext( LinkedMolStamp* theNext ){ next = theNext; } |
70 |
– |
LinkedMolStamp* getNext() { return next; } |
71 |
– |
|
72 |
– |
private: |
73 |
– |
MoleculeStamp* mol_stamp; |
74 |
– |
LinkedMolStamp* next; |
75 |
– |
LinkedMolStamp* prev; |
76 |
– |
}; |
77 |
– |
|
59 |
|
class MakeStamps{ |
60 |
|
|
61 |
|
public: |
100 |
|
int torsionConstraint( event* the_event ); |
101 |
|
int torsionEnd( event* the_event ); |
102 |
|
|
103 |
< |
LinkedMolStamp* extractMolStamp( char* the_id ); |
103 |
> |
MoleculeStamp* getMolStamp( std::string the_id ); |
104 |
|
|
105 |
|
private: |
106 |
|
|
107 |
< |
int hash_size; |
127 |
< |
int hash_shift; |
128 |
< |
int hash( char* text ); |
129 |
< |
LinkedMolStamp** my_mols; |
107 |
> |
std::map<std::string, MoleculeStamp*> my_mols; |
108 |
|
void addMolStamp( MoleculeStamp* the_stamp ); |
109 |
|
|
110 |
|
MoleculeStamp* current_mol; |