Hi Nitzan,
I'm not sure that this the 100% best solution to the problem, but you can
do something like the following:
In [10]: m = Chem.MolFromSmiles('c1ccccc1')
In [11]: Chem.Kekulize(m)
In [16]: rxn =
AllChem.ReactionFromSmarts('[c:1]1=[c:2][c:3]=[c:4][c:5]=[c:6]1>>[C:1]=[C:2][C:3]=[C:4][C:5]=[C:6]')
In [17]: ps = rxn.RunReactants((m,))
In [18]: Chem.MolToSmiles(ps[0][0])
Out[18]: 'C=CC=CC=C'
I'm doing a bit of a trick where I use aromatic atoms (which are still
present by default after kekulization) in the reactants and then convert
those to aliphatic atoms in the products.
This, of course, only recognizes benzene rings, but it is nice that it
automatically de-aromatizes the atoms. I haven't quickly come up with a
good simple solution to handle generic rings with reactions.
Another approach would be to skip the reaction machinery and just modify
the molecule yourself. Something like this:
In [30]: m = Chem.MolFromSmiles('c1ccccc1')
In [31]: nm = Chem.Mol(m)
In [32]: Chem.Kekulize(nm,clearAromaticFlags=True)
In [34]: final_mols=[]
In [35]: ri = m.GetRingInfo()
In [37]: for bond in m.GetBonds():
...: if bond.GetIsAromatic() and ri.NumBondRings(bond.GetIdx())==1:
...: emol = Chem.RWMol(nm)
...:
emol.RemoveBond(bond.GetBeginAtomIdx(),bond.GetEndAtomIdx())
...: final_mols.append(emol)
...:
In [38]: len(final_mols)
Out[38]: 6
In [40]: [Chem.SanitizeMol(m) for m in final_mols]
Out[40]:
[rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE,
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE,
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE,
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE,
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE,
rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE]
In [41]: Chem.MolToSmiles(final_mols[0])
Out[41]: 'CC=CC=CC'
There's more tuning required, but this can hopefully be a start.
-greg
On Wed, Dec 7, 2016 at 9:22 AM, Nitzan Tzanani <[email protected]> wrote:
> Hi,
>
> I am using rdkit to emulate fragmentation of molecules, and it is working
> great.
> While working with opening of aromatic rings, it seems to me that it would
> be simpler to work on the molecule after it was kekulized.
> My question is: how do I write a reaction on a kekulized molecule.
>
> For example:
> c1ccccc1 --> (kekulization) C1=C-C=C-C=C1 --> C=C=C=C-C=C
>
> I hope you can help me to solve that problem.
>
> Yours,
>
> Nitzan
>
> ------------------------------------------------------------
> ------------------
> 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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss