rdkit.Chem.rdTautomerQuery module¶
Module for tautomer-aware substructure searching.
Provides the TautomerQuery class which enables substructure searching that accounts for tautomeric forms of the query molecule.
- class rdkit.Chem.rdTautomerQuery.TautomerQuery(self)¶
- class rdkit.Chem.rdTautomerQuery.TautomerQuery(self, pickle: bytes)
- class rdkit.Chem.rdTautomerQuery.TautomerQuery(self, pickle: str)
- class rdkit.Chem.rdTautomerQuery.TautomerQuery(self, mol: rdkit.Chem.rdchem.Mol, tautomerTransformFile: str = '')
Bases:
objectThe Tautomer Query Class. Creates a query that enables structure search accounting for matching of Tautomeric forms
Overloaded function.
__init__(self) -> None__init__(self, pickle: bytes) -> None
Construct a TautomerQuery from a pickle bytes.
__init__(self, pickle: str) -> None
Construct a TautomerQuery from a pickle string.
__init__(self, mol: rdkit.Chem.rdchem.Mol, tautomerTransformFile: str = '') -> None
Construct a TautomerQuery from a molecule.
- GetModifiedAtoms(self) list[int]¶
Return the indices of tautomeric atoms.
- GetModifiedBonds(self) list[int]¶
Return the indices of tautomeric bonds.
- GetSubstructMatch(self, target: rdkit.Chem.rdchem.Mol, useChirality: bool = False, useQueryQueryMatches: bool = False) list[int]¶
- GetSubstructMatch(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) list[int]
Overloaded function.
GetSubstructMatch(self, target: rdkit.Chem.rdchem.Mol, useChirality: bool = False, useQueryQueryMatches: bool = False) -> list[int]
Return the first substructure match of this tautomer query in the target.
- Parameters:
target (-) – the target molecule
useChirality (-) – (optional) use chirality in matching (default False)
useQueryQueryMatches (-) – (optional) use query-query matching logic (default False)
RETURNS: a tuple of atom indices on match, or empty tuple on no match
GetSubstructMatch(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) -> list[int]
Return the first substructure match of this tautomer query in the target.
- Parameters:
target (-) – the target molecule
params (-) – SubstructMatchParameters object
RETURNS: a tuple of atom indices on match, or empty tuple on no match
- GetSubstructMatches(self, target: rdkit.Chem.rdchem.Mol, uniquify: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False, maxMatches: int = 1000) list[list[int]]¶
- GetSubstructMatches(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) list[list[int]]
Overloaded function.
GetSubstructMatches(self, target: rdkit.Chem.rdchem.Mol, uniquify: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False, maxMatches: int = 1000) -> list[list[int]]
Return all substructure matches of this tautomer query in the target.
- Parameters:
target (-) – the target molecule
uniquify (-) – (optional) only return unique matches (default True)
useChirality (-) – (optional) use chirality in matching (default False)
useQueryQueryMatches (-) – (optional) use query-query matching logic (default False)
maxMatches (-) – (optional) maximum number of matches to return (default 1000)
RETURNS: a tuple of tuples of atom indices
GetSubstructMatches(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) -> list[list[int]]
Return all substructure matches of this tautomer query in the target.
- Parameters:
target (-) – the target molecule
params (-) – SubstructMatchParameters object
RETURNS: a tuple of tuples of atom indices
- GetSubstructMatchesWithTautomers(self, target: rdkit.Chem.rdchem.Mol, uniquify: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False, maxMatches: int = 1000) list[tuple[list[int], rdkit.Chem.rdchem.Mol]]¶
- GetSubstructMatchesWithTautomers(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) list[tuple[list[int], rdkit.Chem.rdchem.Mol]]
Overloaded function.
GetSubstructMatchesWithTautomers(self, target: rdkit.Chem.rdchem.Mol, uniquify: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False, maxMatches: int = 1000) -> list[tuple[list[int], rdkit.Chem.rdchem.Mol]]
Return all substructure matches with their matching tautomers.
- Parameters:
target (-) – the target molecule
uniquify (-) – (optional) only return unique matches (default True)
useChirality (-) – (optional) use chirality in matching (default False)
useQueryQueryMatches (-) – (optional) use query-query matching logic (default False)
maxMatches (-) – (optional) maximum number of matches to return (default 1000)
RETURNS: a list of (match, tautomer) pairs
GetSubstructMatchesWithTautomers(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) -> list[tuple[list[int], rdkit.Chem.rdchem.Mol]]
Return all substructure matches with their matching tautomers.
- Parameters:
target (-) – the target molecule
params (-) – SubstructMatchParameters object
RETURNS: a list of (match, tautomer) pairs
- GetTautomers(self) list[rdkit.Chem.rdchem.Mol]¶
Return the list of tautomers of the query molecule.
- GetTemplateMolecule(self) rdkit.Chem.rdchem.Mol¶
Return the template molecule used for substructure searching.
- IsSubstructOf(self, target: rdkit.Chem.rdchem.Mol, recursionPossible: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False) bool¶
- IsSubstructOf(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) bool
Overloaded function.
IsSubstructOf(self, target: rdkit.Chem.rdchem.Mol, recursionPossible: bool = True, useChirality: bool = False, useQueryQueryMatches: bool = False) -> bool
Check if this tautomer query is a substructure of the target molecule.
- Parameters:
target (-) – the target molecule
recursionPossible (-) – (optional) allow recursive queries (default True)
useChirality (-) – (optional) use chirality in matching (default False)
useQueryQueryMatches (-) – (optional) use query-query matching logic (default False)
RETURNS: True or False
IsSubstructOf(self, target: rdkit.Chem.rdchem.Mol, params: rdkit.Chem.rdchem.SubstructMatchParameters) -> bool
Check if this tautomer query is a substructure of the target molecule.
- Parameters:
target (-) – the target molecule
params (-) – SubstructMatchParameters object
RETURNS: True or False
- PatternFingerprintTemplate(self, fingerprintSize: int = 2048) rdkit.DataStructs.cDataStructs.ExplicitBitVect¶
Return the pattern fingerprint of the template molecule.
- Parameters:
fingerprintSize (-) – (optional) size of the fingerprint (default 2048)
RETURNS: an ExplicitBitVect fingerprint
- ToBinary(self) bytes¶
Return a binary string (pickle) representation of this TautomerQuery.