Hi Michal,

You can use rdkit.Chem.rdmolfiles.MolFragmentToSmiles (or related 
MolFragmentToSmarts) and specify an atom id list with "atomsToUse":

e.g.

rdkit.Chem.rdmolfiles.MolFragmentToSmiles(mol, atomsToUse=[11,13,22,15])

Kangway
________________________________
From: Michal Krompiec <michal.kromp...@gmail.com>
Sent: Thursday, June 4, 2020 10:45 AM
To: RDKit Discuss <rdkit-discuss@lists.sourceforge.net>
Subject: [Rdkit-discuss] PathToSubmol on atom indices?

Hello, I noticed this was discussed before and I'm wondering if anything's 
changed.
Is it possible to extract a substructure from a molecule, based on atom 
indices? I understand that Chem.PathToSubmol does something similar, but takes 
bond indices.
Best,
Michal
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to