[I'm including the mailing list on this because it's a topic of
general interest.]

Dear Richard,

On Thu, Aug 4, 2011 at 2:31 PM, Richard Cooper
<[email protected]> wrote:
>
> Greatly enjoying using RDKit - many thanks.

Glad to hear it. Thanks for saying so. :-)

> I have a proposed patch for the Reaction code which you are welcome to
> shoot down in flames:
>
> I use the reaction SMARTS feature to retain (or invert)
> stereochemistry from reactant to product (where the atom in question
> is within the product template) using chiral markers in the SMARTS to
> give the relative chirality of the reactant and product, e.g. take a
> mythical halogenated carbon and swap I for F without inversion.
> '[C@H:1]([Cl:2])([Br:3])[I]>>[C@H:1]([Cl:2])([Br:3])F'
>
> However, if the matched reactant has unspecified tetrahedral
> chirality, I would like to carry this into the product. Currently
> (RDKit2011_03_2) if the reactant stereochemistry is unknown the
> product gets stereochemistry assigned regardless. This seems to be a
> conflict between whether the marker in the SMARTS is providing
> explicit stereochemical information, or merely relative information
> referenced to the reactant.
>
> By way of example, for the above smarts reaction we can feed in
> mythical compounds:
>
> I[C@H](Cl)Br
> I[C@@H](Cl)Br
> I[CH](Cl)Br
>
> and get out:
>
> F[C@H](Cl)Br
> F[C@@H](Cl)Br
> F[C@@H](Cl)Br # This is the same hand as the product template (but
> swapped atom order).
>
> whereas with the modification below, it outputs:
>
> F[C@H](Cl)Br
> F[C@@H](Cl)Br
> FC(Cl)Br
>
> which is what I want - but could it upset any other situations?

In principle this looks fine to me, but there are some sticky details.

The behavior of stereochemistry in reactions built from SMARTS isn't
well documented, so I had to go and read the code to see if the above
behavior was even expected. :-)

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

Best Regards,
-greg

------------------------------------------------------------------------------
BlackBerry&reg; 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to