Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages

ProtonDistributionModel.h (Maintainer: Andreas Bertsch)

Go to the documentation of this file.
00001 // -*- Mode: C++; tab-width: 2; -*-
00002 // vi: set ts=2:
00003 //
00004 // --------------------------------------------------------------------------
00005 //                   OpenMS Mass Spectrometry Framework
00006 // --------------------------------------------------------------------------
00007 //  Copyright (C) 2003-2008 -- Oliver Kohlbacher, Knut Reinert
00008 //
00009 //  This library is free software; you can redistribute it and/or
00010 //  modify it under the terms of the GNU Lesser General Public
00011 //  License as published by the Free Software Foundation; either
00012 //  version 2.1 of the License, or (at your option) any later version.
00013 //
00014 //  This library is distributed in the hope that it will be useful,
00015 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 //  Lesser General Public License for more details.
00018 //
00019 //  You should have received a copy of the GNU Lesser General Public
00020 //  License along with this library; if not, write to the Free Software
00021 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 //
00023 // --------------------------------------------------------------------------
00024 // $Maintainer: Andreas Bertsch $
00025 // --------------------------------------------------------------------------
00026 
00027 
00028 #ifndef OPENMS_ANALYSIS_ID_PROTONDISTRIBUTIONMODEL_H
00029 #define OPENMS_ANALYSIS_ID_PROTONDISTRIBUTIONMODEL_H
00030 
00031 #include <OpenMS/DATASTRUCTURES/HashMap.h>
00032 #include <OpenMS/DATASTRUCTURES/String.h>
00033 #include <OpenMS/CONCEPT/Types.h>
00034 #include <OpenMS/CHEMISTRY/Residue.h>
00035 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
00036 #include <vector>
00037 
00038 namespace OpenMS 
00039 {
00040   class AASequence;
00041 
00065   class ProtonDistributionModel : public DefaultParamHandler
00066   {
00067     public:
00068       
00072 
00073       ProtonDistributionModel();
00074 
00076       ProtonDistributionModel(const ProtonDistributionModel& model);
00077       
00079       virtual ~ProtonDistributionModel();
00081 
00083       ProtonDistributionModel& operator = (const ProtonDistributionModel& pdm);
00084 
00088 
00089       enum FragmentationType
00090       {
00091         ChargeDirected = 0,
00092         ChargeRemote,
00093         SideChain
00094       };
00096 
00105       void getProtonDistribution(HashMap<UInt, double>& bb_charges, HashMap<UInt, double>& sc_charges, const AASequence& peptide, int charge, Residue::ResidueType res_type = Residue::YIon);
00106 
00120       void getChargeStateIntensities(const AASequence& peptide, const AASequence& n_term_ion, const AASequence& c_term_ion, int charge, Residue::ResidueType n_term_type, double& n_term1,  double& c_term1, double& n_term2, double& c_term2, FragmentationType type);
00121 
00123       void setPeptideProtonDistribution(const HashMap<UInt, double>& bb_charge, const HashMap<UInt, double>& sc_charge);
00124 
00125       protected:
00126 
00127       // calculates the proton distribtion
00128       void calculateProtonDistribution_(const AASequence& peptide, int charge, Residue::ResidueType res_type = Residue::YIon, bool fixed_proton = false, UInt cleavage_site = 0, bool use_most_basic_site = false);
00129   
00130       // returns the proton affinity of the peptide with the given charge and ion type
00131       double getProtonAffinity_(const AASequence& ion, int charge, Residue::ResidueType res_type);
00132 
00133       // returns the (relative) Intensities of the possible charge states of the ion from peptide
00134       std::vector<double> getChargeStateIntensities_(const AASequence& peptide, const AASequence& ion, int charge, Residue::ResidueType res_type);
00135 
00136       // calculates the intensities of the different possible charge states
00137       void calcChargeStateIntensities_(const AASequence& peptide, const AASequence& n_term_ion, const AASequence& c_term_ion, int charge, Residue::ResidueType n_term_type, double& n_term1, double& c_term1, double& n_term2, double& c_term2, FragmentationType type);
00138 
00139       // returns the left and right GB values, NH2 and COOH if at terminus
00140       void getLeftAndRightGBValues_(const AASequence& peptide, double& left_gb, double& right_gb, UInt position);
00141       
00142       HashMap<UInt, double> sc_charge_;
00143       HashMap<UInt, double> bb_charge_;
00144       HashMap<UInt, double> sc_charge_full_;
00145       HashMap<UInt, double> bb_charge_full_;
00146       double E_;
00147       double E_c_term_;
00148       double E_n_term_;
00149 
00150   };
00151 }
00152 #endif // OPENMS_ANALYSIS_ID_PROTONDISTRIBUTIONMODEL_H
00153 

Generated Tue Apr 1 15:36:37 2008 -- using doxygen 1.5.4 OpenMS / TOPP 1.1