James, On Fri, Nov 26, 2010 at 5:28 PM, James Davidson <j.david...@vernalis.com> wrote: > > I wonder if anybody can help with the following? I am trying to figure-out > how to handle double-bond stereochemistry in reactions when the > stereochemistry is involved with the making / breaking bond. Hopefully this > example will explain better than that sentence(!): > > rxn = AllChem.ReactionFromSmarts('[c:1][Cl,Br,I].[#6:2][B]>>[*:1][*:2]') > mol1 = Chem.MolFromSmiles('c1ccccc1Br') > mol2 = Chem.MolFromSmiles('C\C=C\B(O)O') > ps = rxn.RunReactants((mol1, mol2)) > Chem.MolToSmiles(ps[0][0], True) > > ---> 'CC=Cc1ccccc1' (stereochemical information lost) > > whereas using mol2 = Chem.MolFromSmiles('C\C=C\c1ccccc1B(O)O') gives > > ---> 'C/C=C/c1c(-c2ccccc2)cccc1' (stereochemical information retained)
yeah. Here's an even shorter illustration of correct behavior: In [11]: mol2 = Chem.MolFromSmiles(r'C\C=C\CB(O)O') In [12]: ps = rxn.RunReactants((mol1, mol2)) In [13]: Chem.MolToSmiles(ps[0][0], True) Out[13]: 'C/C=C/Cc1ccccc1' As you picked up already, the problems start when you are making changes that directly affect an atom/bond that's involved in stereochemistry. This is a bug. Here's another illustration of the same thing with atomic stereochemistry: In [15]: rxn = AllChem.ReactionFromSmarts('[C:1]Cl>>[*:1]F') In [19]: m=Chem.MolFromSmiles('cl...@](Cl)(Br)I') In [20]: ps = rxn.RunReactants((m,)) In [21]: Chem.MolToSmiles(ps[0][0], True) Out[21]: 'f...@](Cl)(Br)I' In [22]: Chem.MolToSmiles(ps[1][0], True) Out[22]: 'FC(Br)(I)CCl' Notice that the stereochemistry is fine in the first case (line 21) since the reaction didn't affect the atom that is tagged, but that stereochemistry is lost when the tagged atom is modified (line 22). > Having got to the end of explaining that, I am thinking that the way I > should handle this is to check for 'problem' reactants and pass to a more > specific rSMARTS when required! I don't think that will help. Unfortunately the problem is in the way stereochemical information is handled in the reaction code. My gut feeling is that this is not going to be a quick one to fix, but I will take a look. Best Regards, -greg ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss