29 #ifndef CDPL_CHEM_ATOMFUNCTIONS_HPP
30 #define CDPL_CHEM_ATOMFUNCTIONS_HPP
34 #include <type_traits>
53 class StereoDescriptor;
561 bool check_inv_n =
true,
bool check_quart_n =
true,
bool check_plan_n =
true,
562 bool check_amide_n =
true,
bool check_res_ctrs =
true);
924 template <
typename AtomType,
typename OutputIterator>
927 typedef typename std::conditional<std::is_const<AtomType>::value,
typename AtomType::ConstAtomIterator,
typename AtomType::AtomIterator>::type AtomIterator;
929 AtomIterator atoms_end = atom.getAtomsEnd();
930 typename AtomType::ConstBondIterator b_it = atom.getBondsBegin();
931 std::size_t count = 0;
933 for (AtomIterator a_it = atom.getAtomsBegin(); a_it != atoms_end; ++a_it, ++b_it) {
934 if (&(*a_it) == excl_atom)
957 template <
typename AtomType,
typename OutputIterator>
960 typedef typename std::conditional<std::is_const<AtomType>::value,
typename AtomType::ConstBondIterator,
typename AtomType::BondIterator>::type BondIterator;
962 BondIterator bonds_end = atom.getBondsEnd();
963 typename AtomType::ConstAtomIterator a_it = atom.getAtomsBegin();
964 std::size_t count = 0;
966 for (BondIterator b_it = atom.getBondsBegin(); b_it != bonds_end; ++a_it, ++b_it) {
967 if (&(*a_it) == excl_atom)
992 template <
typename AtomType,
typename AtomOutputIterator,
typename BondOutputIterator>
995 typedef typename std::conditional<std::is_const<AtomType>::value,
typename AtomType::ConstAtomIterator,
typename AtomType::AtomIterator>::type AtomIterator;
996 typedef typename std::conditional<std::is_const<AtomType>::value,
typename AtomType::ConstBondIterator,
typename AtomType::BondIterator>::type BondIterator;
998 BondIterator bonds_end = atom.getBondsEnd();
999 AtomIterator a_it = atom.getAtomsBegin();
1000 std::size_t count = 0;
1002 for (BondIterator b_it = atom.getBondsBegin(); b_it != bonds_end; ++a_it, ++b_it) {
1003 if (&(*a_it) == excl_atom)
Type definition of a generic wrapper class for storing user-defined Chem::Atom priority functions.
Declaration of type CDPL::Util::BitSet.
Definition of the preprocessor macro CDPL_CHEM_API.
#define CDPL_CHEM_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Definition of constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of class CDPL::Chem::FragmentList.
Definition of class CDPL::Chem::MatchConstraintList.
Definition of class CDPL::Chem::MatchExpression.
Definition of class CDPL::Math::VectorArray.
Definition of vector data types.
virtual bool containsAtom(const Atom &atom) const =0
Tells whether the specified Chem::Atom instance is stored in this container.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
virtual bool containsBond(const Bond &bond) const =0
Tells whether the specified Chem::Bond instance is stored in this container.
Data type for the storage of Chem::Fragment objects.
Definition: FragmentList.hpp:49
Concrete Chem::MolecularGraph implementation that stores references to a selectable subset of atoms a...
Definition: Fragment.hpp:57
std::shared_ptr< MatchConstraintList > SharedPointer
A reference-counted smart pointer [SHPTR] for dynamically allocated MatchConstraintList instances.
Definition: MatchConstraintList.hpp:211
Generic boolean expression interface for the implementation of query/target object equivalence tests ...
Definition: MatchExpression.hpp:75
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
Data structure for the storage and retrieval of stereochemical information about atoms and bonds.
Definition: StereoDescriptor.hpp:102
CDPL_CHEM_API bool hasFormalCharge(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::FORMAL_CHARGE property.
CDPL_CHEM_API bool hasMDLParity(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MDL_PARITY property.
CDPL_CHEM_API std::size_t getEnvironment(const Atom &atom, const MolecularGraph &molgraph, std::size_t max_dist, Fragment &env, bool append=false)
Collects every atom of molgraph that is within max_dist bonds of atom into the fragment env.
CDPL_CHEM_API std::size_t getSizeOfSmallestContainingFragment(const Atom &atom, const FragmentList &frag_list)
Returns the size (in atoms) of the smallest fragment in frag_list that contains atom.
CDPL_CHEM_API void setRingFlag(Atom &atom, bool in_ring)
Sets the Chem::AtomProperty::RING_FLAG property of atom to in_ring.
std::size_t getConnectedAtomsAndBonds(AtomType &atom, const MolecularGraph &molgraph, AtomOutputIterator ao_it, BondOutputIterator bo_it, AtomType *excl_atom=0)
Writes every neighbor of atom and the corresponding incident bond (both filtered by molgraph) into th...
Definition: Chem/AtomFunctions.hpp:993
CDPL_CHEM_API std::size_t getSymmetryClass(const Atom &atom)
Returns the Chem::AtomProperty::SYMMETRY_CLASS property of atom.
CDPL_CHEM_API bool hasSymmetryClass(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::SYMMETRY_CLASS property.
CDPL_CHEM_API void setCanonicalNumber(Atom &atom, std::size_t num)
Sets the Chem::AtomProperty::CANONICAL_NUMBER property of atom to num.
CDPL_CHEM_API bool hasIsotope(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::ISOTOPE property.
CDPL_CHEM_API long getFormalCharge(const Atom &atom)
Returns the Chem::AtomProperty::FORMAL_CHARGE property of atom.
CDPL_CHEM_API unsigned int getTypeForSymbol(const Atom &atom)
Returns the atom type that corresponds to the Chem::AtomProperty::SYMBOL of atom.
CDPL_CHEM_API bool hasMOL2SubstructureChain(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property.
CDPL_CHEM_API void clear2DCoordinates(Atom &atom)
Removes the Chem::AtomProperty::COORDINATES_2D property from atom.
CDPL_CHEM_API bool hasCIPPriority(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::CIP_PRIORITY property.
CDPL_CHEM_API void clearFormalCharge(Atom &atom)
Removes the Chem::AtomProperty::FORMAL_CHARGE property from atom.
CDPL_CHEM_API bool getAromaticityFlag(const Atom &atom)
Returns the Chem::AtomProperty::AROMATICITY_FLAG property of atom.
CDPL_CHEM_API void clearRingFlag(Atom &atom)
Removes the Chem::AtomProperty::RING_FLAG property from atom.
CDPL_CHEM_API void clearSymmetryClass(Atom &atom)
Removes the Chem::AtomProperty::SYMMETRY_CLASS property from atom.
CDPL_CHEM_API void clearMatchExpression(Atom &atom)
Removes the Chem::AtomProperty::MATCH_EXPRESSION property from atom.
CDPL_CHEM_API bool hasSymbol(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::SYMBOL property.
CDPL_CHEM_API void getContainingFragments(const Atom &atom, const FragmentList &frag_list, FragmentList &cont_frag_list, bool append=false)
Collects the fragments in frag_list that contain atom into cont_frag_list.
CDPL_CHEM_API bool hasMOL2Charge(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_CHARGE property.
CDPL_CHEM_API void setSymbol(Atom &atom, const std::string &symbol)
Sets the Chem::AtomProperty::SYMBOL property of atom to symbol.
CDPL_CHEM_API const std::string & getMOL2SubstructureChain(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of atom.
std::size_t getIncidentBonds(AtomType &atom, const MolecularGraph &molgraph, OutputIterator it, AtomType *excl_atom=0)
Writes every bond incident to atom (with both endpoints belonging to molgraph) into it,...
Definition: Chem/AtomFunctions.hpp:958
CDPL_CHEM_API bool hasHybridizationState(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::HYBRIDIZATION property.
CDPL_CHEM_API const MatchConstraintList::SharedPointer & getMatchConstraints(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom.
CDPL_CHEM_API void setRadicalType(Atom &atom, unsigned int type)
Sets the Chem::AtomProperty::RADICAL_TYPE property of atom to type (see namespace Chem::RadicalType).
CDPL_CHEM_API bool hasMOL2SubstructureName(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property.
CDPL_CHEM_API bool getRingFlag(const Atom &atom)
Returns the Chem::AtomProperty::RING_FLAG property of atom.
CDPL_CHEM_API const Math::Vector3DArray::SharedPointer & get3DCoordinatesArray(const Atom &atom)
Returns the Chem::AtomProperty::COORDINATES_3D_ARRAY property of atom.
CDPL_CHEM_API unsigned int calcConfiguration(const Atom &atom, const MolecularGraph &molgraph, const StereoDescriptor &descr, const Math::Vector3DArray &coords)
Derives the atom configuration label from the supplied descriptor and 3D coordinates.
CDPL_CHEM_API void clearMOL2SubstructureChain(Atom &atom)
Removes the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property from atom.
CDPL_CHEM_API bool hasReactionCenterStatus(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::REACTION_CENTER_STATUS property.
CDPL_CHEM_API bool hasCanonicalNumber(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::CANONICAL_NUMBER property.
CDPL_CHEM_API bool hasName(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::NAME property.
CDPL_CHEM_API std::size_t getMorganNumber(const Atom &atom)
Returns the Chem::AtomProperty::MORGAN_NUMBER property of atom.
CDPL_CHEM_API void setSybylType(Atom &atom, unsigned int type)
Sets the Chem::AtomProperty::SYBYL_TYPE property of atom to type (see namespace Chem::SybylAtomType).
CDPL_CHEM_API void setMDLParity(Atom &atom, unsigned int parity)
Sets the Chem::AtomProperty::MDL_PARITY property of atom to parity (see namespace Chem::MDLParity).
CDPL_CHEM_API void clearStereoCenterFlag(Atom &atom)
Removes the Chem::AtomProperty::STEREO_CENTER_FLAG property from atom.
CDPL_CHEM_API void clearMOL2Name(Atom &atom)
Removes the Chem::AtomProperty::MOL2_NAME property from atom.
CDPL_CHEM_API void clearReactionCenterStatus(Atom &atom)
Removes the Chem::AtomProperty::REACTION_CENTER_STATUS property from atom.
CDPL_CHEM_API const std::string & getName(const Atom &atom)
Returns the Chem::AtomProperty::NAME property of atom.
CDPL_CHEM_API void clearCIPConfiguration(Atom &atom)
Removes the Chem::AtomProperty::CIP_CONFIGURATION property from atom.
CDPL_CHEM_API std::size_t getNumContainingFragments(const Atom &atom, const FragmentList &frag_list)
Returns the number of fragments in frag_list that contain atom.
CDPL_CHEM_API bool hasMDLStereoCareFlag(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property.
CDPL_CHEM_API void get2DCoordinates(const AtomContainer &cntnr, Math::Vector2DArray &coords, bool append=false)
Extracts the 2D coordinates of all atoms in cntnr into coords.
CDPL_CHEM_API std::size_t getCIPPriority(const Atom &atom)
Returns the Chem::AtomProperty::CIP_PRIORITY property of atom.
CDPL_CHEM_API bool hasMOL2SubstructureSubtype(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property.
CDPL_CHEM_API void setMatchExpression(Atom &atom, const MatchExpression< Atom, MolecularGraph >::SharedPointer &expr)
Sets the Chem::AtomProperty::MATCH_EXPRESSION property of atom to expr.
CDPL_CHEM_API bool hasStereoCenterFlag(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::STEREO_CENTER_FLAG property.
CDPL_CHEM_API void clearType(Atom &atom)
Removes the Chem::AtomProperty::TYPE property from atom.
CDPL_CHEM_API bool has3DCoordinatesArray(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::COORDINATES_3D_ARRAY property.
CDPL_CHEM_API void setMOL2Charge(Atom &atom, double charge)
Sets the Chem::AtomProperty::MOL2_CHARGE property of atom to charge.
CDPL_CHEM_API void clear3DCoordinatesArray(Atom &atom)
Removes the Chem::AtomProperty::COORDINATES_3D_ARRAY property from atom.
CDPL_CHEM_API bool hasAtomMappingID(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::ATOM_MAPPING_ID property.
CDPL_CHEM_API void setMOL2SubstructureID(Atom &atom, std::size_t id)
Sets the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of atom to id.
CDPL_CHEM_API void clearMorganNumber(Atom &atom)
Removes the Chem::AtomProperty::MORGAN_NUMBER property from atom.
CDPL_CHEM_API unsigned int perceiveSybylType(const Atom &atom, const MolecularGraph &molgraph)
Derives the Sybyl atom type of atom from its valence environment in molgraph.
CDPL_CHEM_API void setMOL2SubstructureName(Atom &atom, const std::string &id)
Sets the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of atom to id.
CDPL_CHEM_API void clearStereoDescriptor(Atom &atom)
Removes the Chem::AtomProperty::STEREO_DESCRIPTOR property from atom.
CDPL_CHEM_API void setHybridizationState(Atom &atom, unsigned int state)
Sets the Chem::AtomProperty::HYBRIDIZATION property of atom to state (see namespace Chem::Hybridizati...
CDPL_CHEM_API unsigned int getSybylType(const Atom &atom)
Returns the Chem::AtomProperty::SYBYL_TYPE property of atom (see namespace Chem::SybylAtomType).
CDPL_CHEM_API void setMorganNumber(Atom &atom, std::size_t num)
Sets the Chem::AtomProperty::MORGAN_NUMBER property of atom to num.
CDPL_CHEM_API std::size_t calcImplicitHydrogenCount(const Atom &atom, const MolecularGraph &molgraph)
Computes the implicit hydrogen count of atom from its valence environment in molgraph.
CDPL_CHEM_API void clearMDLParity(Atom &atom)
Removes the Chem::AtomProperty::MDL_PARITY property from atom.
CDPL_CHEM_API bool hasCIPConfiguration(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::CIP_CONFIGURATION property.
CDPL_CHEM_API std::size_t getSizeOfLargestContainingFragment(const Atom &atom, const FragmentList &frag_list)
Returns the size (in atoms) of the largest fragment in frag_list that contains atom.
CDPL_CHEM_API MatchExpression< Atom, MolecularGraph >::SharedPointer generateMatchExpression(const Atom &atom, const MolecularGraph &molgraph)
Builds an atom-level match expression from the match-constraint list attached to atom.
CDPL_CHEM_API const MatchExpression< Atom, MolecularGraph >::SharedPointer & getMatchExpression(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_EXPRESSION property of atom.
CDPL_CHEM_API std::size_t getComponentGroupID(const Atom &atom)
Returns the Chem::AtomProperty::COMPONENT_GROUP_ID property of atom.
CDPL_CHEM_API void setAromaticityFlag(Atom &atom, bool aromatic)
Sets the Chem::AtomProperty::AROMATICITY_FLAG property of atom to aromatic.
CDPL_CHEM_API void markReachableAtoms(const Atom &atom, const MolecularGraph &molgraph, Util::BitSet &atom_mask, bool reset=true)
Sets bits in atom_mask for every atom of molgraph that is reachable from atom through the bonds of mo...
CDPL_CHEM_API long calcFormalCharge(const Atom &atom, const MolecularGraph &molgraph)
Computes the formal charge of atom from its valence environment in molgraph.
CDPL_CHEM_API unsigned int getMDLParity(const Atom &atom)
Returns the Chem::AtomProperty::MDL_PARITY property of atom (see namespace Chem::MDLParity).
CDPL_CHEM_API void setStereoCenterFlag(Atom &atom, bool is_center)
Sets the Chem::AtomProperty::STEREO_CENTER_FLAG property of atom to is_center.
CDPL_CHEM_API void clearMDLStereoCareFlag(Atom &atom)
Removes the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property from atom.
std::size_t getConnectedAtoms(AtomType &atom, const MolecularGraph &molgraph, OutputIterator it, AtomType *excl_atom=0)
Writes every neighbor of atom (with bonds belonging to molgraph) into it, skipping excl_atom.
Definition: Chem/AtomFunctions.hpp:925
CDPL_CHEM_API void setMDLStereoCareFlag(Atom &atom, bool flag)
Sets the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of atom to flag.
CDPL_CHEM_API void setCIPConfiguration(Atom &atom, unsigned int config)
Sets the Chem::AtomProperty::CIP_CONFIGURATION property of atom to config (see namespace Chem::CIPDes...
CDPL_CHEM_API void clearMOL2Charge(Atom &atom)
Removes the Chem::AtomProperty::MOL2_CHARGE property from atom.
CDPL_CHEM_API StereoDescriptor calcStereoDescriptor(const Atom &atom, const MolecularGraph &molgraph, std::size_t dim=1)
Computes the stereo descriptor for atom based on the geometry of molgraph.
CDPL_CHEM_API void setReactionCenterStatus(Atom &atom, unsigned int status)
Sets the Chem::AtomProperty::REACTION_CENTER_STATUS property of atom to status.
CDPL_CHEM_API const StereoDescriptor & getStereoDescriptor(const Atom &atom)
Returns the Chem::AtomProperty::STEREO_DESCRIPTOR property of atom.
CDPL_CHEM_API void clearCanonicalNumber(Atom &atom)
Removes the Chem::AtomProperty::CANONICAL_NUMBER property from atom.
CDPL_CHEM_API void generateMatchExpressionString(const Atom &atom, const MolecularGraph &molgraph, std::string &expr_str)
Writes a textual representation of the atom-level match expression of atom into expr_str.
CDPL_CHEM_API unsigned int getRadicalType(const Atom &atom)
Returns the Chem::AtomProperty::RADICAL_TYPE property of atom (see namespace Chem::RadicalType).
CDPL_CHEM_API const std::string & getMOL2SubstructureName(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property of atom.
CDPL_CHEM_API void clearMOL2SubstructureID(Atom &atom)
Removes the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property from atom.
CDPL_CHEM_API void clearAromaticityFlag(Atom &atom)
Removes the Chem::AtomProperty::AROMATICITY_FLAG property from atom.
CDPL_CHEM_API void clearRadicalType(Atom &atom)
Removes the Chem::AtomProperty::RADICAL_TYPE property from atom.
CDPL_CHEM_API void setUnpairedElectronCount(Atom &atom, std::size_t count)
Sets the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of atom to count.
CDPL_CHEM_API bool isStereoCenter(const Atom &atom, const MolecularGraph &molgraph, bool check_asym=true, bool check_inv_n=true, bool check_quart_n=true, bool check_plan_n=true, bool check_amide_n=true, bool check_res_ctrs=true)
Tells whether atom qualifies as a stereo center in the context of molgraph.
CDPL_CHEM_API bool hasMOL2Name(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_NAME property.
CDPL_CHEM_API void setAtomMappingID(Atom &atom, std::size_t id)
Sets the Chem::AtomProperty::ATOM_MAPPING_ID property of atom to id.
CDPL_CHEM_API StereoDescriptor calcStereoDescriptorFromMDLParity(const Atom &atom, const MolecularGraph &molgraph)
Derives the stereo descriptor of atom from its MDL parity in molgraph.
CDPL_CHEM_API void clearSybylType(Atom &atom)
Removes the Chem::AtomProperty::SYBYL_TYPE property from atom.
CDPL_CHEM_API void setIsotope(Atom &atom, std::size_t isotope)
Sets the Chem::AtomProperty::ISOTOPE property of atom to isotope.
CDPL_CHEM_API void setCIPPriority(Atom &atom, std::size_t priority)
Sets the Chem::AtomProperty::CIP_PRIORITY property of atom to priority.
CDPL_CHEM_API void setMatchConstraints(Atom &atom, const MatchConstraintList::SharedPointer &constr)
Sets the Chem::AtomProperty::MATCH_CONSTRAINTS property of atom to constr.
CDPL_CHEM_API unsigned int getType(const Atom &atom)
Returns the Chem::AtomProperty::TYPE property of atom (see namespace Chem::AtomType).
CDPL_CHEM_API bool has2DCoordinates(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::COORDINATES_2D property.
CDPL_CHEM_API std::size_t getImplicitHydrogenCount(const Atom &atom)
Returns the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of atom.
CDPL_CHEM_API const std::string & getMOL2SubstructureSubtype(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of atom.
CDPL_CHEM_API void clearAtomMappingID(Atom &atom)
Removes the Chem::AtomProperty::ATOM_MAPPING_ID property from atom.
CDPL_CHEM_API bool hasMorganNumber(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MORGAN_NUMBER property.
CDPL_CHEM_API void clearIsotope(Atom &atom)
Removes the Chem::AtomProperty::ISOTOPE property from atom.
CDPL_CHEM_API void setStereoDescriptor(Atom &atom, const StereoDescriptor &descr)
Sets the Chem::AtomProperty::STEREO_DESCRIPTOR property of atom to descr.
CDPL_CHEM_API const std::string & getMatchExpressionString(const Atom &atom)
Returns the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of atom.
CDPL_CHEM_API bool hasMatchExpressionString(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_EXPRESSION_STRING property.
CDPL_CHEM_API const Math::Vector3D & getConformer3DCoordinates(const Atom &atom, std::size_t conf_idx)
Returns the 3D coordinates of atom for conformer conf_idx (from the Chem::AtomProperty::COORDINATES_3...
CDPL_CHEM_API void clearSymbol(Atom &atom)
Removes the Chem::AtomProperty::SYMBOL property from atom.
CDPL_CHEM_API void clearHybridizationState(Atom &atom)
Removes the Chem::AtomProperty::HYBRIDIZATION property from atom.
CDPL_CHEM_API bool hasRingFlag(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::RING_FLAG property.
CDPL_CHEM_API bool hasComponentGroupID(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::COMPONENT_GROUP_ID property.
CDPL_CHEM_API std::size_t getUnpairedElectronCount(const Atom &atom)
Returns the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property of atom.
CDPL_CHEM_API bool hasMatchExpression(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_EXPRESSION property.
CDPL_CHEM_API std::size_t getCanonicalNumber(const Atom &atom)
Returns the Chem::AtomProperty::CANONICAL_NUMBER property of atom.
CDPL_CHEM_API void clearUnpairedElectronCount(Atom &atom)
Removes the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property from atom.
CDPL_CHEM_API bool hasType(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::TYPE property.
CDPL_CHEM_API bool hasMOL2SubstructureID(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property.
CDPL_CHEM_API unsigned int getHybridizationState(const Atom &atom)
Returns the Chem::AtomProperty::HYBRIDIZATION property of atom (see namespace Chem::HybridizationStat...
CDPL_CHEM_API void setMOL2SubstructureChain(Atom &atom, const std::string &chain)
Sets the Chem::AtomProperty::MOL2_SUBSTRUCTURE_CHAIN property of atom to chain.
CDPL_CHEM_API bool hasStereoDescriptor(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::STEREO_DESCRIPTOR property.
CDPL_CHEM_API void clearMOL2SubstructureSubtype(Atom &atom)
Removes the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property from atom.
CDPL_CHEM_API void clearName(Atom &atom)
Removes the Chem::AtomProperty::NAME property from atom.
CDPL_CHEM_API void setSymmetryClass(Atom &atom, std::size_t class_id)
Sets the Chem::AtomProperty::SYMMETRY_CLASS property of atom to class_id.
CDPL_CHEM_API void set3DCoordinatesArray(Atom &atom, const Math::Vector3DArray::SharedPointer &coords_array)
Sets the Chem::AtomProperty::COORDINATES_3D_ARRAY property of atom to coords_array.
CDPL_CHEM_API const std::string & getSymbol(const Atom &atom)
Returns the Chem::AtomProperty::SYMBOL property of atom.
CDPL_CHEM_API bool hasRadicalType(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::RADICAL_TYPE property.
CDPL_CHEM_API void set2DCoordinates(AtomContainer &cntnr, const Math::Vector2DArray &coords)
Writes the 2D coordinates in coords back to the corresponding atoms of cntnr.
CDPL_CHEM_API void clearComponentGroupID(Atom &atom)
Removes the Chem::AtomProperty::COMPONENT_GROUP_ID property from atom.
CDPL_CHEM_API void setMOL2SubstructureSubtype(Atom &atom, const std::string &subtype)
Sets the Chem::AtomProperty::MOL2_SUBSTRUCTURE_SUBTYPE property of atom to subtype.
CDPL_CHEM_API void clearMatchConstraints(Atom &atom)
Removes the Chem::AtomProperty::MATCH_CONSTRAINTS property from atom.
CDPL_CHEM_API unsigned int getGenericType(const Atom &atom)
Returns the generic atom type (e.g. A, Q, X, ...) that the atom's Chem::AtomProperty::TYPE belongs to...
CDPL_CHEM_API bool hasMatchConstraints(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::MATCH_CONSTRAINTS property.
CDPL_CHEM_API bool hasUnpairedElectronCount(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::UNPAIRED_ELECTRON_COUNT property.
CDPL_CHEM_API unsigned int perceiveHybridizationState(const Atom &atom, const MolecularGraph &molgraph)
Derives the hybridization state of atom from its valence environment in molgraph.
CDPL_CHEM_API void setImplicitHydrogenCount(Atom &atom, std::size_t count)
Sets the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property of atom to count.
CDPL_CHEM_API bool getStereoCenterFlag(const Atom &atom)
Returns the Chem::AtomProperty::STEREO_CENTER_FLAG property of atom.
CDPL_CHEM_API bool getMDLStereoCareFlag(const Atom &atom)
Returns the Chem::AtomProperty::MDL_DB_STEREO_CARE_FLAG property of atom.
CDPL_CHEM_API double getMOL2Charge(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_CHARGE property of atom.
CDPL_CHEM_API bool hasAromaticityFlag(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::AROMATICITY_FLAG property.
CDPL_CHEM_API unsigned int getReactionCenterStatus(const Atom &atom)
Returns the Chem::AtomProperty::REACTION_CENTER_STATUS property of atom (see namespace Chem::Reaction...
CDPL_CHEM_API void setMatchExpressionString(Atom &atom, const std::string &expr_str)
Sets the Chem::AtomProperty::MATCH_EXPRESSION_STRING property of atom to expr_str.
CDPL_CHEM_API std::size_t getMOL2SubstructureID(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_SUBSTRUCTURE_ID property of atom.
CDPL_CHEM_API void clearImplicitHydrogenCount(Atom &atom)
Removes the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property from atom.
CDPL_CHEM_API bool isInFragmentOfSize(const Atom &atom, const FragmentList &frag_list, std::size_t size)
Tells whether atom is a member of any fragment in frag_list whose size matches size.
CDPL_CHEM_API void setComponentGroupID(Atom &atom, std::size_t id)
Sets the Chem::AtomProperty::COMPONENT_GROUP_ID property of atom to id.
CDPL_CHEM_API void setFormalCharge(Atom &atom, long charge)
Sets the Chem::AtomProperty::FORMAL_CHARGE property of atom to charge.
CDPL_CHEM_API void setType(Atom &atom, unsigned int type)
Sets the Chem::AtomProperty::TYPE property of atom to type (see namespace Chem::AtomType).
CDPL_CHEM_API unsigned int calcMDLParity(const Atom &atom, const MolecularGraph &molgraph)
Computes the MDL parity of atom from its 2D layout and stereo flags in molgraph.
CDPL_CHEM_API void clearCIPPriority(Atom &atom)
Removes the Chem::AtomProperty::CIP_PRIORITY property from atom.
CDPL_CHEM_API std::size_t getAtomMappingID(const Atom &atom)
Returns the Chem::AtomProperty::ATOM_MAPPING_ID property of atom.
CDPL_CHEM_API const std::string & getSymbolForType(const Atom &atom)
Returns the element symbol that corresponds to the Chem::AtomProperty::TYPE of atom.
CDPL_CHEM_API void clearMatchExpressionString(Atom &atom)
Removes the Chem::AtomProperty::MATCH_EXPRESSION_STRING property from atom.
CDPL_CHEM_API void clearMOL2SubstructureName(Atom &atom)
Removes the Chem::AtomProperty::MOL2_SUBSTRUCTURE_NAME property from atom.
CDPL_CHEM_API std::size_t getIsotope(const Atom &atom)
Returns the Chem::AtomProperty::ISOTOPE property of atom.
CDPL_CHEM_API bool hasSybylType(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::SYBYL_TYPE property.
CDPL_CHEM_API void setMOL2Name(Atom &atom, const std::string &name)
Sets the Chem::AtomProperty::MOL2_NAME property of atom to name.
CDPL_CHEM_API std::size_t getTopologicalDistance(const Atom &atom1, const Atom &atom2, const MolecularGraph &molgraph)
Returns the topological distance (number of edges along the shortest path) between two atoms of molgr...
CDPL_CHEM_API bool hasImplicitHydrogenCount(const Atom &atom)
Tells whether atom carries the Chem::AtomProperty::IMPLICIT_HYDROGEN_COUNT property.
CDPL_CHEM_API unsigned int getCIPConfiguration(const Atom &atom)
Returns the Chem::AtomProperty::CIP_CONFIGURATION property of atom (see namespace Chem::CIPDescriptor...
CDPL_CHEM_API const std::string & getMOL2Name(const Atom &atom)
Returns the Chem::AtomProperty::MOL2_NAME property of atom.
CDPL_CHEM_API void setName(Atom &atom, const std::string &name)
Sets the Chem::AtomProperty::NAME property of atom to name.
VectorArray< Vector3D > Vector3DArray
Array storing vectors of type Math::Vector3D.
Definition: VectorArray.hpp:85
CVector< double, 2 > Vector2D
Bounded 2 element vector holding floating point values of type double.
Definition: Vector.hpp:2932
CVector< double, 3 > Vector3D
Bounded 3 element vector holding floating point values of type double.
Definition: Vector.hpp:2937
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.