![]() |
Rosetta Core
2014.35
|
A set of Bcl Elements. More...
#include <ElementSet.hh>
Public Member Functions | |
ElementSet () | |
virtual | ~ElementSet () |
Size | n_elements () const |
Number of elements in the set. More... | |
bool | contains_element_type (std::string const &element_symbol) const |
Check if there is an element_type associated with an element_symbol string. More... | |
Size | element_index (std::string const &element_symbol) const |
Lookup the element index by the element_symbol string. More... | |
ElementCOP | element (std::string const &element_symbol) const |
Lookup the element index by the element_symbol string. More... | |
ElementCOP | operator[] (Size const index) const |
Lookup an Element by 1-based indexing. More... | |
void | read_file (std::string const &filename) |
Load the ElementSet from a file. More... | |
Private Attributes | |
std::map< std::string, core::Size > | element_index_ |
element_index_ lookup map More... | |
utility::vector1< ElementOP > | elements_ |
a collection of Elements, More... | |
A set of Bcl Elements.
This class contains a vector of pointers each of which points to an Element and the vector index is looked up by an element_name string in a map.
core::chemical::ElementSet::ElementSet | ( | ) |
|
virtual |
bool core::chemical::ElementSet::contains_element_type | ( | std::string const & | element_symbol | ) | const |
Check if there is an element_type associated with an element_symbol string.
References element_index_.
ElementCOP core::chemical::ElementSet::element | ( | std::string const & | element_symbol | ) | const |
Lookup the element index by the element_symbol string.
References element_index(), and elements_.
Referenced by read_file().
Size core::chemical::ElementSet::element_index | ( | std::string const & | element_symbol | ) | const |
Lookup the element index by the element_symbol string.
References element_index_, and utility_exit_with_message.
Referenced by element().
|
inline |
Number of elements in the set.
References elements_.
ElementCOP core::chemical::ElementSet::operator[] | ( | Size const | index | ) | const |
void core::chemical::ElementSet::read_file | ( | std::string const & | filename | ) |
Load the ElementSet from a file.
Initialize an ElementSet from an external file "filename", and set parameters and properties for each Element. Refer to rosetta_database/chemical/elements/element_properties.txt for file format
References element(), element_index_, elements_, getline(), core::chemical::tr, and utility_exit_with_message.
|
private |
element_index_ lookup map
element_index_ allows lookup of the element by its symbol
Referenced by contains_element_type(), element_index(), and read_file().
|
private |
a collection of Elements,
Element has data of atom properties, and it can be looked up by element_index.
Referenced by element(), n_elements(), operator[](), and read_file().