> One additional 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).

I have made a patch for 2011_03_2 to fix this - it requires comparing
the order of the bonds in the product to that in the reactant (in the
same way as it is done later in the code for non-template chiral
atoms).

> 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

I agree with those, except I'd also favour implicitly preserving
stereochemistry in the absence of any mention in the SMARTS (see 1
below).
The stereochemistry specification in the SMARTS is nearly always
relative, since, in many cases the stereochemistry is a property of
the reactant and product, but not necessarily of the template. The
exception is the explicit adding or setting of stereochemistry (8&9
below)

> 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?

Since the Iodine is not explicitly mapped to the Fluorine there is no
way to track the stereochemistry - we've removed one bond and added
another. Stereochemistry can be tracked if you specify the mapping
[C@H:1]([Cl:2])[I:3]>>[C@@H:1]([Cl:2])[F:3] - then, even though the
fourth bond is not in the template, it is easy to match up in the
reactant and the product (as it is just copied across) and the
appropriate stereochemistry change can be applied.

The following cases apply to the situation where the equivalent atom
in reactant and product have tetrahedral geometry.
Using these cases, I think you can encode most reactions involving
tetrahedral stereochemistry. Note that from zero to four bonded atoms
can be specified in the SMARTS but they must all be mapped between
reactant and product (except an implicit H).

In the following three equivalent cases, the reagent stereochemistry
(if present and specified) is preserved in the product.
(1) [C:1] >> [C:1]
(2) [C@:1] >> [C@:1]
(3) [C@@:1] >> [C@@:1]

In the following two cases, the reagent stereochemistry is inverted:
(4) [C@@:1] >> [C@:1]
(5) [C@:1] >> [C@@:1]

In the following cases, the reagent stereochemistry (if present) is
explicitly lost (e.g. a racemization)
(6) [C@@:1] >> [C:1]
(7) [C@:1] >> [C:1]

And finally in the following cases the stereochemistry is explicitly set/added:
(8) [C:1] >> [C@:1]
(9) [C:1] >> [C@@:1]

I've made a patch and some tests against 2011_03_2 to implement all
these cases - but best to discuss here first whether the spec above is
right.

This final case (8&9) requires a SMARTS that specifies all four bonds
to the product carbon - otherwise the sense of the stereochemistry is
not defined. In this case - the bonded atoms need not be mapped from
the reactant as the stereochemistry is absolute.

Another discussion point - the implicit retention of stereochemistry
(case 1) is useful if your SMARTS template is, say, a sugar ring - you
don't have to go all the way around specifying the preservation of
stereochemistry for every carbon. However if this is unexpected
behaviour maybe a flag could be set to enable it.

In cases 2-5 it would be useful to raise an exception if attempting to
keep or invert stereochemistry to an atom where the new bonds are
formed to unmapped atoms '[C@H:1]([Cl:2])[I]>>[C@@H:1]([Cl:2])F'. In
case 1, I think we would just lose the stereochemistry without
fussing.

In cases  8&9 it seems appropriate to raise an exception if the
stereochemistry in the SMARTS is not fully present, e.g. [C:1]>>C[@:1]
is meaningless, you'd have to explicitly say something like [C:1] >>
Cl[C@H:1](Br)F


Best wishes,
Richard

------------------------------------------------------------------------------
Get a FREE DOWNLOAD! and learn more about uberSVN rich system, 
user administration capabilities and model configuration. Take 
the hassle out of deploying and managing Subversion and the 
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to