mFES - molecular Finite Element Solver
0.4
|
00001 00010 #ifndef ATOM_H 00011 #define ATOM_H 00012 00013 #include <string> 00014 #include <iomanip> 00015 #include <vcg/space/point3.h> 00016 00017 using namespace vcg; 00018 using namespace std; 00019 00033 class Atom { 00034 public: 00037 Atom(){}; 00038 00054 Atom(int _atomNumber, string _atomName, char _confID, string _residueName, char _chainID, int _residueNumber, Point3<float> _coord, float _charge, float _radius, string _segName): 00055 atomNumber(_atomNumber), 00056 atomName(_atomName), 00057 confID(_confID), 00058 residueName(_residueName), 00059 chainID(_chainID), 00060 residueNumber(_residueNumber), 00061 coord(_coord), 00062 charge(_charge), 00063 radius(_radius), 00064 segName(_segName) 00065 { 00066 00067 } 00068 00073 void print(){ 00074 cout << "Atom number : " << atomNumber << endl; 00075 cout << "Atom name : " << atomName << endl; 00076 cout << "Conform. nr : " << confID << endl; 00077 cout << "Residue name: " << residueName << endl; 00078 cout << "Chain nr : " << chainID << endl; 00079 cout << "Residue nr : " << residueNumber << endl; 00080 cout << "Coordinates : (" << coord.X() << ", " << coord.Y() << ", " << coord.Z() << ")" << endl; 00081 cout << "Charge : " << charge << endl; 00082 cout << "Radius : " << radius << endl; 00083 cout << "Segment name: " << segName << endl; 00084 } 00085 00090 Point3<float> getCoord(){ 00091 return coord; 00092 } 00093 00098 float getRadius(){ 00099 return radius; 00100 } 00101 00106 int getResidueNumber(){ 00107 return residueNumber; 00108 } 00109 00114 string getResidueName(){ 00115 return residueName; 00116 } 00117 00123 void setResidueName(string _residueName){ 00124 residueName = _residueName; 00125 } 00126 00131 char getChainID(){ 00132 return chainID; 00133 } 00134 00139 string getAtomName(){ 00140 return atomName; 00141 } 00142 00148 void setCharge(float _charge){ 00149 charge = _charge; 00150 } 00151 00156 float getCharge(){ 00157 return charge; 00158 } 00159 00160 00165 int getAtomNumber(){ 00166 return atomNumber; 00167 } 00168 00169 00174 string pqrLine(){ 00175 stringstream ss; 00176 ss << "ATOM" << setw(7) << atomNumber << setw(5) << atomName << setw(1) 00177 << confID << setw(3) << residueName << setw(2) << chainID << setw(4) 00178 << residueNumber << setw(12) << coord.X() << setw(8) << coord.Y() 00179 << setw(8) << coord.Z() << setw(6) << charge << setw(6) 00180 << radius << setw(7) << segName; 00181 return ss.str(); 00182 } 00183 00184 private: 00186 int atomNumber; 00188 string atomName; 00190 char confID; 00192 string residueName; 00194 char chainID; 00196 int residueNumber; 00198 Point3<float> coord; 00200 float charge; 00202 float radius; 00204 string segName; 00205 }; 00206 00207 #endif