31 #ifndef CDPL_DESCR_PATHFINGERPRINTGENERATOR_HPP
32 #define CDPL_DESCR_PATHFINGERPRINTGENERATOR_HPP
39 #include <boost/random/linear_congruential.hpp>
73 static constexpr
unsigned int DEF_ATOM_PROPERTY_FLAGS =
81 static constexpr
unsigned int DEF_BOND_PROPERTY_FLAGS =
254 typedef std::vector<std::size_t> IndexList;
255 typedef std::vector<std::uint64_t> UInt64Array;
258 std::size_t minPathLength;
259 std::size_t maxPathLength;
263 UInt64Array atomDescriptors;
264 UInt64Array bondDescriptors;
267 UInt64Array fwdPathDescriptor;
268 UInt64Array revPathDescriptor;
269 boost::rand48 randGenerator;
Definition of the 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.
Atom.
Definition: Atom.hpp:52
Bond.
Definition: Bond.hpp:50
MolecularGraph.
Definition: MolecularGraph.hpp:52
The default functor for the generation of atom descriptors.
Definition: PathFingerprintGenerator.hpp:88
DefAtomDescriptorFunctor(unsigned int flags=DEF_ATOM_PROPERTY_FLAGS)
Constructs the atom descriptor functor object for the specified set of atomic properties.
Definition: PathFingerprintGenerator.hpp:103
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:125
DefBondDescriptorFunctor(unsigned int flags=DEF_BOND_PROPERTY_FLAGS)
Constructs the bond descriptor functor object for the specified set of bond properties.
Definition: PathFingerprintGenerator.hpp:139
std::uint64_t operator()(const Chem::Bond &bond) const
Generates a descriptor for the argument bond.
PathFingerprintGenerator.
Definition: PathFingerprintGenerator.hpp:66
void setBondDescriptorFunction(const BondDescriptorFunction &func)
Allows to specify a custom function for the generation of bond descriptors.
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:175
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:165
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
A dynamic bitset class.
Definition: BitSet.hpp:46
The namespace of the Chemical Data Processing Library.