Dear Richard, On Fri, Aug 5, 2011 at 8:34 AM, Richard Cooper <richard.coo...@chem.ox.ac.uk> wrote: > Dear Greg, > >> One final note: I would not trust the current code to get this stuff >> right. Here's an example: >> >>>>> rxn2 = AllChem.ReactionFromSmarts( >>>>> '[C@H:1]([Cl:2])([Br:3])[I]>>[C@@H:1]([Cl:2])([Br:3])F') >>>>> ps =rxn2.RunReactants((Chem.MolFromSmiles('[C@H](Cl)(Br)I'),)) >>>>> Chem.MolToSmiles(ps[0][0],True) >> 'F[C@H](Cl)Br' >> >> Now provide the same input molecule with a different atom ordering: >>>>> ps =rxn2.RunReactants((Chem.MolFromSmiles('[C@@H](Br)(Cl)I'),)) >>>>> Chem.MolToSmiles(ps[0][0],True) >> 'F[C@@H](Cl)Br' >> >> The first example is what you would expect, the second is not (it's a bug). > > Is this a bug in the reaction code (e.g. assumes the input atoms will > be in canonicalized smiles order) or is > it in the smiles code?
I'm 90% certain that it's in the reaction code. > >> I'd like to do this systematically, and include some documentation of >> expected behavior. >> Something like (note: things don't currently work this way): >> >> Reaction: [C@H:1]([Cl:2])([Br:3])[I]>>[C@H:1]([Cl:2])([Br:3])F >> Behavior: >> Stereochemistry exists: preserve >> Missing stereochemistry: add >> Reaction: [C@H:1]([Cl:2])([Br:3])[I]>>[C@@H:1]([Cl:2])([Br:3])F >> Behavior: >> Stereochemistry exists: invert >> Missing stereochemistry: add >> Reaction: [C@H:1]([Cl:2])([Br:3])[I]>>[C:1]([Cl:2])([Br:3])F >> Behavior: >> Stereochemistry exists: remove >> Missing stereochemistry: nothing >> Reaction: [CH:1]([Cl:2])([Br:3])[I]>>[C@H:1]([Cl:2])([Br:3])F >> Behavior: >> Stereochemistry exists: ??? >> Missing stereochemistry: add >> >> Things get more difficult in cases like this: >> [C@H:1]([Cl:2])[I]>>[C@@H:1]([Cl:2])F >> What would you expect to happen there? > > I've been worrying about that too - worst case only one bond from a > tetrahedral carbon is in the product template how might one specify > what to do with the chirality in a SMARTS expression? Exactly the problem. -greg ------------------------------------------------------------------------------ BlackBerry® DevCon Americas, Oct. 18-20, San Francisco, CA The must-attend event for mobile developers. Connect with experts. Get tools for creating Super Apps. See the latest technologies. Sessions, hands-on labs, demos & much more. Register early & save! http://p.sf.net/sfu/rim-blackberry-1 _______________________________________________ Rdkit-discuss mailing list Rdkit-discuss@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rdkit-discuss