12 #ifndef RD_MORGANGEN_H_2018_07
13 #define RD_MORGANGEN_H_2018_07
20 namespace MorganFingerprint {
29 const bool df_includeRingMembership;
53 std::vector<const ROMol *> *dp_patterns;
78 const bool df_useBondTypes;
79 const bool df_useChirality;
91 const bool useChirality =
false);
104 template <
typename OutputType>
132 const bool includeChirality =
false,
133 const bool onlyNonzeroInvariants =
false,
134 const std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
135 const std::uint32_t fpSize = 2048);
143 template <
typename OutputType>
146 const OutputType d_code;
147 const unsigned int d_atomId;
148 const unsigned int d_layer;
152 const std::vector<std::uint32_t> *atomInvariants,
153 const std::vector<std::uint32_t> *bondInvariants,
155 const bool hashResults =
false)
const;
165 const unsigned int layer);
172 template <
typename OutputType>
178 const std::vector<std::uint32_t> *fromAtoms,
179 const std::vector<std::uint32_t> *ignoreAtoms,
const int confId,
181 const std::vector<std::uint32_t> *atomInvariants,
182 const std::vector<std::uint32_t> *bondInvariants,
183 const bool hashResults =
false)
const;
227 template <
typename OutputType>
229 const unsigned int radius,
const bool countSimulation =
false,
230 const bool includeChirality =
false,
const bool useBondTypes =
true,
231 const bool onlyNonzeroInvariants =
false,
234 const std::uint32_t fpSize = 2048,
235 const std::vector<std::uint32_t> countBounds = {1, 2, 4, 8},
236 const bool ownsAtomInvGen =
false,
const bool ownsBondInvGen =
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 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.
const bool df_onlyNonzeroInvariants
const unsigned int d_radius
OutputType getResultSize() const
Returns the size of the fingerprint based on arguments.
std::string infoString() const
method that returns information string about the fingerprint specific argument set and the arguments ...
MorganArguments(const unsigned int radius, const bool countSimulation=false, const bool includeChirality=false, const bool onlyNonzeroInvariants=false, const std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, const std::uint32_t fpSize=2048)
Construct a new MorganArguments object.
const bool df_includeChirality
Class for holding the bit-id created from Morgan fingerprint environments and the additional data nec...
MorganAtomEnv(const std::uint32_t code, const unsigned int atomId, const unsigned int layer)
Construct a new MorganAtomEnv object.
OutputType getBitId(FingerprintArguments< OutputType > *arguments, const std::vector< std::uint32_t > *atomInvariants, const std::vector< std::uint32_t > *bondInvariants, const AdditionalOutput *additionalOutput, const bool hashResults=false) const
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.
std::vector< std::uint32_t > * getAtomInvariants(const ROMol &mol) const
get atom invariants from a molecule
MorganAtomInvGenerator * clone() const
std::string infoString() const
method that returns information about this /c AtomInvariantsGenerator and its arguments
Bond invariants generator for Morgan fingerprint.
MorganBondInvGenerator * clone() const
std::string infoString() const
method that returns information about this /c BondInvariantsGenerator and its arguments
MorganBondInvGenerator(const bool useBondTypes=true, const bool useChirality=false)
Construct a new MorganBondInvGenerator object.
~MorganBondInvGenerator()
std::vector< std::uint32_t > * getBondInvariants(const ROMol &mol) const
get bond invariants from a molecule
Class that generates atom environments for Morgan fingerprint.
std::string infoString() const
method that returns information about this /c AtomEnvironmentGenerator and its arguments if any
std::vector< AtomEnvironment< OutputType > * > getEnvironments(const ROMol &mol, FingerprintArguments< OutputType > *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
generate and return all atom-envorinments from a molecule
Alternative atom invariants generator for Morgan fingerprint, generate FCFP-type invariants.
MorganFeatureAtomInvGenerator * clone() const
MorganFeatureAtomInvGenerator(std::vector< const ROMol * > *patterns=nullptr)
Construct a new MorganFeatureAtomInvGenerator object.
std::string infoString() const
method that returns information about this /c AtomInvariantsGenerator and its arguments
std::vector< std::uint32_t > * getAtomInvariants(const ROMol &mol) const
get atom invariants from a molecule
#define RDKIT_FINGERPRINTS_EXPORT
RDKIT_FINGERPRINTS_EXPORT FingerprintGenerator< OutputType > * getMorganGenerator(const unsigned int radius, const bool countSimulation=false, const bool includeChirality=false, const bool useBondTypes=true, const bool onlyNonzeroInvariants=false, AtomInvariantsGenerator *atomInvariantsGenerator=nullptr, BondInvariantsGenerator *bondInvariantsGenerator=nullptr, const std::uint32_t fpSize=2048, const std::vector< std::uint32_t > countBounds={1, 2, 4, 8}, const bool ownsAtomInvGen=false, const bool ownsBondInvGen=false)
Get a fingerprint generator for Morgan fingerprint.