00001 // This is a -*- C++ -*- file 00002 //------------------------------------------------------------------------------------// 00003 // // 00004 // Copyright (c) 2001 // 00005 // INRIA // 00006 // 54600 VILLERS LES NANCY // 00007 // France // 00008 // // 00009 //------------------------------------------------------------------------------------// 00010 // // 00011 // * NOTICE OF PROPRIETARY INFORMATION * // 00012 // // 00013 // The information contained in this file is considered proprietary and the exclusive // 00014 // property of INRIA. This information may not be disclosed, duplicated // 00015 // or used, in whole or in part, for any purpose whatsoever without express written // 00016 // authorization from INRIA // 00017 // // 00018 #ifndef OC_FRAGMENTDATABASECLASS_H 00019 00020 #define OC_FRAGMENTDATABASECLASS_H 00021 #include <string> 00022 #include <fstream> 00023 #include <sstream> 00024 00025 // 00026 #include "Atoms.h" 00027 // 00028 00029 class FragmentDataBaseElement{ 00030 00031 public: 00032 //-------------------------------------------------------------// 00033 // Public Method : constructor 00034 //-------------------------------------------------------------// 00035 // 00037 FragmentDataBaseElement() ; 00038 FragmentDataBaseElement(const int size) ; 00039 //-------------------------------------------------------------// 00040 // Public Method : destructor 00041 //-------------------------------------------------------------// 00042 ~FragmentDataBaseElement() ; 00043 // 00044 std::string getFragmentName() const 00045 { return _fragmentName ; } 00046 // 00047 void setNumberOfAtoms(const int size) ; 00048 void read(std::ifstream & data) ; 00049 void write() ; 00050 bool findAtomName(const std::string &atomName ) ; 00051 // 00052 // 00053 //-------------------------------------------------------------// 00054 // Public Data : 00055 //-------------------------------------------------------------// 00056 int _numberOfAtoms ; 00057 std::string _fragmentName ; 00058 std::string *_nameOfAtoms ; 00059 } ; 00060 00061 class ResiduDataBaseElement{ 00062 00063 public: 00064 //-------------------------------------------------------------// 00065 // Public Method : constructor 00066 //-------------------------------------------------------------// 00067 // 00069 ResiduDataBaseElement() ; 00070 ResiduDataBaseElement(const int size) ; 00071 //-------------------------------------------------------------// 00072 // Public Method : destructor 00073 //-------------------------------------------------------------// 00074 ~ResiduDataBaseElement() ; 00075 // 00076 inline bool isMolecule(){ 00077 if (_numberOfFragments ==1){return true;} 00078 else {return false;} 00079 } 00080 void setNumberOfFragments(const int size) ; 00081 void read(std::ifstream & data) ; 00082 void write() ; 00083 std::string getFragmentName(const std::string &atomName ) ; 00084 // 00085 // 00086 //-------------------------------------------------------------// 00087 // Public Data : 00088 //-------------------------------------------------------------// 00089 int _numberOfFragments ; 00090 std::string _residuName ; 00091 FragmentDataBaseElement *_nameOfFragments ; 00092 } ; 00093 00094 class FragmentsDataBase{ 00095 00096 public: 00097 //-------------------------------------------------------------// 00098 // Public Method : constructor 00099 //-------------------------------------------------------------// 00100 // 00102 FragmentsDataBase (); 00103 FragmentsDataBase (const int size); 00104 //-------------------------------------------------------------// 00105 // Public Method : destructor 00106 //-------------------------------------------------------------// 00107 ~FragmentsDataBase (); 00108 // 00109 void read(std::ifstream & data) ; 00110 void write(); 00111 // 00112 std::string nameOfDataBase() const 00113 {return _nameOfDataBase ;} 00114 // 00115 void setNumberOfResidus(const int size) ; 00116 std::string findFragmentName(const std::string &residuName, const std::string &atomName ) ; 00117 bool getFragmentNameFrom(const std::string &residuName, const std::string &atomName, 00118 std::string &fragmentName) ; 00119 // 00120 //-------------------------------------------------------------// 00121 // Public Data : 00122 //-------------------------------------------------------------// 00123 int _numberOfResidus ; 00124 std::string *_nameOfResidus ; 00125 ResiduDataBaseElement *_setOfResidus ; 00126 std::string _nameOfDataBase ; 00127 } ; 00128 00129 00130 00131 #endif