OpenMS  2.7.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-2021.
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  inline const std::string XFDR_FDR = "XFDR:FDR";
444  }
445 
447  }
448 }
const std::string TARGET_DECOY
Definition: Constants.h:317
const std::string MATCHED_PREFIX_IONS_FRACTION
Definition: Constants.h:304
const std::string OPENPEPXL_XL_POS2
Definition: Constants.h:353
const std::string OPENPEPXL_HEAVY_SPEC_RT
Definition: Constants.h:398
const std::string OPENPEPXL_BETA_PEPEV_PRE
Definition: Constants.h:423
const std::string OPENPEPXL_XL_POS2_PROT
Definition: Constants.h:363
const std::string OPENPEPXL_HEAVY_SPEC_REF
Definition: Constants.h:408
const std::string OPENPEPXL_BETA_SEQUENCE
Definition: Constants.h:338
const std::string DELTA_SCORE
Definition: Constants.h:322
const std::string ISOTOPE_ERROR
Definition: Constants.h:327
const std::string OPENPEPXL_SCORE
Definition: Constants.h:333
const std::string SPECTRUM_REFERENCE
Definition: Constants.h:312
const std::string MATCHED_SUFFIX_IONS_FRACTION
Definition: Constants.h:307
const std::string PRECURSOR_ERROR_PPM_USERPARAM
Definition: Constants.h:275
const std::string OPENPEPXL_XL_TYPE
Definition: Constants.h:368
const std::string OPENPEPXL_XL_TERM_SPEC_BETA
Definition: Constants.h:393
const std::string OPENPEPXL_XL_RANK
Definition: Constants.h:373
const std::string OPENPEPXL_XL_MASS
Definition: Constants.h:383
const std::string OPENPEPXL_BETA_PEPEV_POST
Definition: Constants.h:428
const std::string OPENPEPXL_BETA_PEPEV_END
Definition: Constants.h:438
const std::string FRAGMENT_ANNOTATION_USERPARAM
Definition: Constants.h:296
const std::string FRAGMENT_ERROR_DA_USERPARAM
Definition: Constants.h:291
const std::string FRAGMENT_ERROR_MEDIAN_PPM_USERPARAM
Definition: Constants.h:280
const std::string OPENPEPXL_XL_TERM_SPEC_ALPHA
Definition: Constants.h:388
const std::string OPENPEPXL_TARGET_DECOY_ALPHA
Definition: Constants.h:413
const std::string FRAGMENT_ERROR_PPM_USERPARAM
Definition: Constants.h:286
const std::string OPENPEPXL_TARGET_DECOY_BETA
Definition: Constants.h:418
const std::string OPENPEPXL_XL_POS1_PROT
Definition: Constants.h:358
const std::string MERGED_CHROMATOGRAM_MZS
Definition: Constants.h:270
const std::string OPENPEPXL_HEAVY_SPEC_MZ
Definition: Constants.h:403
const std::string CONCAT_PEPTIDE
Definition: Constants.h:261
const std::string OPENPEPXL_XL_POS1
Definition: Constants.h:348
const std::string OPENPEPXL_BETA_PEPEV_START
Definition: Constants.h:433
const std::string LOCALIZED_MODIFICATIONS_USERPARAM
Definition: Constants.h:265
const std::string XFDR_FDR
Definition: Constants.h:443
const std::string OPENPEPXL_XL_MOD
Definition: Constants.h:378
const std::string OPENPEPXL_BETA_ACCESSIONS
Definition: Constants.h:343
const std::string PSM_EXPLAINED_ION_CURRENT_USERPARAM
Definition: Constants.h:301
const double R
Definition: Constants.h:170
const double NEUTRON_MASS
Definition: Constants.h:126
const double ELECTRON_MASS
Definition: Constants.h:101
const double CAL_PER_JOULE
Definition: Constants.h:254
const double MOL
Definition: Constants.h:144
double EPSILON
Definition: Constants.h:83
const double F
Definition: Constants.h:178
const double e0
Elementary charge (alias)
Definition: Constants.h:96
const double VACUUM_PERMITTIVITY
Definition: Constants.h:195
const double AVOGADRO
Definition: Constants.h:136
const double PROTON_MASS
Definition: Constants.h:111
const double DEG_PER_RAD
Definition: Constants.h:229
const double GAS_CONSTANT
Definition: Constants.h:166
const double PROTON_MASS_U
Definition: Constants.h:116
const double GRAVITATIONAL_CONSTANT
Definition: Constants.h:214
const double c
Definition: Constants.h:209
const double k
Definition: Constants.h:153
const double PI
PI.
Definition: Constants.h:75
const double NEUTRON_MASS_U
Definition: Constants.h:131
const double JOULE_PER_CAL
Definition: Constants.h:249
const double M_PER_FOOT
Definition: Constants.h:244
const double h
Definition: Constants.h:162
const double ELEMENTARY_CHARGE
Definition: Constants.h:93
const double SPEED_OF_LIGHT
Definition: Constants.h:205
const double VACUUM_PERMEABILITY
Definition: Constants.h:200
const double E
Euler's number - base of the natural logarithm.
Definition: Constants.h:78
const double FARADAY
Definition: Constants.h:174
const double BOHR_RADIUS
Definition: Constants.h:183
const double a0
Definition: Constants.h:187
const double C13C12_MASSDIFF_U
Definition: Constants.h:121
const double MM_PER_INCH
Definition: Constants.h:239
const double FINE_STRUCTURE_CONSTANT
Definition: Constants.h:219
const double RAD_PER_DEG
Definition: Constants.h:234
const double BOLTZMANN
Definition: Constants.h:149
const double ELECTRON_MASS_U
Definition: Constants.h:106
const double NA
Definition: Constants.h:140
const double PLANCK
Definition: Constants.h:158
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47