Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
Public Types | Public Member Functions | Static Public Attributes | Private Attributes

IMSElement Class Reference

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

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

List of all members.

Public Types

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

Public Member Functions

 IMSElement ()
 Empty constructor.
 IMSElement (const IMSElement &element)
 Copy constructor.
 IMSElement (const name_type &name, const isotopes_type &isotopes)
 Constructor with name and isotope distribution.
 IMSElement (const name_type &name, mass_type mass)
 Constructor with name and mass of single isotope.
 IMSElement (const name_type &name, nominal_mass_type nominal_mass=0)
 Constructor with name and nominal mass.
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.

Static Public Attributes

static const mass_type ELECTRON_MASS_IN_U
 Mass of electron.

Private Attributes

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

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.Pervukhin@CeBiTec.Uni-Bielefeld.DE>

Member Typedef Documentation

Type of element's isotope distribution.

Type of isotope mass.

typedef std::string name_type

Type of element's name.

Type of distribution nominal mass.

Type of isotopes size.


Constructor & Destructor Documentation

IMSElement (  )  [inline]

Empty constructor.

IMSElement ( const IMSElement element  )  [inline]

Copy constructor.

IMSElement ( const name_type name,
const isotopes_type isotopes 
) [inline]

Constructor with name and isotope distribution.

IMSElement ( const name_type name,
mass_type  mass 
) [inline]

Constructor with name and mass of single isotope.

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

Constructor with name and nominal mass.

virtual ~IMSElement (  )  [inline, virtual]

Default destructor.


Member Function Documentation

mass_type getAverageMass (  )  const [inline]

Gets element's average mass.

Returns:
An average mass of element.
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_number Number of electrons lacking in ion.
const IMSIsotopeDistribution& getIsotopeDistribution (  )  const [inline]

Gets element's isotope distribution.

Returns:
Element's isotope distribution.
mass_type getMass ( size_type  index = 0  )  const [inline]

Gets mass of element's isotope index.

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

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

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.
nominal_mass_type getNominalMass (  )  const [inline]

Gets element's nominal mass.

Returns:
A nominal mass of element.
const name_type& getSequence (  )  const [inline]

Gets element's sequence.

Returns:
Sequence of element.
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.
IMSElement& operator= ( const IMSElement element  ) 

Assignment operator.

Parameters:
element Element to be assigned to this one.
Returns:
Reference to this object.
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
void setIsotopeDistribution ( const IMSIsotopeDistribution isotopes  )  [inline]

Sets element's isotope distribution.

Parameters:
isotopes A new isotope distribution to be set for element.
void setName ( const name_type name  )  [inline]

Sets element's name.

Note:
Name represents a symbol of element/atom in a periodical table.
Parameters:
name A new name to be set for element.
void setSequence ( const name_type sequence  )  [inline]

Sets element's sequence.

Parameters:
sequence A new sequence to be set for element.

Member Data Documentation

const mass_type ELECTRON_MASS_IN_U [static]

Mass of electron.

Element's isotope distribution.

name_type name_ [private]

Element's name.

name_type sequence_ [private]

Element's sequence.


OpenMS / TOPP release 1.10.0 Documentation generated on Thu Mar 7 2013 09:42:59 using doxygen 1.7.1