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 size_t bitId)
const override;
103 d_atomsInPath(std::move(atomsInPath)),
104 d_bondPath(std::move(bondPath)) {}
107template <
typename OutputType>
113 const std::vector<std::uint32_t> *fromAtoms,
114 const std::vector<std::uint32_t> *ignoreAtoms,
int confId,
116 const std::vector<std::uint32_t> *atomInvariants,
117 const std::vector<std::uint32_t> *bondInvariants,
118 bool hashResults =
false)
const override;
121 void toJSON(boost::property_tree::ptree &pt)
const override;
122 void fromJSON(
const boost::property_tree::ptree &pt)
override;
161template <
typename OutputType>
163 unsigned int minPath = 1,
unsigned int maxPath = 7,
bool useHs =
true,
164 bool branchedPaths =
true,
bool useBondOrder =
true,
166 bool countSimulation =
false,
167 const std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
168 std::uint32_t fpSize = 2048, std::uint32_t numBitsPerFeature = 2,
169 bool ownsAtomInvGen =
false);
171template <
typename OutputType>
175 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, size_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
generate and return all atom-envorinments from 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