![]() |
RDKit
Open-source cheminformatics and machine learning.
|
#include <RDProps.h>
Public Member Functions | |
| RDProps () | |
| RDProps (const RDProps &rhs) | |
| RDProps & | operator= (const RDProps &rhs) |
| RDProps (RDProps &&o) noexcept=default | |
| RDProps & | operator= (RDProps &&rhs) noexcept=default |
| void | clear () |
| const Dict & | getDict () const |
| gets the underlying Dictionary More... | |
| Dict & | getDict () |
| STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const |
returns a list with the names of our properties More... | |
| template<typename T > | |
| void | setProp (const std::string &key, T val, bool computed=false) const |
sets a property value More... | |
| template<typename T > | |
| void | getProp (const std::string &key, T &res) const |
| allows retrieval of a particular property value More... | |
| template<typename T > | |
| T | getProp (const std::string &key) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| template<typename T > | |
| bool | getPropIfPresent (const std::string &key, T &res) const |
| bool | hasProp (const std::string &key) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More... | |
| void | clearProp (const std::string &key) const |
clears the value of a property More... | |
| void | clearComputedProps () const |
clears all of our computed properties More... | |
| void | updateProps (const RDProps &source, bool preserveExisting=false) |
| update the properties from another More... | |
Protected Attributes | |
| Dict | d_props |
|
defaultnoexcept |
|
inline |
Definition at line 34 of file RDProps.h.
References d_props, and RDKit::Dict::reset().
Referenced by RDKit::ROMol::ROMol().
|
inline |
clears all of our computed properties
Definition at line 150 of file RDProps.h.
References RDKit::Dict::clearVal(), RDKit::detail::computedPropName, d_props, getPropIfPresent(), and RDKit::Dict::setVal().
|
inline |
clears the value of a property
Notes:
property with name key exists, a KeyErrorException will be thrown.property is marked as computed, it will also be removed from our list of computedProperties This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 137 of file RDProps.h.
References RDKit::Dict::clearVal(), RDKit::detail::computedPropName, d_props, getPropIfPresent(), and RDKit::Dict::setVal().
Referenced by RDKit::RGroupDecompData::relabelRGroup().
|
inline |
|
inline |
gets the underlying Dictionary
Definition at line 36 of file RDProps.h.
References d_props.
Referenced by updateProps().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 113 of file RDProps.h.
References d_props, and RDKit::Dict::getVal().
|
inline |
allows retrieval of a particular property value
| key | the name under which the property should be stored. If a property is already stored under this name, it will be replaced. |
| res | a reference to the storage location for the value. |
Notes:
property with name key exists, a KeyErrorException will be thrown.boost::lexical_cast machinery is used to attempt type conversions. If this fails, a boost::bad_lexical_cast exception will be thrown. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Definition at line 107 of file RDProps.h.
References d_props, and RDKit::Dict::getVal().
Referenced by RDKit::FileParserUtils::applyMolListPropToAtoms(), and RDKit::RGroupDecompData::relabelRGroup().
|
inline |
returns whether or not we have a property with name key and assigns the value if we do This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 121 of file RDProps.h.
References d_props, and RDKit::Dict::getValIfPresent().
Referenced by clearComputedProps(), clearProp(), RDKit::MolEnumerator::utils::getMolLinkNodes(), RDKit::RGroupData::getNumBondsToRlabels(), getPropList(), RDKit::RGroupDecompData::getRlabel(), and setProp().
|
inline |
returns a list with the names of our properties
Definition at line 45 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, getPropIfPresent(), and RDKit::Dict::keys().
Referenced by RDKit::FileParserUtils::applyMolListPropsToAtoms(), and RDKit::FileParserUtils::processMolPropertyLists().
|
inline |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 126 of file RDProps.h.
References d_props, and RDKit::Dict::hasVal().
Referenced by RDKit::MolDraw2D_detail::addAtomIndices(), RDKit::MolDraw2D_detail::addBondIndices(), RDKit::queryAtomMissingChiralTag(), and RDKit::RGroupDecompData::relabelRGroup().
Definition at line 24 of file RDProps.h.
References d_props.
Referenced by RDKit::Bond::operator=(), RDKit::Conformer::operator=(), RDKit::ROMol::operator=(), and RDKit::SubstanceGroup::operator=().
|
inline |
sets a property value
| key | the name under which the property should be stored. If a property is already stored under this name, it will be replaced. |
| val | the value to be stored |
| computed | (optional) allows the property to be flagged computed. This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. |
Definition at line 77 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, getPropIfPresent(), and RDKit::Dict::setVal().
Referenced by RDKit::MolDraw2D_detail::addAtomIndices(), RDKit::MolDraw2D_detail::addBondIndices(), RDKit::FileParserUtils::applyMolListPropToAtoms(), RDKit::FileParserUtils::createAtomBoolPropertyList(), RDKit::FileParserUtils::createAtomDoublePropertyList(), RDKit::FileParserUtils::createAtomIntPropertyList(), RDKit::FileParserUtils::createAtomStringPropertyList(), RDKit::RGroupDecompData::relabelRGroup(), and RDKit::RGroupDecompData::setRlabel().
|
inline |
update the properties from another
Definition at line 167 of file RDProps.h.
References d_props, getDict(), and RDKit::Dict::update().
|
mutableprotected |
Definition at line 16 of file RDProps.h.
Referenced by clear(), clearComputedProps(), clearProp(), getDict(), getProp(), getPropIfPresent(), getPropList(), hasProp(), operator=(), setProp(), and updateProps().