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_FRAGMENTCLASS_H 00019 00020 #define OC_FRAGMENTCLASS_H 00021 #include <string> 00022 #include <fstream> 00023 #include <sstream> 00024 00025 // 00026 #include "Atoms.h" 00027 // 00028 class FragmentElement{ 00029 00030 public: 00031 //-------------------------------------------------------------// 00032 // Public Method : constructor 00033 //-------------------------------------------------------------// 00034 // 00036 FragmentElement (); 00037 //-------------------------------------------------------------// 00038 // Public Method : destructor 00039 //-------------------------------------------------------------// 00040 ~FragmentElement (); 00041 // 00042 std::string getAtomName() const 00043 { return _name ;} 00044 std::string getName() const 00045 { return _name ;} 00046 // 00047 int numberOfAtoms() const 00048 { return this->_atoms.getNumberOfAtoms() ;} 00049 // 00050 void setAtoms(const int beginAtom, const int EndAtom, const setOfAtoms &atoms); 00051 // 00052 int numberOfElectrons() const 00053 { return _numberOfElectrons ;} 00054 // 00055 int& numberOfElectrons() 00056 { return _numberOfElectrons ;} 00057 // 00058 int load() const 00059 { return _numberOfOA ;} 00060 // 00061 int& load() 00062 { return _numberOfOA ;} 00063 // 00064 void setLoad() ; 00065 // 00066 double * centre(){ 00067 return _centre ; 00068 } 00069 // 00070 void writeQCIFile(std::ofstream & out); 00071 // 00072 00073 //-------------------------------------------------------------// 00074 // Public Data : 00075 //-------------------------------------------------------------// 00076 int _numberOfElectrons ; 00077 int _numberOfOA ; 00078 double _centre[3] ; 00079 double _coinMin[3] ; 00080 double _coinMax[3] ; 00081 std::string _name ; 00082 setOfAtoms _atoms ; 00083 int *_index ; 00084 } ; 00085 00086 00087 00088 class setOfFragments { 00089 00090 public: 00091 setOfFragments() ; 00092 setOfFragments(const int size) ; 00093 ~setOfFragments() ; 00094 // 00095 int numberOfFraments() const 00096 { return _numberOfFragments ; } 00097 // 00098 int totalNumberOfAtoms() const 00099 { return _numberOfAtomsInAllFragments ; } 00100 // 00101 FragmentElement getElement(const int i) const 00102 { return this->_fragments[i] ; } 00103 // 00104 FragmentElement& getElement(const int i) 00105 { return this->_fragments[i] ; } 00106 // 00107 bool buildFromAtoms(setOfAtoms &atoms) ; 00108 // 00109 void writeQCIFile(std::ofstream & out); 00110 void writeToFile(std::ofstream & out); 00111 void writeUCDFile(std::ofstream & out); 00112 //-------------------------------------------------------------// 00113 // Public Data : 00114 //-------------------------------------------------------------// 00115 protected: 00116 int _numberOfFragments ; 00117 int _numberOfAtomsInAllFragments ; 00118 FragmentElement *_fragments ; 00119 00120 } ; 00121 00122 #endif