ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/FAS/src/extradata.h
Revision: 66
Committed: Tue Aug 13 16:02:26 2002 UTC (21 years, 10 months ago) by tim
Content type: text/plain
File size: 1563 byte(s)
Log Message:
flexible atom selection

File Contents

# User Rev Content
1 tim 66 #ifndef EXTRADATA_H
2     #define EXTRADATA_H
3     #include <iostream>
4     #include <map>
5    
6     using namespace std;
7    
8     // the advantage of using namespace over enum type is that you can
9     // add the new type as you want but make sure do not have conflict value
10     namespace TExtraDataType
11     {
12     const int UNKNOWN = 0;
13     const int COMMENT =1;
14     const int ENERGY = 2;
15     const int FORCE= 3;
16     const int ANGLE = 4;
17     };
18    
19    
20     namespace TEnergyDataType
21     {
22     const int BOND = 1;
23     const int ANGEL = 2;
24     const int DIHE = 3;
25     const int IMPR = 4;
26     const int VDW = 5;
27     const int COUL = 6;
28     const int HBOND = 7;
29     const int KE = 8;
30     const int PE = 9;
31     const int TEMP = 10;
32     const int TOTAL = 11;
33     const int VOLUME = 12;
34     const int PRESSURE = 13;
35     const int EFILED = 14;
36     const int UREY_BRADLEY = 15;
37     const int RESTRAINT = 16;
38     };
39    
40     class TExtraData
41     {
42     private:
43     string _ident;
44     int _type;
45     public:
46     TExtraData();
47     TExtraData(const TExtraData &extraData);
48     TExtraData& operator =(const TExtraData &extraData);
49     virtual ~TExtraData() {}
50    
51     string GetIdent() { return _ident;}
52     int GetType() { return _type;}
53    
54     void SetIdent(string ident) { _ident = ident;}
55     void SetType(int type) { _type = type;}
56     };
57    
58     class TEnergyData : public TExtraData
59     {
60     protected:
61     map<int, float> _energy;
62     map<int, float>::iterator FindEnergy(int energyType);
63     public:
64     TEnergyData();
65     ~TEnergyData();
66    
67     void AddEnegy(int energyType, float value);
68     void DeleteEnergy(int energyType);
69     void ReplaceEnergy(int energyType, float value);
70     bool IsEnergyExist(int energyType);
71     float *GetEnergy(int energyType);
72    
73     };
74    
75     #endif