31 #ifndef CDPL_DESCR_PATHFINGERPRINTGENERATOR_HPP
32 #define CDPL_DESCR_PATHFINGERPRINTGENERATOR_HPP
39 #include <boost/random/linear_congruential.hpp>
79 static constexpr
unsigned int DEF_ATOM_PROPERTY_FLAGS =
87 static constexpr
unsigned int DEF_BOND_PROPERTY_FLAGS =
274 typedef std::vector<std::size_t> IndexList;
275 typedef std::vector<std::uint64_t> UInt64Array;
278 std::size_t minPathLength;
279 std::size_t maxPathLength;
284 UInt64Array atomDescriptors;
285 UInt64Array bondDescriptors;
288 UInt64Array fwdPathDescriptor;
289 UInt64Array revPathDescriptor;
290 boost::rand48 randGenerator;
Declaration of type CDPL::Util::BitSet.
Definition of constants in namespace CDPL::Chem::BondPropertyFlag.
Definition of constants in namespace CDPL::Chem::AtomPropertyFlag.
Definition of the preprocessor macro CDPL_DESCR_API.
#define CDPL_DESCR_API
Tells the compiler/linker which classes, functions and variables are part of the library API.
Abstract base class representing a chemical atom and its bonded neighborhood.
Definition: Atom.hpp:57
Abstract base class representing a chemical bond between two Chem::Atom instances.
Definition: Bond.hpp:54
Abstract base class for representations of a chemical structure as a graph of bonded atoms.
Definition: MolecularGraph.hpp:57
The default functor for the generation of atom descriptors.
Definition: PathFingerprintGenerator.hpp:94
DefAtomDescriptorFunctor(unsigned int flags=DEF_ATOM_PROPERTY_FLAGS)
Constructs the atom descriptor functor object for the specified set of atomic properties.
Definition: PathFingerprintGenerator.hpp:109
std::uint64_t operator()(const Chem::Atom &atom) const
Generates a descriptor for the argument atom.
The default functor for the generation of bond descriptors.
Definition: PathFingerprintGenerator.hpp:131
DefBondDescriptorFunctor(unsigned int flags=DEF_BOND_PROPERTY_FLAGS)
Constructs the bond descriptor functor object for the specified set of bond properties.
Definition: PathFingerprintGenerator.hpp:145
std::uint64_t operator()(const Chem::Bond &bond) const
Generates a descriptor for the argument bond.
Generation of Daylight-style path fingerprints of molecular graphs.
Definition: PathFingerprintGenerator.hpp:72
void setBondDescriptorFunction(const BondDescriptorFunction &func)
Allows to specify a custom function for the generation of bond descriptors.
void includeHydrogens(bool include)
Specifies whether hydrogens shall be considered during path enumeration.
PathFingerprintGenerator()
Constructs the PathFingerprintGenerator instance.
void generate(const Chem::MolecularGraph &molgraph, Util::BitSet &fp)
Generates the fingerprint of the molecular graph molgraph.
std::function< std::uint64_t(const Chem::Bond &)> BondDescriptorFunction
Type of the generic functor class used to store user-defined functions or function objects for the ge...
Definition: PathFingerprintGenerator.hpp:181
bool hydrogensIncluded() const
Tells whether hydrogens are considered during path enumeration.
void setAtomDescriptorFunction(const AtomDescriptorFunction &func)
Allows to specify a custom function for the generation of atom descriptors.
std::size_t getMaxPathLength() const
Returns the maximum considered path length.
void setMinPathLength(std::size_t min_length)
Allows to specify the minimum length a path must have to contribute to the generated fingerprint.
std::size_t getMinPathLength() const
Returns the minimum length a path must have to contribute to the generated fingerprint.
PathFingerprintGenerator(const Chem::MolecularGraph &molgraph, Util::BitSet &fp)
Constructs the PathFingerprintGenerator instance and generates the fingerprint of the molecular graph...
void setMaxPathLength(std::size_t max_length)
Allows to specify the maximum considered path length.
std::function< std::uint64_t(const Chem::Atom &)> AtomDescriptorFunction
Type of the generic functor class used to store user-defined functions or function objects for the ge...
Definition: PathFingerprintGenerator.hpp:171
constexpr unsigned int FORMAL_CHARGE
Specifies the formal charge of an atom.
Definition: Chem/AtomPropertyFlag.hpp:73
constexpr unsigned int AROMATICITY
Specifies the membership of an atom in aromatic rings.
Definition: Chem/AtomPropertyFlag.hpp:93
constexpr unsigned int ISOTOPE
Specifies the isotopic mass of an atom.
Definition: Chem/AtomPropertyFlag.hpp:68
constexpr unsigned int TYPE
Specifies the generic type or element of an atom.
Definition: Chem/AtomPropertyFlag.hpp:63
constexpr unsigned int AROMATICITY
Specifies the membership of a bond in aromatic rings.
Definition: BondPropertyFlag.hpp:73
constexpr unsigned int ORDER
Specifies the order of a bond.
Definition: BondPropertyFlag.hpp:63
constexpr unsigned int TOPOLOGY
Specifies the ring/chain topology of a bond.
Definition: BondPropertyFlag.hpp:68
boost::dynamic_bitset BitSet
Dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.