22 |
|
#include <iostream> |
23 |
|
#include <vector> |
24 |
|
#include "fasbond.h" |
25 |
+ |
#include "fasmodel.h" |
26 |
|
using namespace std; |
27 |
|
|
28 |
|
class TFASModel; |
60 |
|
{ |
61 |
|
protected: |
62 |
|
unsigned int _index; |
63 |
+ |
unsigned int _frameIndex; |
64 |
|
unsigned int _atomicNum; |
65 |
|
unsigned int _nameIndex; |
66 |
|
unsigned int _typeIndex; |
70 |
|
unsigned int _chainIndex; |
71 |
|
unsigned int _segnameIndex; |
72 |
|
int _atomProp; |
73 |
< |
|
74 |
< |
//actually we can put these properties on an element table, but we may want to change them sometime, who |
73 |
> |
|
74 |
> |
//actually we can put these properties on an element table, but we may want to change them sometime, who |
75 |
|
//knows, anyway it is a trade off between space and speed |
76 |
|
float _mass; |
77 |
|
float _charge; |
82 |
|
float _pcharge; |
83 |
|
unsigned int _hyb; |
84 |
|
unsigned int _impval; |
85 |
< |
|
85 |
> |
|
86 |
|
TFASResidue *_residue; |
87 |
|
TFASMolecule *_mol; |
88 |
|
TFASModel * _model; |
89 |
|
vector<TFASBond *> _bondList; |
90 |
|
bool _pseudo; |
91 |
< |
|
91 |
> |
|
92 |
|
void SetAtomProp(int atomProp) { _atomProp |= atomProp;} |
93 |
|
void Clear(); |
94 |
|
public: |
95 |
+ |
TFASAtom(); |
96 |
|
TFASAtom(int index); |
97 |
+ |
TFASAtom(const TFASAtom & src); |
98 |
|
~TFASAtom(); |
99 |
< |
|
99 |
> |
|
100 |
|
//methods to set atomic information |
101 |
< |
void SetIndex(unsigned int index) { _index = index;} |
101 |
> |
void SetIndex(unsigned int index) { _index = index, _frameIndex = 3*(index-1);} |
102 |
|
void SetAtomicNum(unsigned int atomicNum) { _atomicNum = atomicNum;} |
103 |
< |
void SetNameIndex(unsigned int nameIndex) { _nameIndex = nameIndex;} |
103 |
> |
void SetNameIndex(unsigned int nameIndex) { _nameIndex = nameIndex;} |
104 |
|
void SetTypeIndex(unsigned int typeIndex) { _typeIndex = typeIndex;} |
105 |
|
void SetResid(unsigned int resid) { _resid=resid;} |
106 |
|
void SetResidIndex(unsigned int residIndex) { _residIndex = residIndex;} |
107 |
|
void SetResnameIndex(unsigned int resnameIndex) { _resnameIndex = resnameIndex;} |
108 |
|
void SetChainIndex(unsigned int chainIndex) { _chainIndex = chainIndex;} |
109 |
< |
void SetSegnameIndex(unsigned int segnameIndex) { _segnameIndex = segnameIndex;} |
109 |
> |
void SetSegnameIndex(unsigned int segnameIndex) { _segnameIndex = segnameIndex;} |
110 |
|
void SetResidue(TFASResidue *residue) { _residue = residue;} |
111 |
|
void SetMolecule(TFASMolecule *mol) { _mol = mol;} |
112 |
|
void SetModel(TFASModel *model) { _model = model;} |
120 |
|
void SetMaxBonds(float maxBonds) { _maxBonds=maxBonds;} |
121 |
|
void SetHyb(unsigned int hyb) { _hyb = hyb;} |
122 |
|
void SetImplicitValence (unsigned int impval) { _impval = impval;} |
123 |
< |
|
123 |
> |
|
124 |
|
//methods to get atomic information |
125 |
|
unsigned int GetIndex() { return _index;} |
126 |
+ |
unsigned int GetFrameIndex() { return _frameIndex;} |
127 |
|
unsigned int GetAtomicNum() { return _atomicNum;} |
128 |
|
unsigned int GetNameIndex() { return _nameIndex;} |
129 |
|
unsigned int GetTypeIndex() { return _typeIndex;} |
130 |
< |
unsigned int GetResid() { return _resid;} |
130 |
> |
unsigned int GetResid() { return _resid;} |
131 |
|
unsigned int GetResidIndex() { return _residIndex;} |
132 |
|
unsigned int GetResnameIndex() { return _resnameIndex;} |
133 |
|
unsigned int GetChainIndex() { return _chainIndex;} |
134 |
|
unsigned int GetSegnameIndex() { return _segnameIndex;} |
135 |
< |
|
135 |
> |
|
136 |
|
TFASResidue *GetResidue() { return _residue;} |
137 |
|
TFASMolecule *GetMolecule() { return _mol;} |
138 |
|
TFASModel *GetModel() { return _model;} |
139 |
|
bool IsPseudo() { return _pseudo;} |
140 |
< |
|
140 |
> |
|
141 |
|
float GetMass() { return _mass;} |
142 |
|
float GetCharge() { return _charge;} |
143 |
|
float GetPartialCharge() { return _pcharge;} |
149 |
|
unsigned int GetImplicitValence() { return _impval;} |
150 |
|
unsigned int GetHvyValence(); |
151 |
|
unsigned int GetValence() {return (unsigned int)_bondList.size();} |
152 |
< |
|
152 |
> |
|
153 |
> |
//Get Coordinate and Velocity |
154 |
> |
/* |
155 |
> |
float GetRX(int frameNum = -1); |
156 |
> |
float GetRY(int frameNum = -1); |
157 |
> |
float GetRZ(int frameNum = -1); |
158 |
> |
float GetVX(int frameNum = -1); |
159 |
> |
float GetVY(int frameNum = -1); |
160 |
> |
float GetVZ(int frameNum = -1); |
161 |
> |
*/ |
162 |
|
//meothds to manipulate bond |
163 |
|
void AddBond(TFASBond * bond); |
164 |
|
void DeleteBond(TFASBond *bond); |
165 |
|
TFASBond *BeginBond(vector<TFASBond *>::iterator &i); |
166 |
|
TFASBond *NextBond(vector<TFASBond *>::iterator &i); |
167 |
< |
TFASBond *GetBond(TFASAtom *nbrAtom); |
167 |
> |
TFASBond *GetBond(TFASAtom *nbrAtom); |
168 |
|
//methods to traverse neighbor atoms |
169 |
|
TFASAtom *BeginNbrAtom(vector<TFASBond *>::iterator &i); |
170 |
|
TFASAtom *NextNbrAtom(vector<TFASBond *>::iterator &i); |
171 |
< |
|
171 |
> |
|
172 |
|
// |
173 |
|
|
174 |
|
int GetAtomProp() { return _atomProp;} |