Hi Markus,

On Wed, Mar 19, 2008 at 9:31 PM, markus <m.koss...@tu-bs.de> wrote:
>  
> InputMol=Chem.MolFromSmiles('nccc...@h](N)C(=O)N[C@@H](CC(C)C)C(n...@h](C(N)=O)CCC(N)=O)=O')
>   >>> repl=Chem.ReactionFromSmarts('[C:1]=[O:2]>>[C:1]=[S:2]')
>   >>> out=repl.RunReactants((InputMol,))
>   >>> print Chem.MolToSmiles(out[0][0], isomericSmiles=True)
>  NCCCC[C@@H](N)C(=S)n...@h](CC(C)C)C(=O)N[C@@H](C(N)=O)CCC(N)=O
>
>  This happens for any reaction i tried so far. I also did the Sanitize()
>  thing
>  when reading in the Educt and before  writing the Product, but  there's
>  no change.
>  Doing Chem.AssignAtomChiralcodes() before the reaction does not preserve
>  the
>  Chirality

This was, in fact, a bug in the handling of chirality in reactions:
http://sourceforge.net/tracker/index.php?func=detail&aid=1920627&group_id=160139&atid=814650

Here's a simpler demonstration of the problem:
[32] >>> rxn = AllChem.ReactionFromSmarts('[C:1](=[O:2])>>[C:1](=[S:2])')
[37] >>> m = Chem.MolFromSmiles('c...@h](CO)CC(=O)NC')
[38] >>> ps=rxn.RunReactants((m,))
[39] >>> Chem.MolToSmiles(ps[0][0],True)
Out[39]: 'CNC(=S)C[C@@H](C)CO'

The bug is fixed in the subversion repository in revision 580:
http://rdkit.svn.sourceforge.net/viewvc/rdkit?view=rev&revision=580
The fixed files will be included in the next release of the RDKit
(sometime in April), or you can download them now here:
http://rdkit.svn.sourceforge.net/viewvc/*checkout*/rdkit/trunk/Code/GraphMol/ChemReactions/Reaction.cpp
http://rdkit.svn.sourceforge.net/viewvc/*checkout*/rdkit/trunk/Code/GraphMol/ChemReactions/testReaction.cpp
You will need to copy those into your
$RDBASE/Code/GraphMol/ChemReactions directory and rebuild in there
(just type "bjam" in that directory).

Let me know if this doesn't clear up the problems you are seeing or
when you find new ones.

Thanks for the bug report.

Best Regards,
-greg

Reply via email to