--- trunk/FAS/src/fasatom.cpp 2002/08/13 16:02:26 66 +++ trunk/FAS/src/fasatom.cpp 2002/08/15 22:14:31 81 @@ -1,12 +1,35 @@ +/********************************************************************** +* Copyright (C) 2002-2003 by Gezelter's Group +*This program is free software; you can redistribute it and/or modify +*it under the terms of the GNU General Public License as published by +*the Free Software Foundation version 2 of the License. +* +*This program is distributed in the hope that it will be useful, +*but WITHOUT ANY WARRANTY; without even the implied warranty of +*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +*GNU General Public License for more details. +* +************************************************************************ +*Author: Teng Lin Email: tlin@nd.edu +*Date: 08/13/2002 Version: 1.0 +* +************************************************************************ +*Description: +* +***********************************************************************/ #include #include #include "fasatom.h" using namespace std; +/*********************************************************************** +* Class TFASAtom +***********************************************************************/ void TFASAtom::Clear() { _index = 0; + _frameIndex = 0; _atomicNum = 0; _nameIndex = 0; _typeIndex = 0; @@ -28,44 +51,134 @@ 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 { _bondList.push_back(bond); - back(bond); } } @@ -206,7 +319,9 @@ bool TFASAtom::IsPhosphateOxygen() bool TFASAtom::IsPhosphateOxygen() { + if (!IsOxygen()) return false; + } bool TFASAtom::IsSulfateOxygen() @@ -264,7 +379,7 @@ bool TFASAtom::IsAxial() } -bool TFASAtom::HasAlphaBetaUnsat(bool includePandS=true) +bool TFASAtom::HasAlphaBetaUnsat(bool includePandS) { }