![]() |
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 | |
| Dict & | getDict () |
| STR_VECT | getPropList (bool includePrivate=true, bool includeComputed=true) const |
returns a list with the names of our properties | |
| template<typename T> | |
| void | setProp (const std::string_view key, T val, bool computed=false) const |
sets a property value | |
| template<typename T> | |
| void | getProp (const std::string_view key, T &res) const |
| allows retrieval of a particular property value | |
| template<typename T> | |
| T | getProp (const std::string_view key) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| template<typename T> | |
| bool | getPropIfPresent (const std::string_view key, T &res) const |
| bool | hasProp (const std::string_view key) const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
| void | clearProp (const std::string_view key) const |
clears the value of a property | |
| void | clearComputedProps () const |
clears all of our computed properties | |
| void | updateProps (const RDProps &source, bool preserveExisting=false) |
| update the properties from another | |
Protected Attributes | |
| Dict | d_props |
|
inline |
Definition at line 25 of file RDProps.h.
References d_props.
Referenced by RDKit::Bond::Bond(), RDKit::ChemicalReaction::ChemicalReaction(), RDKit::ChemicalReaction::ChemicalReaction(), RDKit::Conformer::Conformer(), RDKit::MolBundle::MolBundle(), RDKit::MolBundle::MolBundle(), operator=(), operator=(), RDProps(), RDProps(), RDKit::ROMol::ROMol(), RDKit::ROMol::ROMol(), RDKit::ROMol::ROMol(), RDKit::SubstanceGroup::SubstanceGroup(), and updateProps().
|
inline |
|
defaultnoexcept |
References RDProps().
|
inline |
clears all of our computed properties
Definition at line 155 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, and getPropIfPresent().
|
inline |
clears the value of a property
Notes:
property with name key exists, this will be a no-op.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 142 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, and getPropIfPresent().
Referenced by RDKit::Atom::setAtomMapNum().
|
inline |
|
inline |
gets the underlying Dictionary
Definition at line 39 of file RDProps.h.
References d_props.
Referenced by updateProps().
|
inline |
|
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 113 of file RDProps.h.
References d_props.
Referenced by RDKit::FileParserUtils::applyMolListProp().
|
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 127 of file RDProps.h.
References d_props.
Referenced by clearComputedProps(), clearProp(), RDKit::Atom::getAtomMapNum(), RDKit::MolEnumerator::utils::getMolLinkNodes(), getPropList(), and setProp().
|
inline |
returns a list with the names of our properties
Definition at line 48 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, and getPropIfPresent().
Referenced by RDKit::FileParserUtils::applyMolListProps(), 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 132 of file RDProps.h.
References d_props.
Referenced by RDKit::MolDraw2D_detail::addAtomIndices(), RDKit::MolDraw2D_detail::addBondIndices(), RDKit::queryAtomMissingChiralTag(), and RDKit::Atom::setAtomMapNum().
Definition at line 27 of file RDProps.h.
References d_props, and RDProps().
Referenced by RDKit::Bond::operator=(), RDKit::Conformer::operator=(), RDKit::ROMol::operator=(), RDKit::SubstanceGroup::operator=(), and RDKit::ChemicalReaction::ReactionPickler.
|
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 80 of file RDProps.h.
References RDKit::detail::computedPropName, d_props, and getPropIfPresent().
Referenced by RDKit::MolDraw2D_detail::addAtomIndices(), RDKit::MolDraw2D_detail::addBondIndices(), RDKit::FileParserUtils::createPropertyList(), and RDKit::Atom::setAtomMapNum().
|
inline |
|
mutableprotected |
Definition at line 19 of file RDProps.h.
Referenced by clear(), clearComputedProps(), clearProp(), getDict(), getDict(), getProp(), getProp(), getPropIfPresent(), getPropList(), hasProp(), operator=(), RDProps(), RDProps(), setProp(), and updateProps().