12#ifndef RD_MORGANGEN_H_2018_07
13#define RD_MORGANGEN_H_2018_07
20namespace MorganFingerprint {
29 const bool df_includeRingMembership;
41 const ROMol &mol)
const override;
54 std::vector<const ROMol *> *dp_patterns;
68 const ROMol &mol)
const override;
80 const bool df_useBondTypes;
81 const bool df_useChirality;
93 const bool useChirality =
false);
96 const ROMol &mol)
const override;
109 bool df_onlyNonzeroInvariants =
false;
110 unsigned int d_radius = 3;
111 bool df_includeRedundantEnvironments =
false;
133 bool includeChirality =
false,
134 bool onlyNonzeroInvariants =
false,
135 std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
136 std::uint32_t fpSize = 2048,
137 bool includeRedundantEnvironments =
false)
140 df_onlyNonzeroInvariants(onlyNonzeroInvariants),
142 df_includeRedundantEnvironments(includeRedundantEnvironments) {};
150template <
typename OutputType>
153 const OutputType d_code;
154 const unsigned int d_atomId;
155 const unsigned int d_layer;
160 const std::vector<std::uint32_t> *atomInvariants,
161 const std::vector<std::uint32_t> *bondInvariants,
163 const bool hashResults =
false,
164 const std::uint64_t fpSize = 0
167 size_t bitId)
const override;
177 const unsigned int layer);
184template <
typename OutputType>
190 const std::vector<std::uint32_t> *fromAtoms,
191 const std::vector<std::uint32_t> *ignoreAtoms,
const int confId,
193 const std::vector<std::uint32_t> *atomInvariants,
194 const std::vector<std::uint32_t> *bondInvariants,
195 const bool hashResults =
false)
const override;
248template <
typename OutputType>
255 std::uint32_t fpSize = 2048,
256 std::vector<std::uint32_t>
countBounds = {1, 2, 4, 8},
304template <
typename OutputType>
311 std::uint32_t fpSize = 2048,
312 std::vector<std::uint32_t>
countBounds = {1, 2, 4, 8},
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 for bond invariants generators
Abstract base class that holds molecule independent arguments that are common amongst all fingerprint...
class that generates same fingerprint style for different output formats
Class for holding Morgan fingerprint specific arguments.
MorganArguments(unsigned int radius, bool countSimulation=false, bool includeChirality=false, bool onlyNonzeroInvariants=false, std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, std::uint32_t fpSize=2048, bool includeRedundantEnvironments=false)
Construct a new MorganArguments object.
std::string infoString() const override
method that returns information string about the fingerprint specific argument set and the arguments ...
Class for holding the bit-id created from Morgan fingerprint environments and the additional data nec...
void updateAdditionalOutput(AdditionalOutput *output, size_t bitId) const override
MorganAtomEnv(const std::uint32_t code, const unsigned int atomId, const unsigned int layer)
Construct a new MorganAtomEnv object.
OutputType getBitId(FingerprintArguments *arguments, const std::vector< std::uint32_t > *atomInvariants, const std::vector< std::uint32_t > *bondInvariants, AdditionalOutput *additionalOutput, const bool hashResults=false, const std::uint64_t fpSize=0) const override
calculates and returns the bit id to be set for this atom-environment
Default atom invariants generator for Morgan fingerprint, generates ECFP-type invariants.
MorganAtomInvGenerator(const bool includeRingMembership=true)
Construct a new MorganAtomInvGenerator object.
MorganAtomInvGenerator * clone() const override
std::string infoString() const override
method that returns information about this /c AtomInvariantsGenerator and its arguments
std::vector< std::uint32_t > * getAtomInvariants(const ROMol &mol) const override
get atom invariants from a molecule
Bond invariants generator for Morgan fingerprint.
std::string infoString() const override
method that returns information about this /c BondInvariantsGenerator and its arguments
MorganBondInvGenerator * clone() const override
MorganBondInvGenerator(const bool useBondTypes=true, const bool useChirality=false)
Construct a new MorganBondInvGenerator object.
~MorganBondInvGenerator() override=default
std::vector< std::uint32_t > * getBondInvariants(const ROMol &mol) const override
get bond invariants from a molecule
Class that generates atom environments for Morgan fingerprint.
std::string infoString() const override
method that returns information about this /c AtomEnvironmentGenerator and its arguments if any
OutputType getResultSize() const override
Returns the size of the fingerprint based on arguments.
std::vector< AtomEnvironment< OutputType > * > getEnvironments(const ROMol &mol, FingerprintArguments *arguments, const std::vector< std::uint32_t > *fromAtoms, const std::vector< std::uint32_t > *ignoreAtoms, const int confId, const AdditionalOutput *additionalOutput, const std::vector< std::uint32_t > *atomInvariants, const std::vector< std::uint32_t > *bondInvariants, const bool hashResults=false) const override
generate and return all atom-envorinments from a molecule
Alternative atom invariants generator for Morgan fingerprint, generate FCFP-type invariants.
MorganFeatureAtomInvGenerator(std::vector< const ROMol * > *patterns=nullptr)
Construct a new MorganFeatureAtomInvGenerator object.
std::vector< std::uint32_t > * getAtomInvariants(const ROMol &mol) const override
get atom invariants from a molecule
MorganFeatureAtomInvGenerator * clone() const override
std::string infoString() const override
method that returns information about this /c AtomInvariantsGenerator and its arguments
#define RDKIT_FINGERPRINTS_EXPORT
RDKIT_FINGERPRINTS_EXPORT FingerprintGenerator< OutputType > * getMorganGenerator(unsigned int radius, bool countSimulation, bool includeChirality, bool useBondTypes, bool onlyNonzeroInvariants, bool includeRedundantEnvironments, AtomInvariantsGenerator *atomInvariantsGenerator=nullptr, BondInvariantsGenerator *bondInvariantsGenerator=nullptr, std::uint32_t fpSize=2048, std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, bool ownsAtomInvGen=false, bool ownsBondInvGen=false)
Get a fingerprint generator for Morgan fingerprint.
bool rdvalue_is(const RDValue_cast_t)