43 #include <unordered_map> 82 const std::unordered_map<std::string, const Element*>& getNames()
const;
85 const std::unordered_map<std::string, const Element*>& getSymbols()
const;
88 const std::unordered_map<unsigned int, const Element*>& getAtomicNumbers()
const;
94 const Element* getElement(
const std::string& name)
const;
97 const Element* getElement(
unsigned int atomic_number)
const;
111 void addElement(
const std::string& name,
112 const std::string& symbol,
113 const unsigned int an,
114 const std::map<unsigned int, double>& abundance,
115 const std::map<unsigned int, double>& mass,
116 bool replace_existing);
122 bool hasElement(
const std::string& name)
const;
126 bool hasElement(
unsigned int atomic_number)
const;
134 IsotopeDistribution parseIsotopeDistribution_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
138 double calculateAvgWeight_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
142 double calculateMonoWeight_(
const std::map<unsigned int, double>& abundance,
const std::map<unsigned int, double>& mass);
145 void storeElements_();
148 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);
151 void addElementToMaps_(
const std::string& name,
const std::string& symbol,
const unsigned int an, std::unique_ptr<const Element> e);
154 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);
160 std::unordered_map<std::string, const Element*>
names_;
162 std::unordered_map<std::string, const Element*>
symbols_;
std::unordered_map< std::string, const Element * > symbols_
Definition: ElementDB.h:162
std::unordered_map< std::string, const Element * > names_
Definition: ElementDB.h:160
Definition: IsotopeDistribution.h:64
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
std::unordered_map< unsigned int, const Element * > atomic_numbers_
Definition: ElementDB.h:164
Representation of an element.
Definition: Element.h:57
Singleton that stores elements and isotopes.
Definition: ElementDB.h:70