1 #include "AngleInfo.h" 2 3 namespace ProtoMol{ AngleInfo()4 AngleInfo::AngleInfo() { 5 m_angle = 0.0; 6 m_pointer = 0; 7 m_angleType = ANGLE_NOTSET; 8 m_visited = false; 9 m_isExclusionAtom = false; 10 m_isInnerAtom = false; 11 m_atomID = 0; 12 } 13 ~AngleInfo()14 AngleInfo::~AngleInfo() { 15 } 16 17 setAtomID(unsigned int ID)18 void AngleInfo::setAtomID(unsigned int ID) { 19 m_atomID = ID; 20 } 21 getAtomID() const22 unsigned int AngleInfo::getAtomID() const{ 23 return m_atomID; 24 } 25 addBond(int atom)26 void AngleInfo::addBond(int atom) { 27 m_bondedAtoms.push_back(atom); 28 } 29 setAngle(Real angle)30 void AngleInfo::setAngle(Real angle) { 31 m_angle = angle; 32 m_angleType = ANGLE_VALUE; 33 } 34 setPointer(unsigned int atom)35 void AngleInfo::setPointer(unsigned int atom) { 36 m_pointer = atom; 37 m_angleType = ANGLE_POINTER; 38 } 39 getAngleType() const40 unsigned int AngleInfo::getAngleType()const { 41 return m_angleType; 42 } 43 getAngle() const44 Real AngleInfo::getAngle()const { 45 return m_angle; 46 } 47 getPointer() const48 unsigned int AngleInfo::getPointer() const{ 49 return m_pointer; 50 } 51 setVisited()52 void AngleInfo::setVisited() { 53 m_visited = true; 54 } 55 56 isVisited() const57 bool AngleInfo::isVisited() const{ 58 return m_visited; 59 } 60 61 setInnerAtom()62 void AngleInfo::setInnerAtom(){ 63 m_isInnerAtom = true; 64 } 65 66 isInnerAtom() const67 bool AngleInfo::isInnerAtom() const { 68 return m_isInnerAtom; 69 } 70 setExclusionAtom()71 void AngleInfo::setExclusionAtom() { 72 m_isExclusionAtom = true; 73 } 74 isExclusionAtom() const75 bool AngleInfo::isExclusionAtom() const{ 76 return m_isExclusionAtom; 77 } 78 numBonds() const79 unsigned int AngleInfo::numBonds()const { 80 return m_bondedAtoms.size(); 81 82 } 83 getBond(unsigned int index) const84 unsigned int AngleInfo::getBond(unsigned int index) const{ 85 if (index < m_bondedAtoms.size()) { 86 return m_bondedAtoms[index]; 87 } 88 return 0; 89 } 90 } 91