00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
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
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
00131 double getProtonAffinity_(const AASequence& ion, int charge, Residue::ResidueType res_type);
00132
00133
00134 std::vector<double> getChargeStateIntensities_(const AASequence& peptide, const AASequence& ion, int charge, Residue::ResidueType res_type);
00135
00136
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
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