00001 /**************************************************************************************** 00002 elements.h 00003 ------------- 00004 copyright : (C) 2006 Jean-Luc Perret - Pierre Mahé 00005 email : jean-luc.perret@unine.ch - pierre.mahe@ensmp.fr 00006 ***************************************************************************************/ 00007 00008 /**************************************************************************************** 00009 * * 00010 * This program is free software; you can redistribute it and/or * 00011 * modify it under the terms of the GNU Lesser General Public * 00012 * License as published by the Free Software Foundation; either * 00013 * version 2.1 of the License, or (at your option) any later version. * 00014 * * 00015 * This program is distributed in the hope that it will be useful, * 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 00018 * Lesser General Public License for more details. * 00019 * * 00020 * You should have received a copy of the GNU Lesser General Public * 00021 * License along with this library; if not, write to the Free Software * 00022 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * 00023 * * 00024 ****************************************************************************************/ 00025 00026 00027 #ifndef ELEMENTS_H 00028 #define ELEMENTS_H 00029 00030 #include <iostream> 00031 #include <fstream> 00032 #include <vector> 00033 #include <stdlib.h> 00034 #include <math.h> 00035 00036 //using namespace std; 00037 00038 #include <datacontainer.h> 00039 #include <atom.h> 00040 #include <stringutils.h> 00041 00102 class Elements : public DataContainer { 00103 public: 00104 00106 00107 00109 Elements( string aFileName, string aGramAtomFileName ); 00110 00115 ~Elements(); 00116 00119 Atom* operator[](string aSymbol); 00120 00123 Atom* getElement(string aSymbol); 00124 00130 void loadGramAtoms(string filename); 00131 00135 string getAtomKernelName(); 00136 00139 void loadDefinition( string aFilename ); 00140 00143 uint numElements(){ return( periodicTable.size() ); } 00144 00146 00147 00148 00149 00150 // ****************************** // 00151 // **** DEPRECATED FUNCTIONS **** // 00152 // ****************************** // 00155 //void describe(); 00156 //Elements(); 00157 00158 00159 00160 // SECOND TIMES PUBLIC ?????? 00161 //public: 00162 00163 00167 float gramAtom[NUMELEMENTS][NUMELEMENTS]; 00168 00171 string gramAtomName; 00172 00173 00174 00175 private : 00176 00179 map<string, Atom*> periodicTable; 00180 00181 00182 00183 00184 }; 00185 00186 00187 00188 #endif 00189