OpenMS
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-2023.
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 ISOTOPE_MASSDIFF_55K_U = 1.002371; // u
127 
131  inline const double NEUTRON_MASS = 1.6749286E-27; // kg
132 
136  inline const double NEUTRON_MASS_U = 1.00866491566; // u
137 
141  inline const double AVOGADRO = 6.0221367E+23; // 1 / mol
142 
145  inline const double NA = AVOGADRO;
146 
149  inline const double MOL = AVOGADRO;
150 
154  inline const double BOLTZMANN = 1.380657E-23; // J / K
155 
158  inline const double k = BOLTZMANN;
159 
163  inline const double PLANCK = 6.6260754E-34; // J * sec
164 
167  inline const double h = PLANCK;
168 
171  inline const double GAS_CONSTANT = NA * k;
172 
175  inline const double R = GAS_CONSTANT;
176 
179  inline const double FARADAY = NA * e0;
180 
183  inline const double F = FARADAY;
184 
188  inline const double BOHR_RADIUS = 5.29177249E-11; // m
189 
192  inline const double a0 = BOHR_RADIUS;
193 
194  // the following values from:
195  // P.W.Atkins: Physical Chemistry, 5th ed., Oxford University Press, 1995
196 
200  inline const double VACUUM_PERMITTIVITY = 8.85419E-12; // C^2 / (J * m)
201 
205  inline const double VACUUM_PERMEABILITY = (4 * PI * 1E-7); // J s^2 / (C^2 * m)
206 
210  inline const double SPEED_OF_LIGHT = 2.99792458E+8; // m / s
211 
214  inline const double c = SPEED_OF_LIGHT;
215 
219  inline const double GRAVITATIONAL_CONSTANT = 6.67259E-11; // N m^2 / kg^2
220 
224  inline const double FINE_STRUCTURE_CONSTANT = 7.29735E-3; // 1
226 
230 
234  inline const double DEG_PER_RAD = 57.2957795130823209;
235 
239  inline const double RAD_PER_DEG = 0.0174532925199432957;
240 
244  inline const double MM_PER_INCH = 25.4;
245 
249  inline const double M_PER_FOOT = 3.048;
250 
254  inline const double JOULE_PER_CAL = 4.184;
255 
259  inline const double CAL_PER_JOULE = (1 / 4.184);
260 
261  namespace UserParam
262  {
266  inline const std::string CONCAT_PEPTIDE = "concatenated_peptides";
267 
270  inline const std::string LOCALIZED_MODIFICATIONS_USERPARAM = "localized_modifications";
271 
275  inline const std::string MERGED_CHROMATOGRAM_MZS = "merged_chromatogram_mzs";
276 
280  inline const std::string PRECURSOR_ERROR_PPM_USERPARAM = "precursor_mz_error_ppm";
281 
285  inline const std::string FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM = "fragment_mz_error_median_ppm";
286 
287 
291  inline const std::string FRAGMENT_ERROR_PPM_USERPARAM = "fragment_mass_error_ppm";
292 
296  inline const std::string FRAGMENT_ERROR_DA_USERPARAM = "fragment_mass_error_da";
297 
301  inline const std::string FRAGMENT_ANNOTATION_USERPARAM = "fragment_annotation";
302 
306  inline const std::string PSM_EXPLAINED_ION_CURRENT_USERPARAM = "PSM_explained_ion_current";
307 
308  // User parameter name for the fraction of prefix ions that have been matched
309  inline const std::string MATCHED_PREFIX_IONS_FRACTION = "matched_prefix_ions_fraction";
310 
311  // User parameter name for the fraction of suffix ions that have been matched
312  inline const std::string MATCHED_SUFFIX_IONS_FRACTION = "matched_suffix_ions_fraction";
313 
317  inline const std::string SPECTRUM_REFERENCE = "spectrum_reference";
318 
323  inline const std::string ID_MERGE_INDEX = "id_merge_index";
324 
328  inline const std::string TARGET_DECOY = "target_decoy";
329 
333  inline const std::string DELTA_SCORE = "delta_score";
334 
338  inline const std::string ISOTOPE_ERROR = "isotope_error";
339 
340  // Cross-Linking Mass Spectrometry user parameters
344  inline const std::string OPENPEPXL_SCORE = "OpenPepXL:score";
345 
349  inline const std::string OPENPEPXL_BETA_SEQUENCE = "sequence_beta";
350 
354  inline const std::string OPENPEPXL_BETA_ACCESSIONS = "accessions_beta";
355 
359  inline const std::string OPENPEPXL_XL_POS1 = "xl_pos1";
360 
364  inline const std::string OPENPEPXL_XL_POS2 = "xl_pos2";
365 
369  inline const std::string OPENPEPXL_XL_POS1_PROT = "xl_pos1_protein";
370 
374  inline const std::string OPENPEPXL_XL_POS2_PROT = "xl_pos2_protein";
375 
379  inline const std::string OPENPEPXL_XL_TYPE = "xl_type";
380 
384  inline const std::string OPENPEPXL_XL_RANK = "xl_rank";
385 
389  inline const std::string OPENPEPXL_XL_MOD = "xl_mod";
390 
394  inline const std::string OPENPEPXL_XL_MASS = "xl_mass";
395 
399  inline const std::string OPENPEPXL_XL_TERM_SPEC_ALPHA = "xl_term_spec_alpha";
400 
404  inline const std::string OPENPEPXL_XL_TERM_SPEC_BETA = "xl_term_spec_beta";
405 
409  inline const std::string OPENPEPXL_HEAVY_SPEC_RT = "spec_heavy_RT";
410 
414  inline const std::string OPENPEPXL_HEAVY_SPEC_MZ = "spec_heavy_MZ";
415 
419  inline const std::string OPENPEPXL_HEAVY_SPEC_REF = "spectrum_reference_heavy";
420 
424  inline const std::string OPENPEPXL_TARGET_DECOY_ALPHA = "xl_target_decoy_alpha";
425 
429  inline const std::string OPENPEPXL_TARGET_DECOY_BETA = "xl_target_decoy_beta";
430 
434  inline const std::string OPENPEPXL_BETA_PEPEV_PRE = "BetaPepEv:pre";
435 
439  inline const std::string OPENPEPXL_BETA_PEPEV_POST = "BetaPepEv:post";
440 
444  inline const std::string OPENPEPXL_BETA_PEPEV_START = "BetaPepEv:start";
445 
449  inline const std::string OPENPEPXL_BETA_PEPEV_END = "BetaPepEv:end";
450 
455 
459  inline const std::string SIRIUS_MZ = "mz";
460 
464  inline const std::string SIRIUS_EXACTMASS = "exact_mass";
465 
469  inline const std::string SIRIUS_EXPLANATION = "explanation";
470 
474  inline const std::string SIRIUS_SCORE = "score";
475 
479  inline const std::string SIRIUS_PEAKMZ = "peak_mz";
480 
484  inline const std::string SIRIUS_ANNOTATED_SUMFORMULA = "annotated_sumformula";
485 
489  inline const std::string SIRIUS_ANNOTATED_ADDUCT = "annotated_adduct";
490 
494  inline const std::string SIRIUS_DECOY = "decoy";
495 
499  inline const std::string SIRIUS_FEATURE_ID = "feat_id";
500 
502 
506  inline const std::string XFDR_FDR = "XFDR:FDR";
507 
511  inline const std::string IIMN_BEST_ION = "best ion";
512 
517  inline const std::string IIMN_ADDUCT_PARTNERS = "partners";
518 
522  inline const std::string IIMN_ROW_ID = "row ID";
523 
527  inline const std::string IIMN_ANNOTATION_NETWORK_NUMBER = "annotation network number";
528 
532  inline const std::string ADDUCT_GROUP = "Group";
533 
537  inline const std::string IIMN_LINKED_GROUPS = "LinkedGroups";
538 
542  inline const std::string DC_CHARGE_ADDUCTS = "dc_charge_adducts";
543 
547  inline const std::string NUM_OF_MASSTRACES = "num_of_masstraces";
548 
552  inline const std::string NUM_OF_DATAPOINTS = "num_of_datapoints";
553 
557  inline const std::string MSM_METABOLITE_NAME = "Metabolite_Name";
558 
562  inline const std::string MSM_INCHI_STRING = "Inchi_String";
563 
567  inline const std::string MSM_SMILES_STRING = "SMILES_String";
568 
572  inline const std::string MSM_PRECURSOR_ADDUCT = "Precursor_Ion";
573 
577  inline const std::string MSM_SUM_FORMULA = "Sum_Formula";
578  }
579 
581  }
582 }
const std::string TARGET_DECOY
Definition: Constants.h:328
const std::string SIRIUS_EXPLANATION
Definition: Constants.h:469
const std::string MATCHED_PREFIX_IONS_FRACTION
Definition: Constants.h:309
const std::string OPENPEPXL_XL_POS2
Definition: Constants.h:364
const std::string OPENPEPXL_HEAVY_SPEC_RT
Definition: Constants.h:409
const std::string SIRIUS_SCORE
Definition: Constants.h:474
const std::string OPENPEPXL_BETA_PEPEV_PRE
Definition: Constants.h:434
const std::string ADDUCT_GROUP
Definition: Constants.h:532
const std::string OPENPEPXL_XL_POS2_PROT
Definition: Constants.h:374
const std::string OPENPEPXL_HEAVY_SPEC_REF
Definition: Constants.h:419
const std::string OPENPEPXL_BETA_SEQUENCE
Definition: Constants.h:349
const std::string SIRIUS_DECOY
Definition: Constants.h:494
const std::string SIRIUS_EXACTMASS
Definition: Constants.h:464
const std::string DELTA_SCORE
Definition: Constants.h:333
const std::string ISOTOPE_ERROR
Definition: Constants.h:338
const std::string IIMN_LINKED_GROUPS
Definition: Constants.h:537
const std::string OPENPEPXL_SCORE
Definition: Constants.h:344
const std::string NUM_OF_DATAPOINTS
Definition: Constants.h:552
const std::string SPECTRUM_REFERENCE
Definition: Constants.h:317
const std::string DC_CHARGE_ADDUCTS
Definition: Constants.h:542
const std::string MATCHED_SUFFIX_IONS_FRACTION
Definition: Constants.h:312
const std::string PRECURSOR_ERROR_PPM_USERPARAM
Definition: Constants.h:280
const std::string MSM_SMILES_STRING
Definition: Constants.h:567
const std::string OPENPEPXL_XL_TYPE
Definition: Constants.h:379
const std::string SIRIUS_FEATURE_ID
Definition: Constants.h:499
const std::string OPENPEPXL_XL_TERM_SPEC_BETA
Definition: Constants.h:404
const std::string OPENPEPXL_XL_RANK
Definition: Constants.h:384
const std::string OPENPEPXL_XL_MASS
Definition: Constants.h:394
const std::string IIMN_BEST_ION
Definition: Constants.h:511
const std::string IIMN_ANNOTATION_NETWORK_NUMBER
Definition: Constants.h:527
const std::string OPENPEPXL_BETA_PEPEV_POST
Definition: Constants.h:439
const std::string SIRIUS_ANNOTATED_SUMFORMULA
Definition: Constants.h:484
const std::string OPENPEPXL_BETA_PEPEV_END
Definition: Constants.h:449
const std::string FRAGMENT_ANNOTATION_USERPARAM
Definition: Constants.h:301
const std::string FRAGMENT_ERROR_DA_USERPARAM
Definition: Constants.h:296
const std::string FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM
Definition: Constants.h:285
const std::string SIRIUS_ANNOTATED_ADDUCT
Definition: Constants.h:489
const std::string OPENPEPXL_XL_TERM_SPEC_ALPHA
Definition: Constants.h:399
const std::string ID_MERGE_INDEX
Definition: Constants.h:323
const std::string IIMN_ROW_ID
Definition: Constants.h:522
const std::string OPENPEPXL_TARGET_DECOY_ALPHA
Definition: Constants.h:424
const std::string FRAGMENT_ERROR_PPM_USERPARAM
Definition: Constants.h:291
const std::string OPENPEPXL_TARGET_DECOY_BETA
Definition: Constants.h:429
const std::string OPENPEPXL_XL_POS1_PROT
Definition: Constants.h:369
const std::string SIRIUS_PEAKMZ
Definition: Constants.h:479
const std::string MERGED_CHROMATOGRAM_MZS
Definition: Constants.h:275
const std::string OPENPEPXL_HEAVY_SPEC_MZ
Definition: Constants.h:414
const std::string SIRIUS_MZ
Definition: Constants.h:459
const std::string CONCAT_PEPTIDE
Definition: Constants.h:266
const std::string OPENPEPXL_XL_POS1
Definition: Constants.h:359
const std::string MSM_SUM_FORMULA
Definition: Constants.h:577
const std::string IIMN_ADDUCT_PARTNERS
Definition: Constants.h:517
const std::string OPENPEPXL_BETA_PEPEV_START
Definition: Constants.h:444
const std::string LOCALIZED_MODIFICATIONS_USERPARAM
Definition: Constants.h:270
const std::string MSM_INCHI_STRING
Definition: Constants.h:562
const std::string XFDR_FDR
Definition: Constants.h:506
const std::string MSM_PRECURSOR_ADDUCT
Definition: Constants.h:572
const std::string NUM_OF_MASSTRACES
Definition: Constants.h:547
const std::string OPENPEPXL_XL_MOD
Definition: Constants.h:389
const std::string OPENPEPXL_BETA_ACCESSIONS
Definition: Constants.h:354
const std::string MSM_METABOLITE_NAME
Definition: Constants.h:557
const std::string PSM_EXPLAINED_ION_CURRENT_USERPARAM
Definition: Constants.h:306
const double R
Definition: Constants.h:175
const double NEUTRON_MASS
Definition: Constants.h:131
const double ELECTRON_MASS
Definition: Constants.h:101
const double CAL_PER_JOULE
Definition: Constants.h:259
const double ISOTOPE_MASSDIFF_55K_U
Definition: Constants.h:126
const double MOL
Definition: Constants.h:149
double EPSILON
Definition: Constants.h:83
const double F
Definition: Constants.h:183
const double e0
Elementary charge (alias)
Definition: Constants.h:96
const double VACUUM_PERMITTIVITY
Definition: Constants.h:200
const double AVOGADRO
Definition: Constants.h:141
const double PROTON_MASS
Definition: Constants.h:111
const double DEG_PER_RAD
Definition: Constants.h:234
const double GAS_CONSTANT
Definition: Constants.h:171
const double PROTON_MASS_U
Definition: Constants.h:116
const double GRAVITATIONAL_CONSTANT
Definition: Constants.h:219
const double c
Definition: Constants.h:214
const double k
Definition: Constants.h:158
const double PI
PI.
Definition: Constants.h:75
const double NEUTRON_MASS_U
Definition: Constants.h:136
const double JOULE_PER_CAL
Definition: Constants.h:254
const double M_PER_FOOT
Definition: Constants.h:249
const double h
Definition: Constants.h:167
const double ELEMENTARY_CHARGE
Definition: Constants.h:93
const double SPEED_OF_LIGHT
Definition: Constants.h:210
const double VACUUM_PERMEABILITY
Definition: Constants.h:205
const double E
Euler's number - base of the natural logarithm.
Definition: Constants.h:78
const double FARADAY
Definition: Constants.h:179
const double BOHR_RADIUS
Definition: Constants.h:188
const double a0
Definition: Constants.h:192
const double C13C12_MASSDIFF_U
Definition: Constants.h:121
const double MM_PER_INCH
Definition: Constants.h:244
const double FINE_STRUCTURE_CONSTANT
Definition: Constants.h:224
const double RAD_PER_DEG
Definition: Constants.h:239
const double BOLTZMANN
Definition: Constants.h:154
const double ELECTRON_MASS_U
Definition: Constants.h:106
const double NA
Definition: Constants.h:145
const double PLANCK
Definition: Constants.h:163
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48