OpenMS  3.0.0
Constants.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2022.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg$
32 // $Authors: Marc Sturm $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
37 #include <OpenMS/config.h>
38 #include <string>
39 
45 namespace OpenMS
46 {
68  namespace Constants
69  {
73 
75  inline const double PI = 3.14159265358979323846;
76 
78  inline const double E = 2.718281828459045235;
79 
83  inline double EPSILON = 1e-6;
85 
89 
93  inline const double ELEMENTARY_CHARGE = 1.60217738E-19; // C
94 
96  inline const double e0 = ELEMENTARY_CHARGE;
97 
101  inline const double ELECTRON_MASS = 9.1093897E-31; // kg
102 
106  inline const double ELECTRON_MASS_U = 1.0 / 1822.8885020477; // u
107 
111  inline const double PROTON_MASS = 1.6726230E-27; // kg
112 
116  inline const double PROTON_MASS_U = 1.0072764667710; // u
117 
121  inline const double C13C12_MASSDIFF_U = 1.0033548378; // u
122 
126  inline const double NEUTRON_MASS = 1.6749286E-27; // kg
127 
131  inline const double NEUTRON_MASS_U = 1.00866491566; // u
132 
136  inline const double AVOGADRO = 6.0221367E+23; // 1 / mol
137 
140  inline const double NA = AVOGADRO;
141 
144  inline const double MOL = AVOGADRO;
145 
149  inline const double BOLTZMANN = 1.380657E-23; // J / K
150 
153  inline const double k = BOLTZMANN;
154 
158  inline const double PLANCK = 6.6260754E-34; // J * sec
159 
162  inline const double h = PLANCK;
163 
166  inline const double GAS_CONSTANT = NA * k;
167 
170  inline const double R = GAS_CONSTANT;
171 
174  inline const double FARADAY = NA * e0;
175 
178  inline const double F = FARADAY;
179 
183  inline const double BOHR_RADIUS = 5.29177249E-11; // m
184 
187  inline const double a0 = BOHR_RADIUS;
188 
189  // the following values from:
190  // P.W.Atkins: Physical Chemistry, 5th ed., Oxford University Press, 1995
191 
195  inline const double VACUUM_PERMITTIVITY = 8.85419E-12; // C^2 / (J * m)
196 
200  inline const double VACUUM_PERMEABILITY = (4 * PI * 1E-7); // J s^2 / (C^2 * m)
201 
205  inline const double SPEED_OF_LIGHT = 2.99792458E+8; // m / s
206 
209  inline const double c = SPEED_OF_LIGHT;
210 
214  inline const double GRAVITATIONAL_CONSTANT = 6.67259E-11; // N m^2 / kg^2
215 
219  inline const double FINE_STRUCTURE_CONSTANT = 7.29735E-3; // 1
221 
225 
229  inline const double DEG_PER_RAD = 57.2957795130823209;
230 
234  inline const double RAD_PER_DEG = 0.0174532925199432957;
235 
239  inline const double MM_PER_INCH = 25.4;
240 
244  inline const double M_PER_FOOT = 3.048;
245 
249  inline const double JOULE_PER_CAL = 4.184;
250 
254  inline const double CAL_PER_JOULE = (1 / 4.184);
255 
256  namespace UserParam
257  {
261  inline const std::string CONCAT_PEPTIDE = "concatenated_peptides";
262 
265  inline const std::string LOCALIZED_MODIFICATIONS_USERPARAM = "localized_modifications";
266 
270  inline const std::string MERGED_CHROMATOGRAM_MZS = "merged_chromatogram_mzs";
271 
275  inline const std::string PRECURSOR_ERROR_PPM_USERPARAM = "precursor_mz_error_ppm";
276 
280  inline const std::string FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM = "fragment_mz_error_median_ppm";
281 
282 
286  inline const std::string FRAGMENT_ERROR_PPM_USERPARAM = "fragment_mass_error_ppm";
287 
291  inline const std::string FRAGMENT_ERROR_DA_USERPARAM = "fragment_mass_error_da";
292 
296  inline const std::string FRAGMENT_ANNOTATION_USERPARAM = "fragment_annotation";
297 
301  inline const std::string PSM_EXPLAINED_ION_CURRENT_USERPARAM = "PSM_explained_ion_current";
302 
303  // User parameter name for the fraction of prefix ions that have been matched
304  inline const std::string MATCHED_PREFIX_IONS_FRACTION = "matched_prefix_ions_fraction";
305 
306  // User parameter name for the fraction of suffix ions that have been matched
307  inline const std::string MATCHED_SUFFIX_IONS_FRACTION = "matched_suffix_ions_fraction";
308 
312  inline const std::string SPECTRUM_REFERENCE = "spectrum_reference";
313 
317  inline const std::string TARGET_DECOY = "target_decoy";
318 
322  inline const std::string DELTA_SCORE = "delta_score";
323 
327  inline const std::string ISOTOPE_ERROR = "isotope_error";
328 
329  // Cross-Linking Mass Spectrometry user parameters
333  inline const std::string OPENPEPXL_SCORE = "OpenPepXL:score";
334 
338  inline const std::string OPENPEPXL_BETA_SEQUENCE = "sequence_beta";
339 
343  inline const std::string OPENPEPXL_BETA_ACCESSIONS = "accessions_beta";
344 
348  inline const std::string OPENPEPXL_XL_POS1 = "xl_pos1";
349 
353  inline const std::string OPENPEPXL_XL_POS2 = "xl_pos2";
354 
358  inline const std::string OPENPEPXL_XL_POS1_PROT = "xl_pos1_protein";
359 
363  inline const std::string OPENPEPXL_XL_POS2_PROT = "xl_pos2_protein";
364 
368  inline const std::string OPENPEPXL_XL_TYPE = "xl_type";
369 
373  inline const std::string OPENPEPXL_XL_RANK = "xl_rank";
374 
378  inline const std::string OPENPEPXL_XL_MOD = "xl_mod";
379 
383  inline const std::string OPENPEPXL_XL_MASS = "xl_mass";
384 
388  inline const std::string OPENPEPXL_XL_TERM_SPEC_ALPHA = "xl_term_spec_alpha";
389 
393  inline const std::string OPENPEPXL_XL_TERM_SPEC_BETA = "xl_term_spec_beta";
394 
398  inline const std::string OPENPEPXL_HEAVY_SPEC_RT = "spec_heavy_RT";
399 
403  inline const std::string OPENPEPXL_HEAVY_SPEC_MZ = "spec_heavy_MZ";
404 
408  inline const std::string OPENPEPXL_HEAVY_SPEC_REF = "spectrum_reference_heavy";
409 
413  inline const std::string OPENPEPXL_TARGET_DECOY_ALPHA = "xl_target_decoy_alpha";
414 
418  inline const std::string OPENPEPXL_TARGET_DECOY_BETA = "xl_target_decoy_beta";
419 
423  inline const std::string OPENPEPXL_BETA_PEPEV_PRE = "BetaPepEv:pre";
424 
428  inline const std::string OPENPEPXL_BETA_PEPEV_POST = "BetaPepEv:post";
429 
433  inline const std::string OPENPEPXL_BETA_PEPEV_START = "BetaPepEv:start";
434 
438  inline const std::string OPENPEPXL_BETA_PEPEV_END = "BetaPepEv:end";
439 
443 
448  inline const std::string SIRIUS_MZ = "mz";
449 
453  inline const std::string SIRIUS_EXACTMASS = "exact_mass";
454 
458  inline const std::string SIRIUS_EXPLANATION = "explanation";
459 
463  inline const std::string SIRIUS_SCORE = "score";
464 
468  inline const std::string SIRIUS_PEAKMZ = "peak_mz";
469 
473  inline const std::string SIRIUS_ANNOTATED_SUMFORMULA = "annotated_sumformula";
474 
478  inline const std::string SIRIUS_ANNOTATED_ADDUCT = "annotated_adduct";
479 
483  inline const std::string SIRIUS_DECOY = "decoy";
484 
488  inline const std::string SIRIUS_FEATURE_ID = "feat_id";
489 
491 
495  inline const std::string XFDR_FDR = "XFDR:FDR";
496 
500  inline const std::string IIMN_BEST_ION = "best ion";
501 
506  inline const std::string IIMN_ADDUCT_PARTNERS = "partners";
507 
511  inline const std::string IIMN_ROW_ID = "row ID";
512 
516  inline const std::string IIMN_ANNOTATION_NETWORK_NUMBER = "annotation network number";
517 
521  inline const std::string ADDUCT_GROUP = "Group";
522 
526  inline const std::string IIMN_LINKED_GROUPS = "LinkedGroups";
527 
531  inline const std::string DC_CHARGE_ADDUCTS = "dc_charge_adducts";
532 
536  inline const std::string NUM_OF_MASSTRACES = "num_of_masstraces";
537 
541  inline const std::string NUM_OF_DATAPOINTS = "num_of_datapoints";
542 
543  }
544 
546  }
547 }
OpenMS::Constants::ELEMENTARY_CHARGE
const double ELEMENTARY_CHARGE
Definition: Constants.h:93
OpenMS::Constants::UserParam::MATCHED_SUFFIX_IONS_FRACTION
const std::string MATCHED_SUFFIX_IONS_FRACTION
Definition: Constants.h:307
OpenMS::Constants::VACUUM_PERMEABILITY
const double VACUUM_PERMEABILITY
Definition: Constants.h:200
OpenMS::Constants::UserParam::OPENPEPXL_HEAVY_SPEC_REF
const std::string OPENPEPXL_HEAVY_SPEC_REF
Definition: Constants.h:408
OpenMS::Constants::UserParam::SIRIUS_ANNOTATED_SUMFORMULA
const std::string SIRIUS_ANNOTATED_SUMFORMULA
Definition: Constants.h:473
OpenMS::Constants::VACUUM_PERMITTIVITY
const double VACUUM_PERMITTIVITY
Definition: Constants.h:195
OpenMS::Constants::UserParam::SIRIUS_ANNOTATED_ADDUCT
const std::string SIRIUS_ANNOTATED_ADDUCT
Definition: Constants.h:478
OpenMS::Constants::SPEED_OF_LIGHT
const double SPEED_OF_LIGHT
Definition: Constants.h:205
OpenMS::Constants::UserParam::FRAGMENT_ANNOTATION_USERPARAM
const std::string FRAGMENT_ANNOTATION_USERPARAM
Definition: Constants.h:296
OpenMS::Constants::a0
const double a0
Definition: Constants.h:187
OpenMS::Constants::BOLTZMANN
const double BOLTZMANN
Definition: Constants.h:149
OpenMS::Constants::UserParam::PRECURSOR_ERROR_PPM_USERPARAM
const std::string PRECURSOR_ERROR_PPM_USERPARAM
Definition: Constants.h:275
OpenMS::Constants::UserParam::SIRIUS_SCORE
const std::string SIRIUS_SCORE
Definition: Constants.h:463
OpenMS::Constants::e0
const double e0
Elementary charge (alias)
Definition: Constants.h:96
OpenMS::Constants::UserParam::OPENPEPXL_XL_MOD
const std::string OPENPEPXL_XL_MOD
Definition: Constants.h:378
OpenMS::Constants::UserParam::SIRIUS_MZ
const std::string SIRIUS_MZ
Definition: Constants.h:448
OpenMS::Constants::k
const double k
Definition: Constants.h:153
OpenMS::Constants::GRAVITATIONAL_CONSTANT
const double GRAVITATIONAL_CONSTANT
Definition: Constants.h:214
OpenMS::Constants::UserParam::SIRIUS_EXACTMASS
const std::string SIRIUS_EXACTMASS
Definition: Constants.h:453
OpenMS::Constants::UserParam::IIMN_BEST_ION
const std::string IIMN_BEST_ION
Definition: Constants.h:500
OpenMS::Constants::c
const double c
Definition: Constants.h:209
OpenMS::Constants::MOL
const double MOL
Definition: Constants.h:144
OpenMS::Constants::UserParam::OPENPEPXL_XL_POS2_PROT
const std::string OPENPEPXL_XL_POS2_PROT
Definition: Constants.h:363
OpenMS::Constants::UserParam::PSM_EXPLAINED_ION_CURRENT_USERPARAM
const std::string PSM_EXPLAINED_ION_CURRENT_USERPARAM
Definition: Constants.h:301
OpenMS::Constants::R
const double R
Definition: Constants.h:170
OpenMS::Constants::UserParam::NUM_OF_DATAPOINTS
const std::string NUM_OF_DATAPOINTS
Definition: Constants.h:541
OpenMS::Constants::UserParam::OPENPEPXL_SCORE
const std::string OPENPEPXL_SCORE
Definition: Constants.h:333
OpenMS::Constants::AVOGADRO
const double AVOGADRO
Definition: Constants.h:136
OpenMS::Constants::F
const double F
Definition: Constants.h:178
OpenMS::Constants::BOHR_RADIUS
const double BOHR_RADIUS
Definition: Constants.h:183
OpenMS::Constants::PROTON_MASS_U
const double PROTON_MASS_U
Definition: Constants.h:116
OpenMS::Constants::UserParam::OPENPEPXL_TARGET_DECOY_BETA
const std::string OPENPEPXL_TARGET_DECOY_BETA
Definition: Constants.h:418
OpenMS::Constants::JOULE_PER_CAL
const double JOULE_PER_CAL
Definition: Constants.h:249
OpenMS::Constants::UserParam::OPENPEPXL_HEAVY_SPEC_MZ
const std::string OPENPEPXL_HEAVY_SPEC_MZ
Definition: Constants.h:403
OpenMS::Constants::UserParam::OPENPEPXL_BETA_PEPEV_POST
const std::string OPENPEPXL_BETA_PEPEV_POST
Definition: Constants.h:428
OpenMS::Constants::UserParam::SIRIUS_PEAKMZ
const std::string SIRIUS_PEAKMZ
Definition: Constants.h:468
OpenMS::Constants::M_PER_FOOT
const double M_PER_FOOT
Definition: Constants.h:244
OpenMS::Constants::PLANCK
const double PLANCK
Definition: Constants.h:158
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
OpenMS::Constants::UserParam::OPENPEPXL_HEAVY_SPEC_RT
const std::string OPENPEPXL_HEAVY_SPEC_RT
Definition: Constants.h:398
OpenMS::Constants::FARADAY
const double FARADAY
Definition: Constants.h:174
OpenMS::Constants::EPSILON
double EPSILON
Definition: Constants.h:83
OpenMS::Constants::UserParam::SPECTRUM_REFERENCE
const std::string SPECTRUM_REFERENCE
Definition: Constants.h:312
OpenMS::Constants::UserParam::CONCAT_PEPTIDE
const std::string CONCAT_PEPTIDE
Definition: Constants.h:261
OpenMS::Constants::UserParam::FRAGMENT_ERROR_PPM_USERPARAM
const std::string FRAGMENT_ERROR_PPM_USERPARAM
Definition: Constants.h:286
OpenMS::Constants::PROTON_MASS
const double PROTON_MASS
Definition: Constants.h:111
OpenMS::Constants::UserParam::OPENPEPXL_XL_TYPE
const std::string OPENPEPXL_XL_TYPE
Definition: Constants.h:368
OpenMS::Constants::DEG_PER_RAD
const double DEG_PER_RAD
Definition: Constants.h:229
OpenMS::Constants::UserParam::MATCHED_PREFIX_IONS_FRACTION
const std::string MATCHED_PREFIX_IONS_FRACTION
Definition: Constants.h:304
OpenMS::Constants::UserParam::OPENPEPXL_XL_TERM_SPEC_ALPHA
const std::string OPENPEPXL_XL_TERM_SPEC_ALPHA
Definition: Constants.h:388
OpenMS::Constants::FINE_STRUCTURE_CONSTANT
const double FINE_STRUCTURE_CONSTANT
Definition: Constants.h:219
OpenMS::Constants::UserParam::MERGED_CHROMATOGRAM_MZS
const std::string MERGED_CHROMATOGRAM_MZS
Definition: Constants.h:270
OpenMS::Constants::UserParam::IIMN_ADDUCT_PARTNERS
const std::string IIMN_ADDUCT_PARTNERS
Definition: Constants.h:506
OpenMS::Constants::UserParam::OPENPEPXL_XL_RANK
const std::string OPENPEPXL_XL_RANK
Definition: Constants.h:373
OpenMS::Constants::UserParam::DELTA_SCORE
const std::string DELTA_SCORE
Definition: Constants.h:322
OpenMS::Constants::UserParam::OPENPEPXL_BETA_PEPEV_START
const std::string OPENPEPXL_BETA_PEPEV_START
Definition: Constants.h:433
OpenMS::Constants::UserParam::ADDUCT_GROUP
const std::string ADDUCT_GROUP
Definition: Constants.h:521
OpenMS::Constants::ELECTRON_MASS
const double ELECTRON_MASS
Definition: Constants.h:101
OpenMS::Constants::UserParam::TARGET_DECOY
const std::string TARGET_DECOY
Definition: Constants.h:317
OpenMS::Constants::ELECTRON_MASS_U
const double ELECTRON_MASS_U
Definition: Constants.h:106
OpenMS::Constants::UserParam::OPENPEPXL_BETA_SEQUENCE
const std::string OPENPEPXL_BETA_SEQUENCE
Definition: Constants.h:338
OpenMS::Constants::UserParam::OPENPEPXL_XL_MASS
const std::string OPENPEPXL_XL_MASS
Definition: Constants.h:383
OpenMS::Constants::UserParam::OPENPEPXL_BETA_PEPEV_PRE
const std::string OPENPEPXL_BETA_PEPEV_PRE
Definition: Constants.h:423
OpenMS::Constants::PI
const double PI
PI.
Definition: Constants.h:75
OpenMS::Constants::UserParam::IIMN_ANNOTATION_NETWORK_NUMBER
const std::string IIMN_ANNOTATION_NETWORK_NUMBER
Definition: Constants.h:516
OpenMS::Constants::h
const double h
Definition: Constants.h:162
OpenMS::Constants::UserParam::SIRIUS_EXPLANATION
const std::string SIRIUS_EXPLANATION
Definition: Constants.h:458
OpenMS::Constants::UserParam::ISOTOPE_ERROR
const std::string ISOTOPE_ERROR
Definition: Constants.h:327
OpenMS::Constants::NA
const double NA
Definition: Constants.h:140
OpenMS::Constants::UserParam::OPENPEPXL_XL_TERM_SPEC_BETA
const std::string OPENPEPXL_XL_TERM_SPEC_BETA
Definition: Constants.h:393
OpenMS::Constants::UserParam::XFDR_FDR
const std::string XFDR_FDR
Definition: Constants.h:495
OpenMS::Constants::CAL_PER_JOULE
const double CAL_PER_JOULE
Definition: Constants.h:254
OpenMS::Constants::UserParam::NUM_OF_MASSTRACES
const std::string NUM_OF_MASSTRACES
Definition: Constants.h:536
OpenMS::Constants::UserParam::OPENPEPXL_BETA_ACCESSIONS
const std::string OPENPEPXL_BETA_ACCESSIONS
Definition: Constants.h:343
OpenMS::Constants::NEUTRON_MASS
const double NEUTRON_MASS
Definition: Constants.h:126
OpenMS::Constants::UserParam::OPENPEPXL_BETA_PEPEV_END
const std::string OPENPEPXL_BETA_PEPEV_END
Definition: Constants.h:438
OpenMS::Constants::UserParam::FRAGMENT_ERROR_DA_USERPARAM
const std::string FRAGMENT_ERROR_DA_USERPARAM
Definition: Constants.h:291
OpenMS::Constants::UserParam::OPENPEPXL_XL_POS2
const std::string OPENPEPXL_XL_POS2
Definition: Constants.h:353
OpenMS::Constants::UserParam::SIRIUS_FEATURE_ID
const std::string SIRIUS_FEATURE_ID
Definition: Constants.h:488
OpenMS::Constants::UserParam::OPENPEPXL_XL_POS1_PROT
const std::string OPENPEPXL_XL_POS1_PROT
Definition: Constants.h:358
OpenMS::Constants::NEUTRON_MASS_U
const double NEUTRON_MASS_U
Definition: Constants.h:131
OpenMS::Constants::C13C12_MASSDIFF_U
const double C13C12_MASSDIFF_U
Definition: Constants.h:121
OpenMS::Constants::MM_PER_INCH
const double MM_PER_INCH
Definition: Constants.h:239
OpenMS::Constants::UserParam::SIRIUS_DECOY
const std::string SIRIUS_DECOY
Definition: Constants.h:483
OpenMS::Constants::UserParam::IIMN_ROW_ID
const std::string IIMN_ROW_ID
Definition: Constants.h:511
OpenMS::Constants::GAS_CONSTANT
const double GAS_CONSTANT
Definition: Constants.h:166
OpenMS::Constants::UserParam::OPENPEPXL_TARGET_DECOY_ALPHA
const std::string OPENPEPXL_TARGET_DECOY_ALPHA
Definition: Constants.h:413
OpenMS::Constants::UserParam::LOCALIZED_MODIFICATIONS_USERPARAM
const std::string LOCALIZED_MODIFICATIONS_USERPARAM
Definition: Constants.h:265
OpenMS::Constants::UserParam::FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM
const std::string FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM
Definition: Constants.h:280
OpenMS::Constants::RAD_PER_DEG
const double RAD_PER_DEG
Definition: Constants.h:234
OpenMS::Constants::E
const double E
Euler's number - base of the natural logarithm.
Definition: Constants.h:78
OpenMS::Constants::UserParam::IIMN_LINKED_GROUPS
const std::string IIMN_LINKED_GROUPS
Definition: Constants.h:526
OpenMS::Constants::UserParam::DC_CHARGE_ADDUCTS
const std::string DC_CHARGE_ADDUCTS
Definition: Constants.h:531
OpenMS::Constants::UserParam::OPENPEPXL_XL_POS1
const std::string OPENPEPXL_XL_POS1
Definition: Constants.h:348