|
Rosetta 3.5
|
#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... | |
| int | element_index (std::string const &element_symbol) const |
| Lookup the element index by the element_symbol string. More... | |
| Element const & | 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... | |
| void | print_all_types () |
| Print all of the symbols of all of the Elements in the set. Usefull for debuging. More... | |
Private Attributes | |
| std::map< std::string, int > | element_index_ |
| element_index_ lookup map More... | |
| utility::vector1< Element * > | elements_ |
| a collection of Elements, More... | |
A set of 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.
Definition at line 51 of file ElementSet.hh.
| core::chemical::ElementSet::ElementSet | ( | ) |
Definition at line 35 of file ElementSet.cc.
|
virtual |
Definition at line 41 of file ElementSet.cc.
|
inline |
Check if there is an element_type associated with an element_symbol string.
Definition at line 67 of file ElementSet.hh.
References element_index_.
|
inline |
Lookup the element index by the element_symbol string.
Definition at line 77 of file ElementSet.hh.
References element_index_.
|
inline |
Lookup an Element by 1-based indexing.
Definition at line 90 of file ElementSet.hh.
References elements_.
| void core::chemical::ElementSet::print_all_types | ( | ) |
Print all of the symbols of all of the Elements in the set. Usefull for debuging.
This function iterates over each element in the element_index_ map and prints both keys. It is only used for debugging.
Definition at line 100 of file ElementSet.cc.
References element_index_.
| 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 minirosetta_database_stock/chemical/element_properties.txt for file format
Definition at line 49 of file ElementSet.cc.
References element_index_, elements_, and core::chemical::tr().
|
private |
element_index_ lookup map
element_index_ allows lookup of the element by its symbol
Definition at line 111 of file ElementSet.hh.
Referenced by contains_element_type(), element_index(), print_all_types(), and read_file().
|
private |
a collection of Elements,
Element has data of atom properties, and it can be looked up by element_index.
Definition at line 117 of file ElementSet.hh.
Referenced by n_elements(), operator[](), and read_file().
1.8.4