Re: [Rdkit-discuss] [RDKit Discuss]:Compound Fragmentation
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
From: Greg L. <gre...@gm...> - 2012-10-17 10:05:47
|
Hi Christos, On Tue, Oct 16, 2012 at 5:26 AM, Christos Kannas <chr...@gm...> wrote: > > I'm in the process of putting down the requirements for writing a module > which will provide access to the various compound fragmentation modules of > RDKit. > From my search through the documentation I've found support for BRICS, RECAP > and via FragmentCatalog, which generates fragments from a set of Functional > Groups (...\RDKit_2012_06_1_py27\Data\FunctionalGroups.txt). Interesting idea! > Are there any other modules that can be used to decompose compounds? There are a few functions that can be used to identify paths/subgraphs of molecules that can be combined with Chem.PathToSubmol to decompose compounds: Chem.FindAllSubgraphsOfLengthMToN, Chem.FindAllPathsOfLengthN (unfortunately not currently available in the MToN form), Chem.FindAtomEnvironmentOfRadius. Here's a short example: In [2]: m = Chem.MolFromSmiles('c1ccccc1OC') In [3]: ps = Chem.FindAllSubgraphsOfLengthMToN(m,2,4) In [4]: ps[0] Out[4]: [(0, 1), (0, 7), (1, 2), (2, 3), (3, 4), (4, 7), (4, 5), (5, 6), (5, 7)] In [5]: ps[1] Out[5]: [(0, 1, 2), (0, 1, 7), (0, 7, 5), (0, 7, 4), (1, 2, 3), (2, 3, 4), (3, 4, 7), (3, 4, 5), (4, 7, 5), (4, 5, 6), (5, 6, 7)] In [6]: smol = Chem.PathToSubmol(m,ps[1][1]) In [7]: Chem.MolToSmiles(smol) Out[7]: 'cccc' -greg |