OpenMS  2.8.0
Public Types | Public Member Functions | Static Public Attributes | Private Attributes | List of all members
IMSElement Class Reference

Represents a chemical atom with name and isotope distribution. More...

#include <OpenMS/CHEMISTRY/MASSDECOMPOSITION/IMS/IMSElement.h>

Collaboration diagram for IMSElement:
[legend]

Public Types

typedef std::string name_type
 Type of element's name. More...
 
typedef IMSIsotopeDistribution isotopes_type
 Type of element's isotope distribution. More...
 
typedef isotopes_type::mass_type mass_type
 Type of isotope mass. More...
 
typedef isotopes_type::nominal_mass_type nominal_mass_type
 Type of distribution nominal mass. More...
 
typedef isotopes_type::size_type size_type
 Type of isotopes size. More...
 

Public Member Functions

 IMSElement ()
 Empty constructor. More...
 
 IMSElement (const IMSElement &element)
 Copy constructor. More...
 
 IMSElement (const name_type &name, const isotopes_type &isotopes)
 Constructor with name and isotope distribution. More...
 
 IMSElement (const name_type &name, mass_type mass)
 Constructor with name and mass of single isotope. More...
 
 IMSElement (const name_type &name, nominal_mass_type nominal_mass=0)
 Constructor with name and nominal mass. More...
 
const name_typegetName () const
 
void setName (const name_type &name)
 
const name_typegetSequence () const
 
void setSequence (const name_type &sequence)
 
nominal_mass_type getNominalMass () const
 
mass_type getMass (size_type index=0) const
 
mass_type getAverageMass () const
 
mass_type getIonMass (int electrons_number=1) const
 
const IMSIsotopeDistributiongetIsotopeDistribution () const
 
void setIsotopeDistribution (const IMSIsotopeDistribution &isotopes)
 
IMSElementoperator= (const IMSElement &element)
 
bool operator== (const IMSElement &element) const
 
bool operator!= (const IMSElement &element) const
 
virtual ~IMSElement ()
 Default destructor. More...
 

Static Public Attributes

static const mass_type ELECTRON_MASS_IN_U
 Mass of electron. More...
 

Private Attributes

name_type name_
 Element's name. More...
 
name_type sequence_
 Element's sequence. More...
 
isotopes_type isotopes_
 Element's isotope distribution. More...
 

Detailed Description

Represents a chemical atom with name and isotope distribution.

Simulates a chemical atom with name and isotope distribution and can be used as a base class for more complex structures that simulate non-trivial bio-chemical molecules. Element 's name represents the atom's symbol in a periodical table. Sequence is by default equal to name and introduced for more complex molecules.

Author
Anton Pervukhin Anton.nosp@m..Per.nosp@m.vukhi.nosp@m.n@Ce.nosp@m.BiTec.nosp@m..Uni.nosp@m.-Biel.nosp@m.efel.nosp@m.d.DE

Member Typedef Documentation

◆ isotopes_type

Type of element's isotope distribution.

◆ mass_type

Type of isotope mass.

◆ name_type

typedef std::string name_type

Type of element's name.

◆ nominal_mass_type

Type of distribution nominal mass.

◆ size_type

Type of isotopes size.

Constructor & Destructor Documentation

◆ IMSElement() [1/5]

IMSElement ( )
inline

Empty constructor.

◆ IMSElement() [2/5]

IMSElement ( const IMSElement element)
inline

Copy constructor.

◆ IMSElement() [3/5]

IMSElement ( const name_type name,
const isotopes_type isotopes 
)
inline

Constructor with name and isotope distribution.

◆ IMSElement() [4/5]

IMSElement ( const name_type name,
mass_type  mass 
)
inline

Constructor with name and mass of single isotope.

◆ IMSElement() [5/5]

IMSElement ( const name_type name,
nominal_mass_type  nominal_mass = 0 
)
inline

Constructor with name and nominal mass.

◆ ~IMSElement()

virtual ~IMSElement ( )
inlinevirtual

Default destructor.

Member Function Documentation

◆ getAverageMass()

mass_type getAverageMass ( ) const
inline

Gets element's average mass.

Returns
An average mass of element.

◆ getIonMass()

mass_type getIonMass ( int  electrons_number = 1) const
inline

Gets ion mass of element. By default ion lacks 1 electron, but this can be changed by setting other electrons_number.

Parameters
electrons_numberNumber of electrons lacking in ion.

◆ getIsotopeDistribution()

const IMSIsotopeDistribution& getIsotopeDistribution ( ) const
inline

Gets element's isotope distribution.

Returns
Element's isotope distribution.

◆ getMass()

mass_type getMass ( size_type  index = 0) const
inline

Gets mass of element's isotope index.

Parameters
indexIndex of element's isotope.
Returns
mass of element's isotope with a given index.

Referenced by IMSAlphabet::MassSortingCriteria_::operator()().

◆ getName()

const name_type& getName ( ) const
inline

Gets element's name.

Note
Name represents a symbol of element/atom in a periodical table.
Returns
Name of element.

◆ getNominalMass()

nominal_mass_type getNominalMass ( ) const
inline

Gets element's nominal mass.

Returns
A nominal mass of element.

◆ getSequence()

const name_type& getSequence ( ) const
inline

Gets element's sequence.

Returns
Sequence of element.

◆ operator!=()

bool operator!= ( const IMSElement element) const

Inequality operator. Returns true, if a given element is unequal to this one, false - otherwise.

Returns
true, if a given element is unequal to this one, false - otherwise.

◆ operator=()

IMSElement& operator= ( const IMSElement element)

Assignment operator.

Parameters
elementElement to be assigned to this one.
Returns
Reference to this object.

◆ operator==()

bool operator== ( const IMSElement element) const

Equality operator. Returns true, if a given element is equal to this one, false - otherwise.

Returns
true, if a given element is equal to this one, false - otherwise

◆ setIsotopeDistribution()

void setIsotopeDistribution ( const IMSIsotopeDistribution isotopes)
inline

Sets element's isotope distribution.

Parameters
isotopesA new isotope distribution to be set for element.

◆ setName()

void setName ( const name_type name)
inline

Sets element's name.

Note
Name represents a symbol of element/atom in a periodical table.
Parameters
nameA new name to be set for element.

◆ setSequence()

void setSequence ( const name_type sequence)
inline

Sets element's sequence.

Parameters
sequenceA new sequence to be set for element.

Member Data Documentation

◆ ELECTRON_MASS_IN_U

const mass_type ELECTRON_MASS_IN_U
static

Mass of electron.

◆ isotopes_

isotopes_type isotopes_
private

Element's isotope distribution.

◆ name_

name_type name_
private

Element's name.

◆ sequence_

name_type sequence_
private

Element's sequence.