BioInt
1.02.00
BioInt: An integrative biological object-oriented application framework and interpreter
|
00001 /**************************************************************************** 00002 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00003 The BioBhasha : A Programming Language for Biologist 00004 Version 1.0 (19th December 2001) 00005 Dr. Prasad, B.V.L.S. 00006 Contact: prasadbvls@helixgenomics.com 00007 Version 1.1 (23th January 2003) 00008 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 00009 *****************************************************************************/ 00010 #ifndef BIOWATER_H 00011 #define BIOWATER_H 00012 00013 #include <string> 00014 #include <fstream> 00015 #include "BioResidue.h" 00016 #include "BioPostScript.h" 00017 00018 /**************************************************************************** 00019 * 00020 * COMMENTARY on Each Class/Concept: Hows and Whys : 00021 * 00022 * BioWater: 00023 * It has long been known the Very crucial role played by the crystallographic 00024 * waters ..like catalytic water, involved in the formation of Proton Wires 00025 * in Serine Proteinases and my recent Papers on "Role of Crystallographic 00026 * Waters in Aspartic Proteinase Family emphasizes the role of invariant 00027 * waters at a greater length and insight. 00028 * Water can be considered as Residue with 2 Hydrogens Atoms and 1 Oxygen Atom. 00029 * The number of waters included in a PDB file is arbitrary or not fixed, hence 00030 * again, vector<BioResidue> is most apt. 00031 * Once feature of BioWater is that it is Conceptualized as a BioChain.. 00032 * This is because of the Importance of Water in and around Protein. 00033 * Water is also an integral Part of a Protein molecule. It is rightly said 00034 * the water molecules give respective proteins extra breathing space. They 00035 * increase the Overall Molecular Surface Area. 00036 * Hence, these waters are felt like behaving as a seperate chain. 00037 * A provision is also made to give/set a ChainId to all these Water molecules. 00038 * The role of water played in Proteins is gaining importance. 00039 * There would grow a lot of other mathematical tools which would be operated on 00040 * water data exclusively, hence conceptualizing Water as seperate ADT 00041 * is very much relevant. The Data related to Water is set in BioWater. 00042 ****************************************************************************/ 00043 00044 // As far as possible the names of Methods have been used with very less variation 00045 // as this will reduce the burden of a user to memorise more and also drives the 00046 // user to use his/her Intution more.. 00047 // The Methods are self explanatory. If not please do refer to BioResidue.h, 00048 // BioAtom.h, BioChain.h for detailed explanatory notes. 00049 class BioWater 00050 { 00051 vector<BioResidue>water; 00052 char chainId_; 00053 double startX_,startY_,size_; 00054 double SETAREACALLED; 00055 00056 public: 00057 // Default Constructor; 00058 BioWater(); 00059 ~BioWater(); 00060 // This constructor expects a PDB filename. This checks for Water name to 00061 // terminate its populating work.The Water names which it checks are "HOH", 00062 // "WAT", "H2O", "SOL", "TIP". This should be taken care off. 00063 BioWater(const string&); 00064 00065 // this constructor is used to return an Object .. 00066 // ONe initially populates the BioResidue Vector Container, 00067 // then it is passed on to BioWater. 00068 BioWater(const char& , const vector<BioResidue>& ); 00069 00070 // shows the Water in PDB format. It can be put into a file also. 00071 void showWater(ostream& = cout); 00072 // to get the NumberOf Waters 00073 int getNumberOfWaters() const; 00074 // Generally, users remember the Water Number, and if one wants 00075 // to get the index from the water container, then this Method is used. 00076 // This method is expected to be used most widely in any type of Computational 00077 // work. 00078 // Difference between Index and Water Number: 00079 // vector<BioResidue>water; 00080 // water[Index].someMethod(); 00081 // Water Number is the one given in the PDB file at the Residue Number 00082 // position. 00083 int getWaterIndex(const int& ) const; 00084 00085 // The water numbers provided in a PDB dont have a standard rule. They can have any 00086 // starting number. To access or to run through all the water numbers for some 00087 // other use, one can give some Index, ofcourse < getNumberOfWaters(), and one 00088 // can get the number of Waters with that particular index. 00089 // Suggestion is "ALWAYS USE THE INDEX OF THE WATER THAN THE 00090 // NUMBER OF THE WATER MOLECULE....................... 00091 int getWaterNumber(const int& ) const; 00092 00093 // To give a better handling of Water Data , a chain can be given. 00094 // getChainId...is self explanatory. 00095 void setChainId(const char& ); 00096 char getChainId() const ; 00097 00098 // If the water coordinates have Hydrogen Atom information and is not needed 00099 // for the analysis, then one can get a copy of the data of Water with out 00100 // the Hydrogen Information. This is a very useful option. 00101 BioWater eraseHydrogen(); 00102 00103 // In this Method, the waterIndex is expected and *NOT* waterNumber as per the 00104 // conventions followed all through BioBhasha............... 00105 // This returns the whole information about that particular water in 00106 // the form of a BioResidue. This also has high usability during analysis. 00107 BioResidue& getWater(const int& ); 00108 void setDisplayArea(double startx=80,double starty=250,double size=450); 00109 void showWater(BioPostScript& ps,double width=1,double r=255, double g=0, double b=0); 00110 }; 00111 00112 #endif