That solves my problem, thank you very much.

On Wed, Jan 29, 2014 at 6:19 AM, Greg Landrum <[email protected]> wrote:
>
> On Tue, Jan 28, 2014 at 1:20 PM, Michał Nowotka <[email protected]> wrote:
>>
>> Look at this code:
>>
>> from rdkit import Chem
>> mol =
>> Chem.MolFromSmiles('O=C(O)C2N3C(=O)C(NC(=O)C(c1ccc(O)cc1)NC(=O)C(N)CC(=O)NC)C3SC2(C)C')
>> Chem.AssignStereochemistry(mol, flagPossibleStereoCenters=True)
>> [atom.HasProp('_ChiralityPossible') for atom in mol.GetAtoms()]
>>
>> >>> [0,0,0, ... only zeros ...]
>>
>> I believe this compound contains 5 possible stereo centers (picture
>> attached). How can I get them detected by RDKit?
>
>
> Because AssignStereochemistry() is an expensive operation, when you call it
> the code checks to see if it has already been run. If so, the default
> behavior is to immediately return. The SMILES parser calls
> AssignStereochemistry without the flagPossibleStereoCenters argument set, so
> when you call it nothing happens. You can force the calculation using the
> force keyword. Here's your example:
>
> In [8]: mol =
> Chem.MolFromSmiles('O=C(O)C2N3C(=O)C(NC(=O)C(c1ccc(O)cc1)NC(=O)C(N)CC(=O)NC)C3SC2(C)C')
> In [9]: Chem.AssignStereochemistry(mol,flagPossibleStereoCenters=True)
> In [10]: [atom.GetIdx() for atom in mol.GetAtoms() if
> atom.HasProp('_ChiralityPossible')]
> Out[10]: []
> In [11]:
> Chem.AssignStereochemistry(mol,flagPossibleStereoCenters=True,force=True)
> In [12]: [atom.GetIdx() for atom in mol.GetAtoms() if
> atom.HasProp('_ChiralityPossible')]
> Out[12]: [3, 7, 11, 22, 29]
>
> This is the intended behavior, but I admit that it is somewhat confusing.
>
> Since it doesn't add compute time, I will modify the molecule parsers to use
> the flagPossibleStereoCenters argument.
>
> Best,
> -greg
>

------------------------------------------------------------------------------
WatchGuard Dimension instantly turns raw network data into actionable 
security intelligence. It gives you real-time visual feedback on key
security issues and trends.  Skip the complicated setup - simply import
a virtual appliance and go from zero to informed in seconds.
http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to