Boy is the list busy today. I love it! :-)
Because chirality is represented relative to the ordering of the bonds
around an atom, it's pretty difficult to do this if you want to actually
break and add bonds on your own. This would probably be somewhat easier if
there were an RWMol.ReplaceBond() method analogous to the
RWMol.ReplaceAtom() method, but that's not available at the moment.
However! I think you can do the fragmentation you want with the function
Chem.FragmentOnSomeBonds(). Here's your example:
In [23]: mol = Chem.MolFromSmiles("F[C@](Cl)(Br)I")
In [24]: r =
Chem.FragmentOnSomeBonds(mol,(mol.GetBondBetweenAtoms(1,0).GetIdx(),))
In [25]: r
Out[25]: (<rdkit.Chem.rdchem.Mol at 0x7f6f27d580e0>,)
In [26]: Chem.MolToSmiles(r[0],True)
Out[26]: '[*][C@](Cl)(Br)I.[1*]F'
I think that this is what you're looking for.
Best,
-greg
p.s. this all reminds me that there's a long email from Andrew on this
topic that I still haven't worked my way all the way through. <sigh>
On Tue, Jun 21, 2016 at 4:50 PM, Kramer, Christian <
[email protected]> wrote:
> Hi RDKitters,
>
> I am having trouble with chirality conservation during fragmentation of
> molecules. Is there a simple way of preserving chirality during splits on
> chiral atoms? Am I missing a simple function? Andrew has brought this topic
> has come up on the mailing list before, but so far there has not been a
> simple answer...
>
> Here is an example where chirality is not preserved:
>
> -------------------
> > import rdkit
> > rdkit.__version__
> Out[2]: '2016.03.1'
>
> > from rdkit import Chem
> > mol = Chem.MolFromSmiles("F[C@](Cl)(Br)I")
> > Chem.MolToSmiles(mol,isomericSmiles=True)
> Out[5]: 'F[C@](Cl)(Br)I'
>
> > emol = Chem.EditableMol(mol)
> > emol.RemoveBond(1,0)
> > emol.AddAtom(Chem.Atom(0))
> Out[8]: 5
>
> > emol.AddAtom(Chem.Atom(0))
> Out[9]: 6
>
> > emol.AddBond(0,5,Chem.BondType.SINGLE)
> Out[10]: 4
>
> > emol.AddBond(1,6,Chem.BondType.SINGLE)
> Out[11]: 5
>
> > new_mol = emol.GetMol()
> > Chem.MolToSmiles(new_mol,isomericSmiles=True)
> Out[13]: '[*]F.[*][C@@](Cl)(Br)I'
> ---------------------
>
> Best regards,
> Christian
>
>
> *Dr. Christian Kramer*
>
> Computer-Aided Drug Design (CADD) Scientist
>
>
> F. Hoffmann-La Roche Ltd
>
> Pharma Research and Early Development
> Bldg. 092/2.56
>
> CH-4070 Basel.
>
>
> ------------------------------------------------------------------------------
> Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
> Francisco, CA to explore cutting-edge tech and listen to tech luminaries
> present their vision of the future. This family event has something for
> everyone, including kids. Get more information and register today.
> http://sdm.link/attshape
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss