42 #include <unordered_map> 81 const std::unordered_map<std::string, const Element*>& getNames()
const;
84 const std::unordered_map<std::string, const Element*>& getSymbols()
const;
87 const std::unordered_map<unsigned int, const Element*>& getAtomicNumbers()
const;
93 const Element* getElement(
const std::string& name)
const;
96 const Element* getElement(
unsigned int atomic_number)
const;
110 void addElement(
const std::string& name,
111 const std::string& symbol,
112 const unsigned int an,
113 const std::map<unsigned int, double>& abundance,
114 const std::map<unsigned int, double>& mass,
115 bool replace_existing);
121 bool hasElement(
const std::string& name)
const;
125 bool hasElement(
unsigned int atomic_number)
const;
133 IsotopeDistribution parseIsotopeDistribution_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
137 double calculateAvgWeight_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
141 double calculateMonoWeight_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
144 void storeElements_();
147 void buildElement_(
const std::string& name,
const std::string& symbol,
const unsigned int an,
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
150 void addElementToMaps_(
const std::string& name,
const std::string& symbol,
const unsigned int an,
const Element* e);
153 void storeIsotopes_(
const std::string& name,
const std::string& symbol,
const unsigned int an,
const std::map<unsigned int, double>& Z_to_mass,
const IsotopeDistribution& isotopes);
159 std::unordered_map<std::string, const Element*>
names_;
161 std::unordered_map<std::string, const Element*>
symbols_;
std::unordered_map< std::string, const Element * > symbols_
Definition: ElementDB.h:161
std::unordered_map< std::string, const Element * > names_
Definition: ElementDB.h:159
Definition: IsotopeDistribution.h:64
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::unordered_map< unsigned int, const Element * > atomic_numbers_
Definition: ElementDB.h:163
Representation of an element.
Definition: Element.h:57
Singleton that stores elements and isotopes.
Definition: ElementDB.h:69