Hi Mel,

You can use

Chem.MolFragmentToSmiles(mol, match)

where match is a tuple of atom indices returned by GetSubstructMatch().

Cheers,
p.

> On 7 Aug 2019, at 11:36, Melissa Adasme <meliada...@gmail.com> wrote:
> 
> Dear rdkitters,
> 
> I'm trying to find substructures (query molecules built from SMARTS) matching 
> my molecules (SMILES). I found the GetSubstructMatches() method which works 
> pretty well returning the indices of matching atoms in my molecule. 
> 
> I wonder if there is a way to directly obtain the SMILES of the found 
> substructures instead of the atom indexes or maybe a way to transform the 
> indexes to smiles?
> 
> Many thanks in advance!
> Mel
> 
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to