Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
core::chemical::ElementSet Class Reference

A set of Bcl Elements. More...

#include <ElementSet.hh>

Inheritance diagram for core::chemical::ElementSet:
Inheritance graph
[legend]

Public Member Functions

 ElementSet (std::string const &name="")
 
 ~ElementSet () override
 
std::string const & name () const
 What the ChemicalManager knows this as, if relevant. More...
 
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 (core::chemical::element::Elements ele) const
 Lookup the element index by the element enum. More...
 
Size element_index (std::string const &element_symbol) const
 Lookup the element index by the element_symbol string. More...
 
ElementCOP element (core::chemical::element::Elements ele) const
 Lookup the element index by the element enum;. More...
 
ElementCOP element (std::string const &element_symbol) const
 Lookup the element object 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::string name_
 What the ChemicalManager knows this as, if relevant. More...
 
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 ( std::string const &  name = "")
core::chemical::ElementSet::~ElementSet ( )
overridedefault

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 ( core::chemical::element::Elements  ele) const

Lookup the element index by the element enum;.

Lookup the element index by the element enum.

References element_index(), and elements_.

Referenced by read_file().

ElementCOP core::chemical::ElementSet::element ( std::string const &  element_symbol) const

Lookup the element object by the element_symbol string.

Lookup the element index by the element_symbol string.

References element_index(), and elements_.

Size core::chemical::ElementSet::element_index ( core::chemical::element::Elements  ele) const

Lookup the element index by the element enum.

References core::chemical::element::name_from_elements().

Referenced by element(), and core::chemical::MutableResidueType::set_atom_type().

Size core::chemical::ElementSet::element_index ( std::string const &  element_symbol) const

Lookup the element index by the element_symbol string.

References element_index_.

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

Number of elements in the set.

References elements_.

std::string const& core::chemical::ElementSet::name ( ) const
inline

What the ChemicalManager knows this as, if relevant.

References name_.

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_, and core::chemical::tr().

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

std::string core::chemical::ElementSet::name_
private

What the ChemicalManager knows this as, if relevant.

Referenced by name().


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