OpenMS
IsotopeModel.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Timo Sachsenberg $
6 // $Authors: Clemens Groepl, Chris Bielow $
7 // --------------------------------------------------------------------------
8 
9 
10 #pragma once
11 
14 
15 namespace OpenMS
16 {
17  class EmpiricalFormula;
18 
32  class OPENMS_DLLAPI IsotopeModel :
33  public InterpolationModel
34  {
35 
36 public:
39 
40  enum Averagines {C = 0, H, N, O, S, AVERAGINE_NUM};
41 
44 
46  IsotopeModel(const IsotopeModel & source);
47 
49  ~IsotopeModel() override;
50 
52  virtual IsotopeModel & operator=(const IsotopeModel & source);
53 
54  UInt getCharge() const;
55 
57  static BaseModel<1> * create()
58  {
59  return new IsotopeModel();
60  }
61 
63  static const String getProductName()
64  {
65  return "IsotopeModel";
66  }
67 
75  void setOffset(CoordinateType offset) override;
76 
78 
81 
83  virtual void setSamples(const EmpiricalFormula & formula);
84 
87 
92  CoordinateType getCenter() const override;
93 
100 
101 
102 protected:
105 
109  double averagine_[AVERAGINE_NUM];
114 
115  void updateMembers_() override;
116 
117  };
118 }
119 
Representation of an empirical formula.
Definition: EmpiricalFormula.h:59
Abstract class for 1D-models that are approximated using linear interpolation.
Definition: InterpolationModel.h:30
double CoordinateType
Definition: InterpolationModel.h:35
virtual void setSamples()
set sample/supporting points of interpolation wrt params.
Definition: InterpolationModel.h:136
Definition: IsotopeDistribution.h:39
Isotope distribution approximated using linear interpolation.
Definition: IsotopeModel.h:34
UInt charge_
Definition: IsotopeModel.h:106
CoordinateType isotope_stdev_
Definition: IsotopeModel.h:103
EmpiricalFormula getFormula()
return the Averagine peptide formula (mass calculated from mean mass and charge – use ....
IsotopeDistribution isotope_distribution_
Definition: IsotopeModel.h:113
virtual IsotopeModel & operator=(const IsotopeModel &source)
assignment operator
CoordinateType monoisotopic_mz_
Definition: IsotopeModel.h:108
void setOffset(CoordinateType offset) override
set the offset of the model
double isotope_distance_
Definition: IsotopeModel.h:112
IsotopeModel(const IsotopeModel &source)
copy constructor
InterpolationModel::CoordinateType CoordinateType
Definition: IsotopeModel.h:37
CoordinateType isotope_lorentz_fwhm_
Definition: IsotopeModel.h:104
virtual void setSamples(const EmpiricalFormula &formula)
set sample/supporting points of interpolation
InterpolationModel::CoordinateType IntensityType
Definition: IsotopeModel.h:38
~IsotopeModel() override
destructor
const IsotopeDistribution & getIsotopeDistribution() const
the Isotope distribution (without widening) from the last setSamples() call
CoordinateType getCenter() const override
get the center of the Isotope model
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
static BaseModel< 1 > * create()
create new IsotopeModel object (needed by Factory)
Definition: IsotopeModel.h:57
UInt getCharge() const
Averagines
Definition: IsotopeModel.h:40
double trim_right_cutoff_
Definition: IsotopeModel.h:111
Int max_isotope_
Definition: IsotopeModel.h:110
IsotopeModel()
Default constructor.
static const String getProductName()
name of the model (needed by Factory)
Definition: IsotopeModel.h:63
CoordinateType mean_
Definition: IsotopeModel.h:107
CoordinateType getOffset()
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:76
unsigned int UInt
Unsigned integer type.
Definition: Types.h:68
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22