13#ifndef RDKIT_TAUTOMERQUERY_H
14#define RDKIT_TAUTOMERQUERY_H
28 std::vector<ROMOL_SPTR> d_tautomers;
30 std::unique_ptr<const ROMol> d_templateMolecule;
32 const std::vector<size_t> d_modifiedAtoms;
33 const std::vector<size_t> d_modifiedBonds;
36 bool matchTautomer(
const ROMol &mol,
const ROMol &tautomer,
37 const std::vector<unsigned int> &match,
42 const ROMol *
const templateMolecule,
43 std::vector<size_t> modifiedAtoms,
44 std::vector<size_t> modifiedBonds);
48 : d_templateMolecule(other.d_templateMolecule
49 ? new
ROMol(*other.d_templateMolecule)
51 d_modifiedAtoms(other.d_modifiedAtoms),
52 d_modifiedBonds(other.d_modifiedBonds) {
53 PRECONDITION(other.d_templateMolecule !=
nullptr,
"Null template");
54 for (
auto taut : other.d_tautomers) {
56 d_tautomers.push_back(boost::make_shared<ROMol>(*taut));
63 const ROMol &molecule,
64 const std::string &tautomerTransformFile = std::string());
70 std::vector<ROMOL_SPTR> *matchingTautomers =
nullptr)
const;
78 unsigned int fpSize = 2048U)
const;
81 unsigned int fpSize = 2048U);
88 const std::vector<ROMOL_SPTR>
getTautomers()
const {
return d_tautomers; }
94 friend class TautomerQueryMatcher;
#define PRECONDITION(expr, mess)
Defines the primary molecule class ROMol as well as associated typedefs.
a class for bit vectors that are densely occupied
ExplicitBitVect * patternFingerprintTemplate(unsigned int fpSize=2048U) const
TautomerQuery(const TautomerQuery &other)
Copy constructor performs a deep copy.
const std::vector< size_t > getModifiedAtoms() const
const ROMol & getTemplateMolecule() const
const std::vector< size_t > getModifiedBonds() const
bool isSubstructOf(const ROMol &mol, const SubstructMatchParameters ¶ms=SubstructMatchParameters())
const std::vector< ROMOL_SPTR > getTautomers() const
TautomerQuery(std::vector< ROMOL_SPTR > tautomers, const ROMol *const templateMolecule, std::vector< size_t > modifiedAtoms, std::vector< size_t > modifiedBonds)
static ExplicitBitVect * patternFingerprintTarget(const ROMol &target, unsigned int fpSize=2048U)
static TautomerQuery * fromMol(const ROMol &molecule, const std::string &tautomerTransformFile=std::string())
std::vector< MatchVectType > substructOf(const ROMol &mol, const SubstructMatchParameters ¶ms=SubstructMatchParameters(), std::vector< ROMOL_SPTR > *matchingTautomers=nullptr) const
#define RDKIT_TAUTOMERQUERY_EXPORT
RDKIT_SUBSTRUCTMATCH_EXPORT std::vector< MatchVectType > SubstructMatch(const ROMol &mol, const ROMol &query, const SubstructMatchParameters ¶ms=SubstructMatchParameters())
Find a substructure match for a query in a molecule.