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

A set of Elements. More...

#include <IdealBondLengthSet.hh>

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

Public Member Functions

 IdealBondLengthSet ()
 
 ~IdealBondLengthSet () override
 
bool contains_bond_length (std::string const &atom_type_name1, std::string const &atom_type_name2) const
 Check if an ideal bond length is known for this pair of atom types... More...
 
bool contains_bond_length (AtomTypeIndex atom_type_index1, AtomTypeIndex atom_type_index2) const
 
BondLength get_bond_length (std::string const &atom_type_name1, std::string const &atom_type_name2) const
 Lookup the element index by the element_symbol string. More...
 
BondLength get_bond_length (AtomTypeIndex const atom_type_index1, AtomTypeIndex const atom_type_index2) const
 
void read_file (std::string const &filename)
 Load the IdealBondLengthSet from a file. More...
 
void print_all_bond_lengths ()
 Print all of the symbols of all of the Elements in the set. Usefull for debuging. More...
 

Private Member Functions

void add_bond_length (std::string const &atom_type_name1, std::string const &atom_type_name2, BondLength const length)
 
void add_bond_length (AtomTypeIndex const atom_type_index1, AtomTypeIndex const atom_type_index2, Real const length)
 

Private Attributes

std::map< std::pair
< AtomTypeIndex, AtomTypeIndex >
, BondLength
bond_lengths_
 

Detailed Description

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.

Constructor & Destructor Documentation

core::chemical::IdealBondLengthSet::IdealBondLengthSet ( )
core::chemical::IdealBondLengthSet::~IdealBondLengthSet ( )
overridedefault

Member Function Documentation

void core::chemical::IdealBondLengthSet::add_bond_length ( std::string const &  atom_type_name1,
std::string const &  atom_type_name2,
BondLength const  length 
)
private
void core::chemical::IdealBondLengthSet::add_bond_length ( AtomTypeIndex const  atom_type_index1,
AtomTypeIndex const  atom_type_index2,
Real const  length 
)
private
bool core::chemical::IdealBondLengthSet::contains_bond_length ( std::string const &  atom_type_name1,
std::string const &  atom_type_name2 
) const

Check if an ideal bond length is known for this pair of atom types...

References core::chemical::ChemicalManager::atom_type_set(), and core::chemical::FA_STANDARD.

Referenced by add_bond_length(), and get_bond_length().

bool core::chemical::IdealBondLengthSet::contains_bond_length ( AtomTypeIndex  atom_type_index1,
AtomTypeIndex  atom_type_index2 
) const

References bond_lengths_, and core::id::swap().

BondLength core::chemical::IdealBondLengthSet::get_bond_length ( std::string const &  atom_type_name1,
std::string const &  atom_type_name2 
) const

Lookup the element index by the element_symbol string.

References core::chemical::ChemicalManager::atom_type_set(), contains_bond_length(), core::chemical::FA_STANDARD, and core::id::swap().

BondLength core::chemical::IdealBondLengthSet::get_bond_length ( AtomTypeIndex const  atom_type_index1,
AtomTypeIndex const  atom_type_index2 
) const
void core::chemical::IdealBondLengthSet::print_all_bond_lengths ( )

Print all of the symbols of all of the Elements in the set. Usefull for debuging.

This function iterates over each bond_type pair in the bond_length_ map and prints both keys. It is only used for debugging.

References bond_lengths_.

void core::chemical::IdealBondLengthSet::read_file ( std::string const &  filename)

Load the IdealBondLengthSet from a file.

References add_bond_length().

Member Data Documentation

std::map< std::pair<AtomTypeIndex, AtomTypeIndex>, BondLength > core::chemical::IdealBondLengthSet::bond_lengths_
private

pair of atom type indices and the ideal length between these atom types

Referenced by add_bond_length(), contains_bond_length(), get_bond_length(), and print_all_bond_lengths().


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