Rosetta Core  2014.35
Public Member Functions | Private Attributes | List of all members
core::chemical::ElementSet Class Reference

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::Sizeelement_index_
 element_index_ lookup map More...
 
utility::vector1< ElementOPelements_
 a collection of Elements, More...
 

Detailed Description

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.

Constructor & Destructor Documentation

core::chemical::ElementSet::ElementSet ( )
core::chemical::ElementSet::~ElementSet ( )
virtual

Member Function Documentation

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().

Size core::chemical::ElementSet::n_elements ( ) const
inline

Number of elements in the set.

References elements_.

ElementCOP core::chemical::ElementSet::operator[] ( Size const  index) const

Lookup an Element by 1-based indexing.

References elements_.

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.

Member Data Documentation

std::map< std::string, core::Size > core::chemical::ElementSet::element_index_
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().

utility::vector1< ElementOP > core::chemical::ElementSet::elements_
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().


The documentation for this class was generated from the following files: