libpappsomspp
Library for mass spectrometry
pappso::Ion Class Referenceabstract

#include <ion.h>

Inheritance diagram for pappso::Ion:
pappso::PeptideInterface pappso::Peptide pappso::PeptideFragment pappso::PeptideFragmentIon pappso::PeptideNaturalIsotope

Public Member Functions

 Ion ()
 
 ~Ion ()
 
virtual pappso_double getMass () const =0
 
virtual pappso_double getMz (unsigned int charge) const final
 

Detailed Description

Definition at line 39 of file ion.h.

Constructor & Destructor Documentation

◆ Ion()

pappso::Ion::Ion ( )

Definition at line 36 of file ion.cpp.

37 {
38 }

◆ ~Ion()

pappso::Ion::~Ion ( )

Definition at line 40 of file ion.cpp.

41 {
42 }

Member Function Documentation

◆ getMass()

virtual pappso_double pappso::Ion::getMass ( ) const
pure virtual

◆ getMz()

pappso_double pappso::Ion::getMz ( unsigned int  charge) const
finalvirtual

Definition at line 45 of file ion.cpp.

46 {
47  if(charge == 0)
48  {
49  throw PappsoException("charge == 0");
50  }
51  return ((getMass() + (MHPLUS * charge)) / charge);
52 }
virtual pappso_double getMass() const =0
const pappso_double MHPLUS(1.007276466879)

References getMass(), and pappso::MHPLUS().


The documentation for this class was generated from the following files: