OpenMS
Loading...
Searching...
No Matches
Element Class Reference

Representation of an element. More...

#include <OpenMS/CHEMISTRY/Element.h>

Collaboration diagram for Element:
[legend]

Public Member Functions

Constructor and Destructors
 Element ()
 default constructor
 
 Element (const Element &element)
 copy constructor
 
 Element (const std::string &name, const std::string &symbol, unsigned int atomic_number, double average_weight, double mono_weight, const IsotopeDistribution &isotopes)
 detailed constructor
 
virtual ~Element ()
 destructor
 
Accessors
void setAtomicNumber (unsigned int atomic_number)
 sets unique atomic number
 
unsigned int getAtomicNumber () const
 returns the unique atomic number
 
void setAverageWeight (double weight)
 sets the average weight of the element
 
double getAverageWeight () const
 returns the average weight of the element
 
void setMonoWeight (double weight)
 sets the mono isotopic weight of the element
 
double getMonoWeight () const
 returns the mono isotopic weight of the element
 
void setIsotopeDistribution (const IsotopeDistribution &isotopes)
 sets the isotope distribution of the element
 
const IsotopeDistributiongetIsotopeDistribution () const
 returns the isotope distribution of the element
 
void setName (const std::string &name)
 set the name of the element
 
const std::string & getName () const
 returns the name of the element
 
void setSymbol (const std::string &symbol)
 sets symbol of the element
 
const std::string & getSymbol () const
 returns symbol of the element
 
Assignment
Elementoperator= (const Element &element)
 assignment operator
 

Predicates

std::string name_
 name of the element
 
std::string symbol_
 symbol of the element
 
unsigned int atomic_number_
 atomic number of the element
 
double average_weight_
 average weight over all isotopes
 
double mono_weight_
 mono isotopic weight of the most frequent isotope
 
IsotopeDistribution isotopes_
 distribution of the isotopes (mass and natural frequency)
 
bool operator== (const Element &element) const
 equality operator
 
bool operator!= (const Element &element) const
 inequality operator
 
bool operator< (const Element &element) const
 less operator
 
std::ostream & operator<< (std::ostream &os, const Element &element)
 writes the element to an output stream
 

Detailed Description

Representation of an element.

This contains information on an element and its isotopes, including a common name, atomic symbol and mass/abundance of its isotopes.

Constructor & Destructor Documentation

◆ Element() [1/3]

Element ( )

default constructor

◆ Element() [2/3]

Element ( const Element element)

copy constructor

◆ Element() [3/3]

Element ( const std::string &  name,
const std::string &  symbol,
unsigned int  atomic_number,
double  average_weight,
double  mono_weight,
const IsotopeDistribution isotopes 
)

detailed constructor

◆ ~Element()

virtual ~Element ( )
virtual

destructor

Member Function Documentation

◆ getAtomicNumber()

unsigned int getAtomicNumber ( ) const

returns the unique atomic number

◆ getAverageWeight()

double getAverageWeight ( ) const

returns the average weight of the element

◆ getIsotopeDistribution()

const IsotopeDistribution & getIsotopeDistribution ( ) const

returns the isotope distribution of the element

◆ getMonoWeight()

double getMonoWeight ( ) const

returns the mono isotopic weight of the element

◆ getName()

const std::string & getName ( ) const

returns the name of the element

◆ getSymbol()

const std::string & getSymbol ( ) const

returns symbol of the element

◆ operator!=()

bool operator!= ( const Element element) const

inequality operator

◆ operator<()

bool operator< ( const Element element) const

less operator

◆ operator=()

Element & operator= ( const Element element)

assignment operator

◆ operator==()

bool operator== ( const Element element) const

equality operator

◆ setAtomicNumber()

void setAtomicNumber ( unsigned int  atomic_number)

sets unique atomic number

◆ setAverageWeight()

void setAverageWeight ( double  weight)

sets the average weight of the element

◆ setIsotopeDistribution()

void setIsotopeDistribution ( const IsotopeDistribution isotopes)

sets the isotope distribution of the element

◆ setMonoWeight()

void setMonoWeight ( double  weight)

sets the mono isotopic weight of the element

◆ setName()

void setName ( const std::string &  name)

set the name of the element

◆ setSymbol()

void setSymbol ( const std::string &  symbol)

sets symbol of the element

Friends And Related Symbol Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  os,
const Element element 
)
friend

writes the element to an output stream

Member Data Documentation

◆ atomic_number_

unsigned int atomic_number_
protected

atomic number of the element

◆ average_weight_

double average_weight_
protected

average weight over all isotopes

◆ isotopes_

IsotopeDistribution isotopes_
protected

distribution of the isotopes (mass and natural frequency)

◆ mono_weight_

double mono_weight_
protected

mono isotopic weight of the most frequent isotope

◆ name_

std::string name_
protected

name of the element

◆ symbol_

std::string symbol_
protected

symbol of the element