BioInt
1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
|
00001 /**************************************************************************** 00002 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 The BioBhasha : The Biologist's Programming Language 00004 Version 1.0 (19th December 2001) 00005 Prasad, B.V.L.S. 00006 Contact: burrashiva@yahoo.com 00007 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00008 *****************************************************************************/ 00009 00010 #ifndef BIOPROTEINCHAIN_H 00011 #define BIOPROTEINCHAIN_H 00012 00013 #define FILLED_CIRCLE 1 00014 #define PLUS 2 00015 #define OPEN_CIRCLE 3 00016 #define FILLED_TRIANGLE 4 00017 00018 00019 #include "BioChain.h" 00020 #include "BioPostScript.h" 00021 00022 using namespace std; 00023 00024 class BioProteinChain : public BioChain 00025 { 00026 friend bool operator >(const BioProteinChain& , const BioProteinChain&); 00027 friend bool operator <(const BioProteinChain& , const BioProteinChain&); 00028 friend bool operator ==(const BioProteinChain& , const BioProteinChain&); 00029 00030 float ri,gi,bi; 00031 float ro,go,bo; 00032 float rp,gp,bp; 00033 double SETCALLED; 00034 00035 double startX_,startY_,size_; 00036 double SETAREACALLED; 00037 00038 public: 00039 BioProteinChain(); 00040 ~BioProteinChain(){}; 00041 BioProteinChain(const string& ); 00042 BioProteinChain(const string& ,const char& ); 00043 BioProteinChain(const char& chid,const vector<BioResidue>& ); 00044 BioProteinChain(const long& atnumber,const string& atname,const string& resname,const char& ch, 00045 const long& resnumber, const float& x1, const float& y1, const float& z1, 00046 const float& oc1, const float& bf1,const string& atrec); 00047 00048 // CAUTION: THE ARGUMENTS EXPECT THE RESIDUE INDEX AND *NOT* RESIDUE NUMBER....... 00049 // PLEASE NOTE THIS....USE getResidueIndex(residue_number) FUNCTION.......... 00050 // use the RETURN VALUE OF THE ABOVE FUNCTION AS ARGUMENT TO THIS FOLLOWING FUNCTION. 00051 00052 BioProteinChain getChainSegment(const long& first, const long& last); 00053 BioProteinChain getChainSegment(const long& first, const long& last, const string& atname); 00054 00055 BioProteinChain eraseHydrogen(); 00056 friend ostream& operator<<(ostream& os, BioProteinChain& ip); 00057 00058 // The structurally near, sequentially far apart...........this is the general observation... 00059 // The structurally nearer residues and atom information can be added together again into 00060 // another chain..................For me, in my analysis, this speeded up the process of finding 00061 // the process of finding the least squares plane for a set of coordinates............. 00062 // the example: BioChain x, y, z; 00063 // BioChain a = x+y+z; now what ever is there in these 3 BioChains is put together and returned 00064 // to a as a chain again.................... 00065 00066 BioProteinChain operator+( BioProteinChain&); 00067 friend BioProteinChain operator+ ( BioResidue&, BioResidue&); 00068 BioProteinChain operator+ ( BioResidue&); 00069 00070 00071 //This Method Collects all the ResidueNames given in the ATOM RECORD and converts it 00072 //into singleLetterCode and returns it as a Sequence. The importance of AtomSequence 00073 //is that the SEquence which is being returned is "NOT" from SEQRES RECORD of PDB file 00074 //but from the ATOM RECORD of the PDBfile.The Residue Names should be strictly Standard 00075 //AminoAcid else it cannot convert to SingleLetterAminoAcid Code. It may lead to unknown 00076 // behavior and errors. 00077 00078 string getSequence(); 00079 long getSequenceLength(); 00080 void showInFasta(ostream& os = cout); 00081 00082 00083 // CAUTION: THE ARGUMENTS EXPECT THE RESIDUE INDEX AND *NOT* RESIDUE NUMBER....... 00084 // PLEASE NOTE THIS....USE getResidueIndex(residue_number) FUNCTION.......... 00085 // use the RETURN VALUE OF THE ABOVE FUNCTION AS ARGUMENT TO THIS FOLLOWING FUNCTION. 00086 string getSequenceSegment(const long&, const long&); 00087 // 00088 // All the Chi[1,2,3,4,5] of all the Residues in the Chain will be shown, which can 00089 // be redirected to a file, if desired. 00090 00091 BioProteinChain getRotatedProteinChain(const float **arr); 00092 void showChiAngles(ostream& = cout); 00093 00094 // This method is most important to structural Biologist. It shows the phi-psi-omega 00095 // values of all the Residues in the Chain. 00096 void showPhiPsiOmega(ostream& = cout); 00097 void setRamaPlotColorSpec(float=96.0,float=128.99,float=170.9,float=249, float=219, float=31.98, float=0, float=0, float=0); 00098 00099 void showRamaChandranPlot(BioPostScript& bioPostScriptObject,int type=FILLED_TRIANGLE,int pointWidth=3.2,int startX=80,int startY=250,int width=450,int height=450); 00100 void setProteinDisplayArea(double startx=80,double starty=250,double size=450); 00101 void showProteinChain(BioPostScript& obj,double width=1,double r=0, double g=0, double b=0); 00102 void showCAlphaTrace(BioPostScript& bioPostScriptObject,double width=1,double r=0, double g=0, double b=0); 00103 void showBackBone(BioPostScript &ps,double width=1,double r=255,double g=0,double b=0); 00104 00105 }; 00106 00107 #endif 00108