8 #ifndef IMPATOM_ELEMENT_H
9 #define IMPATOM_ELEMENT_H
11 #include <IMP/atom/atom_config.h>
16 #include <boost/unordered_map.hpp>
20 IMPATOM_BEGIN_NAMESPACE
137 NUMBER_OF_ELEMENTS = 107
142 inline size_t hash_value(
Element e) {
return e; }
151 Element get_element(
const std::string& s)
const;
154 std::string get_name(
Element e)
const;
160 struct ElementString {
165 static ElementString element_strings_[];
166 static Float mass_[];
167 static boost::unordered_map<std::string, Element> string_2_element_;
168 static boost::unordered_map<Element, std::string> element_2_string_;
171 IMPATOMEXPORT ElementTable& get_element_table();
173 IMPATOM_END_NAMESPACE
Import IMP/kernel/base_types.h in the namespace.
Exception definitions and assertions.
Float get_mass(Element e) const
get mass for Element
double Float
Basic floating-point value (could be float, double...)
Logging and error reporting support.
Element
The various elements currently supported/known.