Hi JP,

I think smol = Chem.PathToSubmol(mol, path), where path is a list of
indices, will do what you want.

Best,

Christos

Christos Kannas

Researcher
Ph.D Student

Mob (UK): +44 (0) 7447700937
Mob (Cyprus): +357 99530608

[image: View Christos Kannas's profile on
LinkedIn]<http://cy.linkedin.com/in/christoskannas>


On 16 April 2014 16:44, JP <[email protected]> wrote:

>
> Hi there RDKitters,
>
> This is probably an easy one, but I cannot find anything in the docs or
> the mailing list.
>
> I have a tuple of atom Ids (e.g. 21,22,24,26,27) and a mol and I would
> like to extract the substructure (molecule) which matches those indices.
>  Note that in my case this will be a connected subgraph of the molecule (no
> fragmentation).
>
> This is pretty much the opposite of GetSubstruct family of methods which
> give Mol -> Indices.  I want Indices -> Mol.
>
> Is there a convenience method to do this?
>
> -
> Jean-Paul Ebejer
> Early Stage Researcher
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to