--- trunk/FAS/src/fasatom.cpp 2002/08/14 23:27:28 77 +++ trunk/FAS/src/fasatom.cpp 2002/08/15 22:14:31 81 @@ -23,9 +23,13 @@ using namespace std; using namespace std; +/*********************************************************************** +* Class TFASAtom +***********************************************************************/ void TFASAtom::Clear() { _index = 0; + _frameIndex = 0; _atomicNum = 0; _nameIndex = 0; _typeIndex = 0; @@ -47,39 +51,130 @@ void TFASAtom::Clear() _residue = NULL; _mol = NULL; _model = NULL; - _bondList.clear(); - + _bondList.clear(); + } +TFASAtom::TFASAtom() +{ + Clear(); +} + TFASAtom::TFASAtom(int index) { Clear(); _index = index; + _frameIndex = (index - 1) * 3; } +TFASAtom::TFASAtom(const TFASAtom &src) +{ + +} + TFASAtom::~TFASAtom() { - + Clear(); } +// unsigned int TFASAtom::GetHvyValence() { unsigned int count; vector::iterator i; TFASAtom *atom; count=0; - + for(atom = BeginNbrAtom(i); atom != NULL; atom = NextNbrAtom(i)) if(!atom->IsHydrogen()) count++; - + return count; } +//Get Coordinate & Velocity +/* +float TFASAtom::GetRX(int frameNum) +{ + if (_model != NULL) + { + return _model->GetRX(_frameIndex, frameNum); + } + else + { + + } +} + +float TFASAtom::GetRY(int frameNum) +{ + if (_model != NULL) + { + return _model->GetRY(_frameIndex+1, frameNum); + } + else + { + + } + +} + +float TFASAtom::GetRZ(int frameNum) +{ + if (_model != NULL) + { + return _model->GetRZ(_frameIndex+2, frameNum); + } + else + { + + } + +} + +float TFASAtom::GetVX(int frameNum) +{ + if (_model != NULL) + { + return _model->GetVX(_frameIndex, frameNum); + } + else + { + + } + +} + +float TFASAtom::GetVY(int frameNum) +{ + if (_model != NULL) + { + return _model->GetVY(_frameIndex+1, frameNum); + } + else + { + + } + +} + +float TFASAtom::GetVZ(int frameNum) +{ + if (_model != NULL) + { + return _model->GetVZ(_frameIndex+2, frameNum); + } + else + { + + } + +} +*/ void TFASAtom::AddBond(TFASBond * bond) { if (bond==NULL) { - + } else { @@ -224,7 +319,9 @@ bool TFASAtom::IsPhosphateOxygen() bool TFASAtom::IsPhosphateOxygen() { + if (!IsOxygen()) return false; + } bool TFASAtom::IsSulfateOxygen()