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;
112 bool df_useBondTypes =
true;
135 bool includeChirality =
false,
136 bool onlyNonzeroInvariants =
false,
137 std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
138 std::uint32_t fpSize = 2048,
139 bool includeRedundantEnvironments =
false,
140 bool useBondTypes =
true)
143 df_onlyNonzeroInvariants(onlyNonzeroInvariants),
145 df_includeRedundantEnvironments(includeRedundantEnvironments),
146 df_useBondTypes(useBondTypes) {};
154template <
typename OutputType>
157 const OutputType d_code;
158 const unsigned int d_atomId;
159 const unsigned int d_layer;
164 const std::vector<std::uint32_t> *atomInvariants,
165 const std::vector<std::uint32_t> *bondInvariants,
167 const bool hashResults =
false,
168 const std::uint64_t fpSize = 0
171 size_t bitId)
const override;
181 const unsigned int layer);
188template <
typename OutputType>
194 const std::vector<std::uint32_t> *fromAtoms,
195 const std::vector<std::uint32_t> *ignoreAtoms,
const int confId,
197 const std::vector<std::uint32_t> *atomInvariants,
198 const std::vector<std::uint32_t> *bondInvariants,
199 const bool hashResults =
false)
const override;
252template <
typename OutputType>
259 std::uint32_t fpSize = 2048,
260 std::vector<std::uint32_t>
countBounds = {1, 2, 4, 8},
263template <
typename OutputType>
315template <
typename OutputType>
322 std::uint32_t fpSize = 2048,
323 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=3, 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, bool useBondTypes=true)
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)