The function you want is FindAllSubgraphsOfLengthMToN
http://www.rdkit.org/Python_Docs/rdkit.Chem.rdmolops-module.html#FindAllSubgraphsOfLengthMToN
This returns bond indices, to convert them into a molecule see Chem.PathToSubmol
An example of use is here:
https://sourceforge.net/p/rdkit/mailman/message/29977419/
Once you have a molecule you can make a smarts pattern with MolToSmarts
although this is probably not necessary as you probably want to make a
canonical smiles for comparison purposes.
----
Brian Kelley
> On Jun 3, 2016, at 2:37 PM, Yannick .Djoumbou <y.djoum...@gmail.com> wrote:
>
> Hi all,
>
> Recently started using RDKit and I am quite happy with all the functions it
> provides. Thanks for contributing to the development of such a great tool.
>
> I have two distinct sets of compounds, one active and another is inactive,
> and I am trying to get a list of fragments (branched, unbranched, cyclic,
> acyclic) represented as SMARTS, that can help distinguish elements from those
> two sets.
>
> 1) First, given a compound x, is there a method that could return all the
> possible fragments from (lets ay from a min length to a max length) as SMARTS
> ?
>
> 2) Is there a function that takes a set of compounds and returns a list of
> patterns with their distribution across the set?
>
> 2) Cold you suggest a good method to approach this problem I presented
> earlier using RDKit?
>
>
> Thank you for your consideration.
>
> Regards,
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss