Juuso,

I think you will find Chem.PathToSubmol(), which takes a molecule and
sequence of *bond* indices, useful:

In [6]: m = Chem.MolFromSmiles('COCc1ccccc1')

In [8]: sm = Chem.PathToSubmol(m,(0,1))

In [9]: sm.UpdatePropertyCache()

In [10]: sm.Debug()
Atoms:
0 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
1 8 O chg: 0  deg: 2 exp: 2 imp: 0 hyb: 4 arom?: 0 chi: 0
2 6 C chg: 0  deg: 1 exp: 1 imp: 3 hyb: 4 arom?: 0 chi: 0
Bonds:
0 0->1 order: 1 conj?: 0 aromatic?: 0
1 1->2 order: 1 conj?: 0 aromatic?: 0


Best,
-greg


On Tue, Nov 1, 2016 at 11:00 AM, Juuso Lehtivarjo <
juuso.lehtiva...@gmail.com> wrote:

> Hi All,
>
> Is there a python function (or any simple way whatsoever) to create a
> substructure mol object from another one based on the given atom
> indices? In C++ this could apparently be done with
> getMolFragsWithQuery, but that does not seem to be much used in python
> wrappers...
>
> Best,
>    Juuso
>
> ------------------------------------------------------------
> ------------------
> Developer Access Program for Intel Xeon Phi Processors
> Access to Intel Xeon Phi processor-based developer platforms.
> With one year of Intel Parallel Studio XE.
> Training and support from Colfax.
> Order your platform today. http://sdm.link/xeonphi
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
------------------------------------------------------------------------------
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today. http://sdm.link/xeonphi
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to