12#ifndef RD_RDFINGERPRINTGEN_H_2018_07
13#define RD_RDFINGERPRINTGEN_H_2018_07
29 void toJSON(boost::property_tree::ptree &pt)
const override;
30 void fromJSON(
const boost::property_tree::ptree &pt)
override;
53 bool useHs =
true,
bool branchedPaths =
true,
54 bool useBondOrder =
true,
bool countSimulation =
false,
55 const std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
56 std::uint32_t fpSize = 2048,
57 std::uint32_t numBitsPerFeature = 2);
64 const ROMol &mol)
const override;
67 void toJSON(boost::property_tree::ptree &pt)
const override;
68 void fromJSON(
const boost::property_tree::ptree &pt)
override;
73template <
typename OutputType>
76 const OutputType d_bitId;
77 const boost::dynamic_bitset<> d_atomsInPath;
83 const std::vector<std::uint32_t> *atomInvariants,
84 const std::vector<std::uint32_t> *bondInvariants,
86 bool hashResults =
false,
87 const std::uint64_t fpSize = 0
90 std::uint64_t bitId)
const override;
103 d_atomsInPath(std::move(atomsInPath)),
104 d_bondPath(std::move(bondPath)) {}
107template <
typename OutputType>
126 const std::vector<std::uint32_t> *fromAtoms,
127 const std::vector<std::uint32_t> *ignoreAtoms,
int confId,
129 const std::vector<std::uint32_t> *atomInvariants,
130 const std::vector<std::uint32_t> *bondInvariants,
131 bool hashResults =
false)
const override;
134 void toJSON(boost::property_tree::ptree &pt)
const override;
135 void fromJSON(
const boost::property_tree::ptree &pt)
override;
174template <
typename OutputType>
176 unsigned int minPath = 1,
unsigned int maxPath = 7,
bool useHs =
true,
177 bool branchedPaths =
true,
bool useBondOrder =
true,
179 bool countSimulation =
false,
180 const std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
181 std::uint32_t fpSize = 2048, std::uint32_t numBitsPerFeature = 2,
182 bool ownsAtomInvGen =
false);
184template <
typename OutputType>
188 bool ownsAtomInvGen =
false);
abstract base class that generates atom-environments from a molecule
abstract base class that holds atom-environments that will be hashed to generate the fingerprint
abstract base class for atom invariants generators
Abstract base class that holds molecule independent arguments that are common amongst all fingerprint...
FingerprintArguments(bool countSimulation, const std::vector< std::uint32_t > countBounds, std::uint32_t fpSize, std::uint32_t numBitsPerFeature=1, bool includeChirality=false)
class that generates same fingerprint style for different output formats
void toJSON(boost::property_tree::ptree &pt) const override
void fromJSON(const boost::property_tree::ptree &pt) override
std::string infoString() const override
method that returns information string about the fingerprint specific argument set and the arguments ...
RDKitFPArguments(unsigned int minPath=1, unsigned int maxPath=7, bool useHs=true, bool branchedPaths=true, bool useBondOrder=true, bool countSimulation=false, const std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, std::uint32_t fpSize=2048, std::uint32_t numBitsPerFeature=2)
Construct a new RDKitFPArguments object.
RDKitFPAtomEnv(const OutputType bitId, boost::dynamic_bitset<> atomsInPath, INT_VECT bondPath)
Construct a new RDKitFPAtomEnv object.
OutputType getBitId(FingerprintArguments *arguments, const std::vector< std::uint32_t > *atomInvariants, const std::vector< std::uint32_t > *bondInvariants, AdditionalOutput *additionalOutput, bool hashResults=false, const std::uint64_t fpSize=0) const override
calculates and returns the bit id to be set for this atom-environment
void updateAdditionalOutput(AdditionalOutput *output, std::uint64_t bitId) const override
void fromJSON(const boost::property_tree::ptree &pt) override
std::vector< std::uint32_t > * getAtomInvariants(const ROMol &mol) const override
get atom invariants from a molecule
void toJSON(boost::property_tree::ptree &pt) const override
std::string infoString() const override
method that returns information about this /c AtomInvariantsGenerator and its arguments
RDKitFPAtomInvGenerator * clone() const override
OutputType getResultSize() const override
Returns the size of the fingerprint based on arguments.
void toJSON(boost::property_tree::ptree &pt) const override
void fromJSON(const boost::property_tree::ptree &pt) override
std::vector< AtomEnvironment< OutputType > * > getEnvironments(const ROMol &mol, FingerprintArguments *arguments, const std::vector< std::uint32_t > *fromAtoms, const std::vector< std::uint32_t > *ignoreAtoms, int confId, const AdditionalOutput *additionalOutput, const std::vector< std::uint32_t > *atomInvariants, const std::vector< std::uint32_t > *bondInvariants, bool hashResults=false) const override
Get the atom environments for a molecule.
std::string infoString() const override
method that returns information about this /c AtomEnvironmentGenerator and its arguments if any
#define RDKIT_FINGERPRINTS_EXPORT
RDKIT_FINGERPRINTS_EXPORT FingerprintGenerator< OutputType > * getRDKitFPGenerator(unsigned int minPath=1, unsigned int maxPath=7, bool useHs=true, bool branchedPaths=true, bool useBondOrder=true, AtomInvariantsGenerator *atomInvariantsGenerator=nullptr, bool countSimulation=false, const std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, std::uint32_t fpSize=2048, std::uint32_t numBitsPerFeature=2, bool ownsAtomInvGen=false)
Get a RDKit fingerprint generator with given parameters.
std::vector< int > INT_VECT