Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

isotope.h

00001 // -*- C++ -*-
00002 
00003 /* 
00004  * Gnome Chemistry Utils
00005  * isotope.h 
00006  *
00007  * Copyright (C) 2005
00008  *
00009  * Developed by Jean Bréfort <jean.brefort@normalesup.rg>
00010  *
00011  * This library is free software; you can redistribute it and/or
00012  * modify it under the terms of the GNU Lesser General Public
00013  * License as published by the Free Software Foundation; either
00014  * version 2.1 of the License, or (at your option) any later version.
00015  *
00016  * This library is distributed in the hope that it will be useful,
00017  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00018  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00019  * Lesser General Public License for more details.
00020  *
00021  * You should have received a copy of the GNU Lesser General Public
00022  * License along with this library; if not, write to the 
00023  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00024  * Boston, MA  02111-1307, USA.
00025  */
00026 
00027 #ifndef GCU_ISOTOPE_H
00028 #define GCU_ISOTOPE_H
00029 
00030 #include <gcu/chemistry.h>
00031 #include <vector>
00032 
00033 using namespace std;
00034 
00035 namespace gcu
00036 {
00037 
00038 class Isotope: public GcuIsotope
00039 {
00040 public:
00041         Isotope ();
00042         ~Isotope ();
00043 };
00044 
00045 class IsotopicPattern
00046 {
00047 public:
00048         IsotopicPattern ();
00049         IsotopicPattern (int min, int max);
00050         ~IsotopicPattern ();
00051 
00052         IsotopicPattern *Simplify ();
00053         IsotopicPattern *multiply (IsotopicPattern& pattern);
00054         IsotopicPattern *square (void);
00055         void Copy (IsotopicPattern& pattern);
00056 
00057         void SetValue (int A, double percent);
00058         void Normalize ();
00059         void Clear ();
00060         void Ref () {ref_count++;}
00061         void Unref ();
00062         int GetMinMass () {return m_min;}
00063         int GetMonoNuclNb () {return m_mono;}
00064         double GetMonoMass () {return m_mono_mass;}
00065         void SetMonoMass (double mass);
00066         int GetValues (double **values);
00067 
00068 private:
00069         int m_min, m_max, m_mono;
00070         int ref_count;
00071         vector<double> m_values;
00072         double m_mono_mass;
00073         static double epsilon;
00074 };
00075 
00076 }
00077 #endif  // GCU_ISOTOPE_H

Generated on Thu Sep 8 10:36:39 2005 for The Gnome Chemistry Utils by  doxygen 1.4.1