Hi,
On Fri, May 31, 2013 at 7:02 AM, Yingfeng Wang <[email protected]> wrote:
> I am looking for a simple way to separate a module by breaking bonds.
>
> Say, I have a compound with the following inchi format,
>
>
> InChI=1S/C10H9N3O/c1-7-11-10(14)9(13-12-7)8-5-3-2-4-6-8/h2-6H,1H3,(H,11,12,14)
>
> I want to separate it into two parts by removing one or two bonds. And I
> want to enumberate all possibilities. May I use BreakBRICSBonds by
> specifying argument 'bonds'?
>
> Actually, BreakBRICSBonds returns a Mol, how do I know mass of each part
> after bonds are removed?
>
>
Once you have a molecule that is made up of different pieces, you can get
it as separate molecules using Chem.GetMolFrags:
Here's a demo using your example:
In [42]: m
=Chem.MolFromInchi('InChI=1S/C10H9N3O/c1-7-11-10(14)9(13-12-7)8-5-3-2-4-6-8/h2-6H,1H3,(H,11,12,14)')
In [43]: broken = BRICS.BreakBRICSBonds(m)
In [44]: frags = Chem.GetMolFrags(broken,asMols=True)
In [45]: frags
Out[45]: (<rdkit.Chem.rdchem.Mol at 0x1e62398>, <rdkit.Chem.rdchem.Mol at
0x2335d70>)
In [47]: [Chem.MolToSmiles(x,True) for x in frags]
Out[47]: ['[14*]c1nnc(C)nc1O', '[16*]c1ccccc1']
If you want to exhaustively explore breaking bonds or pairs of bonds, I'd
suggest using an EditableMol instead of the BRICS code (which is really
designed for breaking a particular set of bonds).
In [53]: m =Chem.MolFromSmiles('c1ccccc1c2ncccc2')
In [54]: em = Chem.EditableMol(m)
In [55]: em.RemoveBond(5,6)
In [56]: nm = em.GetMol()
In [57]: frags = Chem.GetMolFrags(nm,asMols=True)
In [58]: [Chem.MolToSmiles(x,True) for x in frags]
Out[58]: ['c1ccccc1', 'c1ccncc1']
There are a number of examples of using EditableMol in the archives of this
list (searchable here:
http://www.mail-archive.com/[email protected]/) and in
the RDkit documentation.
hope this helps,
-greg
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss