[Rdkit-discuss] Stereochemistry

2023-05-24 Thread Santiago Fraga
   Good afternoon!

  Using RDKit C++ version 2023-03-1, I am trying to generate the 
stereochemistry of this molecule using the smiles format:
    
 string molecule = "C[C@H]1CC[C@@H](C)NC1";
 RDKit::ROMol* mol = RDKit::SmilesToMol(molecule);
vector stereoData = 
RDKit::Chirality::findPotentialStereo(*mol);

 Using this function I get that both atoms in positions 1 and 4 are 
labelled as Tet_CW (R).
 But using the  function RDKit::MolOps::assignStereochemistry(*mol), 
the result is the right one:
 atom 1 is 'S' and atom 4 is 'R'

 In the documentation, findPotentialStereo is recommended as the most 
accurate version and that it would be the default option
 in the immediate future.

   Regards
   Santiago

[http://www.mestrelab.com/mestrelab/wp-content/uploads/signs/line3.jpg]
[http://www.mestrelab.com/mestrelab/wp-content/uploads/signs/M-red-200pxb.jpg]

SANTIAGO FRAGA
Software Developer
santi...@mestrelab.com

MESTRELAB RESEARCH S.L.
PHONE +34881976775
FAX +34981941079
Feliciano Barrera, 9B-Bajo 15706
Santiago de Compostela (SPAIN)

Follow us:
[Mestrelab Twitter]  [Mestrelab Linkedin] 
   [Canal de YouTube 
Mestrelab]    
[MestreBlog] 



___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry problem with spiro centre

2021-05-09 Thread James Davidson
Thanks Paolo - I should have found this before posting!

Cheers

James

On 9 May 2021, at 15:05, Paolo Tosco  wrote:


Hi James,

IIRC that's a known open issue with the way spirocyclic pseudochiral centers 
are handled:

https://github.com/rdkit/rdkit/issues/3490

Cheers,
p.

On Sun, May 9, 2021 at 10:15 AM James Davidson 
mailto:j.david...@vernalis.com>> wrote:
Dear All,

I am having some issues with tetrahedral stereochemistry perception in RDKit 
(2020.09.4) for a certain class of molecule.
Here’s an example (rendered using cdk-depict):


https://www.simolecule.com/cdkdepict/depict/bot/svg?smi=F%5BC%40H%5D1C%5BC%40%40%5D2(C1)C%5BC%40H%5D(Cl)C2=-1=-1=off=bridgehead=false=3.65=cip=0

If I try to work with this class of molecule in RDKit, it seems impossible(?) 
to assign stereo information to the central, spirocyclic stereo centre.
Exporting back out as SMILES shows that the information is not present:

m = Chem.MolFromSmiles('F[C@H]1C[C@@]2(C1)C[C@H](Cl)C2')
print(Chem.MolToSmiles(m))

>>>   F[C@H]1CC2(C1)C[C@H](Cl)C2

The spiro-atom is clearly being identified as a potential stereo-centre 
(strangely, the CIP labels aren’t being generated for the other two centres – 
just the parity info is returned):

centers = Chem.FindMolChiralCenters(m, includeUnassigned=True, 
useLegacyImplementation=False)
print(centers)

>>>   [(1, 'Tet_CW'), (3, '?'), (6, 'Tet_CCW')]

If I look at the atom properties for the central atom, I can see 
_ChiralityPossible == 1, but I also see _ringStereochemCand == False.
Is this the problem?

Any help/advice greatly appreciated!

Kind regards

James


PLEASE READ - This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or 
postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

Vernalis (R) Limited (no. 1985479)
Granta Park, Great Abington
Cambridge, CB21 6GB, United Kingdom
Tel: +44 (0)1223 895 555

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry problem with spiro centre

2021-05-09 Thread Paolo Tosco
Hi James,

IIRC that's a known open issue with the way spirocyclic pseudochiral
centers are handled:

https://github.com/rdkit/rdkit/issues/3490

Cheers,
p.

On Sun, May 9, 2021 at 10:15 AM James Davidson 
wrote:

> Dear All,
>
>
>
> I am having some issues with tetrahedral stereochemistry perception in
> RDKit (2020.09.4) for a certain class of molecule.
>
> Here’s an example (rendered using cdk-depict):
>
>
>
>
> https://www.simolecule.com/cdkdepict/depict/bot/svg?smi=F%5BC%40H%5D1C%5BC%40%40%5D2(C1)C%5BC%40H%5D(Cl)C2=-1=-1=off=bridgehead=false=3.65=cip=0
>
>
>
> If I try to work with this class of molecule in RDKit, it seems
> impossible(?) to assign stereo information to the central, spirocyclic
> stereo centre.
>
> Exporting back out as SMILES shows that the information is not present:
>
>
>
> m = Chem.MolFromSmiles('F[C@H]1C[C@@]2(C1)C[C@H](Cl)C2')
>
> print(Chem.MolToSmiles(m))
>
>
>
> >>>   F[C@H]1CC2(C1)C[C@H](Cl)C2
>
>
>
> The spiro-atom is clearly being identified as a potential stereo-centre
> (strangely, the CIP labels aren’t being generated for the other two centres
> – just the parity info is returned):
>
>
>
> centers = Chem.FindMolChiralCenters(m, includeUnassigned=True,
> useLegacyImplementation=False)
>
> print(centers)
>
>
>
> >>>   [(1, 'Tet_CW'), (3, '?'), (6, 'Tet_CCW')]
>
>
>
> If I look at the atom properties for the central atom, I can see 
> _ChiralityPossible
> == 1, but I also see _ringStereochemCand == False.
>
> Is this the problem?
>
>
>
> Any help/advice greatly appreciated!
>
>
>
> Kind regards
>
>
>
> James
> --
>
> PLEASE READ - This email is confidential and may be privileged. It is
> intended for the named addressee(s) only and access to it by anyone else is
> unauthorised. If you are not an addressee, any disclosure or copying of the
> contents of this email or any action taken (or not taken) in reliance on it
> is unauthorised and may be unlawful. If you have received this email in
> error, please notify the sender or postmas...@vernalis.com. Email is not
> a secure method of communication and the Company cannot accept
> responsibility for the accuracy or completeness of this message or any
> attachment(s). Please check this email for virus infection for which the
> Company accepts no responsibility. If verification of this email is sought
> then please request a hard copy. Unless otherwise stated, any views or
> opinions presented are solely those of the author and do not represent
> those of the Company.
>
> Vernalis (R) Limited (no. 1985479)
> Granta Park, Great Abington
> Cambridge, CB21 6GB, United Kingdom
> Tel: +44 (0)1223 895 555
> --
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry problem with spiro centre

2021-05-09 Thread James Davidson
Dear All,

I am having some issues with tetrahedral stereochemistry perception in RDKit 
(2020.09.4) for a certain class of molecule.
Here's an example (rendered using cdk-depict):

[cid:image002.png@01D744AE.E7C7ACA0]
https://www.simolecule.com/cdkdepict/depict/bot/svg?smi=F%5BC%40H%5D1C%5BC%40%40%5D2(C1)C%5BC%40H%5D(Cl)C2=-1=-1=off=bridgehead=false=3.65=cip=0

If I try to work with this class of molecule in RDKit, it seems impossible(?) 
to assign stereo information to the central, spirocyclic stereo centre.
Exporting back out as SMILES shows that the information is not present:

m = Chem.MolFromSmiles('F[C@H]1C[C@@]2(C1)C[C@H](Cl)C2')
print(Chem.MolToSmiles(m))

>>>   F[C@H]1CC2(C1)C[C@H](Cl)C2

The spiro-atom is clearly being identified as a potential stereo-centre 
(strangely, the CIP labels aren't being generated for the other two centres - 
just the parity info is returned):

centers = Chem.FindMolChiralCenters(m, includeUnassigned=True, 
useLegacyImplementation=False)
print(centers)

>>>   [(1, 'Tet_CW'), (3, '?'), (6, 'Tet_CCW')]

If I look at the atom properties for the central atom, I can see 
_ChiralityPossible == 1, but I also see _ringStereochemCand == False.
Is this the problem?

Any help/advice greatly appreciated!

Kind regards

James


PLEASE READ - This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

Vernalis (R) Limited (no. 1985479)
Granta Park, Great Abington
Cambridge, CB21 6GB, United Kingdom
Tel: +44 (0)1223 895 555

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry in rdkit

2019-10-30 Thread Greg Landrum
On Wed, Oct 30, 2019 at 10:28 AM Lukas Pravda  wrote:

>
> Thank you for the answer. I used to use the stereochemistry assignment the
> way you describe, but someone complained that in one of the molecules they
> knew the stereochemistry was incorrect.
>

Do you mean the R/S labels were incorrect or that somehow the structure (or
perhaps the drawing of the structure) was wrong?
The first is not completely unexpected given that the algorithm used to
assign CIP labels is approximate. This is fixable by doing an
implementation following the guidelines in the paper I link to below, but
that is a decidedly non-trivial amount of work.
A problem with the structure (or the way it's drawn), on the other hand,
would be a bug that is probably more easily fixable.

A question I should probably ask: why do you actually need R/S labels?


> It was suggested that we use the stereochemistry we have in db, so I
> changed that to setting atom tags (which randomly fixed those couple of
> issues, but apparently broke everything else down.
>
> I was wondering how does rdkit work out R/S from inchi string?
>

The InChI code translates InChI string into a datastructure that the RDKit
interprets to create an RDKit molecule. This datastructure includes parity
information analogous to what the RDKit uses internally (though based on
atom order if I remember correctly). Once we have an RDKit molecule
AssignStereochemistry() is called to set the approximate R/S labels.

-greg



>
>
> Lukas
>
>
>
> *From: *Greg Landrum 
> *Date: *Wednesday, 30 October 2019 at 04:28
> *To: *Lukas Pravda 
> *Cc: *RDKIT mailing list 
> *Subject: *Re: [Rdkit-discuss] Stereochemistry in rdkit
>
>
>
> Hi Lukas,
>
>
>
> The stereochemistry tags that the RDKit uses in determining bond wedging
> (or for SMILES, generating 3D coordinates, etc.) are the ChiralTags on the
> atoms: CHI_TETRAHEDRAL_CW and CHI_TETRAHEDRAL_CCW. The current RDKit stereo
> representation is relative to the ordering of the bonds around an atom, not
> the ordering of neighboring atoms. So CHI_TETRAHEDRAL_CW means that when
> you look down the first bond towards the central atom you rotate clockwise
> to move from the second bond to the third.
>
>
>
> The CIP (R/S) atomic properties are set by AssignStereochemistry() using
> the ChiralTags. Note that the R/S assignments are only approximate, the
> actual CIP rules are quite complex (great paper on this here:
> https://pubs.acs.org/doi/abs/10.1021/acs.jcim.8b00324) and we've not made
> a serious attempt to get this right.
>
>
>
> It isn't currently possible to assign CIP R/S labels to atoms and use
> those to set the ChiralTags. It would be possible to put together a bit of
> Python that can do this, but it would only be as accurate as the RDKit's
> assignment of CIP priorities. I can put together a demo of how to do this,
> but I think/hope it's not actually what you need...
>
>
>
> If you have 3D coordinates, the absolute best way to set the ChiralTags
> (and thus have the chiral representation correct) is to use
> AssignStereochemistryFrom3D(). This will set the ChiralTags on the atoms as
> well as assigning the CIP codes (to the extent that those are correct).
> Here's a gist showing how this works:
>
> https://gist.github.com/greglandrum/aa802edd1bc49ac0452beff52d55
>
>
>
> I hope this helps,
>
> -greg
>
>
>
>
>
>
>
> On Tue, Oct 29, 2019 at 12:13 PM Lukas Pravda  wrote:
>
> Hi guys,
>
>
>
> I got completely puzzled by stereochemistry and the way to set it in
> rdkit. Among others we use rdkit to get 2D depictions. What I do in my code
> is that I construct molecule from scratch and  set chiral tags to
> CHI_TETRAHEDRAL_CW for R, CHI_TETRAHEDRAL_CCW for S (this is the metadata
> we have for each atom, where applicable), otherwise CHI_UNSPECIFIED. Then I
> run sanitization on the molecule and generate images. That seems to be
> working incorrectly even for simple cases:  e.g.:
> https://pdbe.org/chem/004
>
>
>
> When constructing the molecule I set the stereocenter for the CA atom to
> CHI_TETRAHEDRAL_CCW (S), but when I then try to perceive the R/S by
> FindMolChiralCenters(force=false) it says ‘R’, so as the image. This is
> wrong. I can also directly set _CIPCODE for each atom where applicable to
> S/R directly (along with the chiral tags). Then the chiral atom is
> perceived as S by FindMolChiralCenters(force=false), but then again the
> image still says R.
>
>
>
> When I set neither the chiral tag nor the _CIPCODe and run
>  AssignAtomChiralTagsFromStructure() and AssignStereochemistry()  on the
> mol the atom under question gets atom tag CHI_TETRAHEDRAL_CW (I assume
> incorrectly), the _CIPCODE is correct (S) an

Re: [Rdkit-discuss] Stereochemistry in rdkit

2019-10-30 Thread Lukas Pravda
Hi Greg,

 

Thank you for the answer. I used to use the stereochemistry assignment the way 
you describe, but someone complained that in one of the molecules they knew the 
stereochemistry was incorrect. It was suggested that we use the stereochemistry 
we have in db, so I changed that to setting atom tags (which randomly fixed 
those couple of issues, but apparently broke everything else down.

 

I was wondering how does rdkit work out R/S from inchi string?

 

Lukas

 

From: Greg Landrum 
Date: Wednesday, 30 October 2019 at 04:28
To: Lukas Pravda 
Cc: RDKIT mailing list 
Subject: Re: [Rdkit-discuss] Stereochemistry in rdkit

 

Hi Lukas,

 

The stereochemistry tags that the RDKit uses in determining bond wedging (or 
for SMILES, generating 3D coordinates, etc.) are the ChiralTags on the atoms: 
CHI_TETRAHEDRAL_CW and CHI_TETRAHEDRAL_CCW. The current RDKit stereo 
representation is relative to the ordering of the bonds around an atom, not the 
ordering of neighboring atoms. So CHI_TETRAHEDRAL_CW means that when you look 
down the first bond towards the central atom you rotate clockwise to move from 
the second bond to the third.

 

The CIP (R/S) atomic properties are set by AssignStereochemistry() using the 
ChiralTags. Note that the R/S assignments are only approximate, the actual CIP 
rules are quite complex (great paper on this here: 
https://pubs.acs.org/doi/abs/10.1021/acs.jcim.8b00324) and we've not made a 
serious attempt to get this right.

 

It isn't currently possible to assign CIP R/S labels to atoms and use those to 
set the ChiralTags. It would be possible to put together a bit of Python that 
can do this, but it would only be as accurate as the RDKit's assignment of CIP 
priorities. I can put together a demo of how to do this, but I think/hope it's 
not actually what you need...

 

If you have 3D coordinates, the absolute best way to set the ChiralTags (and 
thus have the chiral representation correct) is to use 
AssignStereochemistryFrom3D(). This will set the ChiralTags on the atoms as 
well as assigning the CIP codes (to the extent that those are correct). Here's 
a gist showing how this works:

https://gist.github.com/greglandrum/aa802edd1bc49ac0452beff52d55

 

I hope this helps,

-greg

 

 

 

On Tue, Oct 29, 2019 at 12:13 PM Lukas Pravda  wrote:

Hi guys,

 

I got completely puzzled by stereochemistry and the way to set it in rdkit. 
Among others we use rdkit to get 2D depictions. What I do in my code is that I 
construct molecule from scratch and  set chiral tags to CHI_TETRAHEDRAL_CW for 
R, CHI_TETRAHEDRAL_CCW for S (this is the metadata we have for each atom, where 
applicable), otherwise CHI_UNSPECIFIED. Then I run sanitization on the molecule 
and generate images. That seems to be working incorrectly even for simple 
cases:  e.g.: https://pdbe.org/chem/004

 

When constructing the molecule I set the stereocenter for the CA atom to 
CHI_TETRAHEDRAL_CCW (S), but when I then try to perceive the R/S by 
FindMolChiralCenters(force=false) it says ‘R’, so as the image. This is wrong. 
I can also directly set _CIPCODE for each atom where applicable to S/R directly 
(along with the chiral tags). Then the chiral atom is perceived as S by 
FindMolChiralCenters(force=false), but then again the image still says R.  

 

When I set neither the chiral tag nor the _CIPCODe and run  
AssignAtomChiralTagsFromStructure() and AssignStereochemistry()  on the mol the 
atom under question gets atom tag CHI_TETRAHEDRAL_CW (I assume incorrectly), 
the _CIPCODE is correct (S) and the image is correct (why) as well 
(attached). So my question is, how do I set stereochemistry on individual 
atoms, so that it is perceived by rdkit and is not overwritten in any 
subsequent step.

 

I hope the above mentioned description makes at least some sense. If not, I’ll 
try to distill a code sample for constructing this molecule from raw data.

 

I also reproduced the same steps on the  http://pdbe.org/chem/THR, which also 
gives wrong results when I set chiral tags manually (bond wedging should not be 
on methyl group I assume. Interestingly here the setting chiral atoms from the 
structure by rdkit gives incorrect results as well (attached).

 

For rdkit set tags I get

 

CA - CHI_TETRAHEDRAL_CCW (S) – (correct)

CB - CHI_TETRAHEDRAL_CCW (R) – (incorrect should be TETRAHEDRAL_CW - R)

 

I’d be grateful for any piece of advice. Because I have no idea what I have 
been doing wrong the whole time.

 

My settings:

Rdkit: 2019.09.1/2019.03.2

Conda: 4.7.12

Python 3.7.4

os mac 10.15

 

Best,

Lukas

 

 

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry inversion upon replacement

2019-08-22 Thread Fiorella Ruggiu
Hi everyone,

I tried to virtually deprotect molecules using
the AllChem.ReplaceSubstructs() function. Stereochemistry of adjacent atoms
gets inverted in ChiralTag but not in _CIPCode. This gives me the wrong
output SMILES:

from rdkit import Chem
from rdkit.Chem import AllChem
from rdkit.Chem.Draw import IPythonConsole

mol=Chem.MolFromSmiles('CC[C@@H](NC(=O)OCC1c2c2-c2c12)C1=CC=CC=C1')
mol
[image: image.png]

for atom in rms[0].GetAtoms():
if atom.HasProp('_CIPCode'):
print(atom.GetProp('_CIPCode'))
print(atom.GetChiralTag())

R
CHI_TETRAHEDRAL_CCW


fmoc = Chem.MolFromSmarts('NC(=O)OCC1c2c2-c2c12')
fmoc_repl = Chem.MolFromSmiles('N')
rms = AllChem.ReplaceSubstructs(mol,fmoc,fmoc_repl,replaceAll=True)
rms[0]

[image: image.png]
Chem.MolToSmiles(rms[0])

'CC[C@H](N)c1c1'


for atom in rms[0].GetAtoms():
if atom.HasProp('_CIPCode'):
print(atom.GetProp('_CIPCode'))
print(atom.GetChiralTag())

R
CHI_TETRAHEDRAL_CW


How come the ChiralTag changes upon the replacement? Sorry if this is
documented somewhere but I didn't quite find it. It works in this case
to do atom.SetChiralTag() to change the stereochemistry in the smiles.

Thanks a lot,
Fio
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral centres(?)

2017-02-10 Thread Greg Landrum
To close the loop on this: the bug fix is now merged onto master. The ring
stereochemistry code now handles spiro centers.
Here's the little demo of that:

In [2]: print(Chem.CanonSmiles('O[C@H]1CC[C@]11CC[C@@](Cl)(Br)CC1'))
O[C@H]1CC[C@]12CC[C@@](Cl)(Br)CC2

Unlike previously (see the bug report) the stereochemistry info is no
longer being lost.

Since the stereochem info is still there it will be used in the conformer
generation/filtering.

-greg



On Wed, Feb 8, 2017 at 4:45 AM, Greg Landrum  wrote:

> Hi James,
>
> This is definitely a bug. The problem seems to be connected to the way
> what the RDKit calls "ring stereochemistry" is handled when there are spiro
> linkages.
>
> Here's the github issue: https://github.com/rdkit/rdkit/issues/1294
>
> I'll take a look.
>
> Best,
> -greg
>
>
>
> On Tue, Feb 7, 2017 at 8:32 PM, James Davidson 
> wrote:
>
>> Dear All,
>>
>>
>>
>> I have hit what I think is a problem with stereochemistry
>> perception/handling for certain types of pseudochiral and/or spirocyclic
>> systems.
>>
>> Basically I am observing that some types of input tetrahedral
>> stereochemical information gets lost when an RDKit molecule is generated.
>>
>> But I only realised this because I was wanting to generate conformers and
>> was seeing stereochemical scrambling…
>>
>>
>>
>> Anyway, an example with pictures will probably explain things better:
>>
>> https://gist.github.com/jepdavidson/fdfbf6366a17f4829de3d4de22f3b442
>>
>>
>>
>> Any help/advice appreciated.
>>
>>
>>
>> Kind regards
>>
>>
>>
>> James
>>
>> __
>> PLEASE READ: This email is confidential and may be privileged. It is
>> intended for the named addressee(s) only and access to it by anyone else is
>> unauthorised. If you are not an addressee, any disclosure or copying of the
>> contents of this email or any action taken (or not taken) in reliance on it
>> is unauthorised and may be unlawful. If you have received this email in
>> error, please notify the sender or postmas...@vernalis.com. Email is not
>> a secure method of communication and the Company cannot accept
>> responsibility for the accuracy or completeness of this message or any
>> attachment(s). Please check this email for virus infection for which the
>> Company accepts no responsibility. If verification of this email is sought
>> then please request a hard copy. Unless otherwise stated, any views or
>> opinions presented are solely those of the author and do not represent
>> those of the Company.
>>
>> The Vernalis Group of Companies
>> 100 Berkshire Place
>> Wharfedale Road
>> Winnersh, Berkshire
>> RG41 5RD, England
>> Tel: +44 (0)118 938  <+44%20118%20938%20>
>>
>> To access trading company registration and address details, please go to
>> the Vernalis website at www.vernalis.com and click on the "Company
>> address and registration details" link at the bottom of the page..
>> __
>>
>> 
>> --
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral centres(?)

2017-02-08 Thread Greg Landrum
To further help with the work-around: it's safe to sanitize the molecule,
but you cannot call Chem.AssignStereochemistry(), which the SMILES parser
does when you tell it to sanitize.
Here's an example from your gist:

In [2]: m3 = Chem.MolFromSmiles('O[C@H]1CC[C@]11CC[C@@](Cl)(Br)CC1',
sanitize=False)

In [3]: for atom in m3.GetAtoms():
   ...: print("Stereo:", atom.GetChiralTag(), "Neighbours:",
[n.GetSymbol() for n in atom.GetNeighbors()])
   ...:
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_TETRAHEDRAL_CW Neighbours: ['O', 'C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_TETRAHEDRAL_CCW Neighbours: ['C', 'C', 'C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_TETRAHEDRAL_CW Neighbours: ['C', 'Cl', 'Br', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']

In [4]: Chem.SanitizeMol(m3)
Out[4]: rdkit.Chem.rdmolops.SanitizeFlags.SANITIZE_NONE

In [5]: for atom in m3.GetAtoms():
   ...: print("Stereo:", atom.GetChiralTag(), "Neighbours:",
[n.GetSymbol() for n in atom.GetNeighbors()])
   ...:
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_TETRAHEDRAL_CW Neighbours: ['O', 'C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_TETRAHEDRAL_CCW Neighbours: ['C', 'C', 'C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_TETRAHEDRAL_CW Neighbours: ['C', 'Cl', 'Br', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']
Stereo: CHI_UNSPECIFIED Neighbours: ['C', 'C']


-greg


On Wed, Feb 8, 2017 at 9:46 AM, James Davidson <j.david...@vernalis.com>
wrote:

> Hi Greg (et al.),
>
>
>
> Thanks for looking into it.
>
> And thanks to Paolo, who gave me a good workaround suggestion – which was
> to desymmetrise the spirocyclic centre by modifying the isotope on one of
> the neighbours.
>
> This is good for attended processing of single molecules, but not so good
> for unattended processing of unknown molecules…
>
>
>
> Reading in molecules with sanitize=False is a good start, but my first
> thought was then to do some sort of rSMARTS transform to automate the
> isomer assignment.
>
> It soon became apparent that this wasn’t the way to go – as abilities are
> limited with an unsanitised molecule(!).
>
>
>
> So I ended-up with the following:
>
>
>
> m3 = Chem.MolFromSmiles('O[C@H]1CC[C@]11CC[C@@](Cl)(Br)CC1',
> sanitize=False)
>
> for atom in m3.GetAtoms():
>
> print "Stereo:", atom.GetChiralTag(), "Neighbours:", [n.GetSymbol()
> for n in atom.GetNeighbors()]  # chiral centres currently intact
>
>
>
> # Find possible spirocentres
>
> for atom in m3.GetAtoms():
>
> if len(atom.GetNeighbors()) == 4 and atom.IsInRing() and
> atom.GetChiralTag() != 'CHI_UNSPECIFIED':
>
> # We have found a candidate spirocentre modify a neighbour at
> random
>
> first_neighbour = atom.GetNeighbors()[0]
>
> first_neighbour.SetIsotope(100)
>
> Chem.SanitizeMol(m3)  # Now we can sanitise
>
> test3_mols = summarise_conformers(m3)  # and generate the conformers (as
> before)
>
> sdf = Chem.SDWriter('test3.sdf')  # and write them out (but resetting the
> isotopes first)
>
> for mol in test3_mols:
>
> for atom in mol.GetAtoms():
>
> if atom.GetIsotope() == 100:
>
> atom.SetIsotope(0)
>
> sdf.write(mol)
>
>
>
>
>
> GIST is updated to include this:  https://gist.github.com/jepdavidson/
> fdfbf6366a17f4829de3d4de22f3b442
>
>
>
> Kind regards
>
>
>
> James
>
>
>
>
>
> *From:* Greg Landrum [mailto:greg.land...@gmail.com]
> *Sent:* 08 February 2017 03:45
> *To:* James Davidson
> *Cc:* rdkit-discuss@lists.sourceforge.net
> *Subject:* Re: [Rdkit-discuss] Stereochemistry issue for
> spirocycles/pseudochiral centres(?)
>
>
>
> Hi James,
>
>
>
> This is definitely a bug. The problem seems to be connected to the way
> what the RDKit calls "ring stereochemistry" is handled when there are spiro
> linkages.
>
>
>
> Here's the github issue: https://github.com/rdkit/rdkit/issues/1294
>
>
>
> I'll take a look.
>
>
>
> Best,
>
> -greg
>
>
>
>
>
>
>
> On Tue, Feb 7, 2017 at 8:32 PM, James Davidson <j.david...@vernalis.com>
> wrote:
>
> Dear All,
>
>
>
&

Re: [Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral centres(?)

2017-02-08 Thread James Davidson
Hi Greg (et al.),

Thanks for looking into it.
And thanks to Paolo, who gave me a good workaround suggestion – which was to 
desymmetrise the spirocyclic centre by modifying the isotope on one of the 
neighbours.
This is good for attended processing of single molecules, but not so good for 
unattended processing of unknown molecules…

Reading in molecules with sanitize=False is a good start, but my first thought 
was then to do some sort of rSMARTS transform to automate the isomer assignment.
It soon became apparent that this wasn’t the way to go – as abilities are 
limited with an unsanitised molecule(!).

So I ended-up with the following:

m3 = Chem.MolFromSmiles('O[C@H]1CC[C@]11CC[C@@](Cl)(Br)CC1', sanitize=False)
for atom in m3.GetAtoms():
print "Stereo:", atom.GetChiralTag(), "Neighbours:", [n.GetSymbol() for n 
in atom.GetNeighbors()]  # chiral centres currently intact

# Find possible spirocentres
for atom in m3.GetAtoms():
if len(atom.GetNeighbors()) == 4 and atom.IsInRing() and 
atom.GetChiralTag() != 'CHI_UNSPECIFIED':
# We have found a candidate spirocentre modify a neighbour at random
first_neighbour = atom.GetNeighbors()[0]
first_neighbour.SetIsotope(100)
Chem.SanitizeMol(m3)  # Now we can sanitise
test3_mols = summarise_conformers(m3)  # and generate the conformers (as before)
sdf = Chem.SDWriter('test3.sdf')  # and write them out (but resetting the 
isotopes first)
for mol in test3_mols:
for atom in mol.GetAtoms():
if atom.GetIsotope() == 100:
atom.SetIsotope(0)
sdf.write(mol)


GIST is updated to include this:  
https://gist.github.com/jepdavidson/fdfbf6366a17f4829de3d4de22f3b442

Kind regards

James


From: Greg Landrum [mailto:greg.land...@gmail.com]
Sent: 08 February 2017 03:45
To: James Davidson
Cc: rdkit-discuss@lists.sourceforge.net
Subject: Re: [Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral 
centres(?)

Hi James,

This is definitely a bug. The problem seems to be connected to the way what the 
RDKit calls "ring stereochemistry" is handled when there are spiro linkages.

Here's the github issue: https://github.com/rdkit/rdkit/issues/1294

I'll take a look.

Best,
-greg



On Tue, Feb 7, 2017 at 8:32 PM, James Davidson 
<j.david...@vernalis.com<mailto:j.david...@vernalis.com>> wrote:
Dear All,

I have hit what I think is a problem with stereochemistry perception/handling 
for certain types of pseudochiral and/or spirocyclic systems.
Basically I am observing that some types of input tetrahedral stereochemical 
information gets lost when an RDKit molecule is generated.
But I only realised this because I was wanting to generate conformers and was 
seeing stereochemical scrambling…

Anyway, an example with pictures will probably explain things better:
https://gist.github.com/jepdavidson/fdfbf6366a17f4829de3d4de22f3b442

Any help/advice appreciated.

Kind regards

James

__
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or 
postmas...@vernalis.com<mailto:postmas...@vernalis.com>. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 <tel:+44%20118%20938%20>

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com<http://www.vernalis.com> and click on the 
"Company address and registration details" link at the bottom of the page..
__

--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net<mailto:Rdkit-discuss@lists.sourceforge.net>
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


__
PLEASE READ: This email is confide

Re: [Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral centres(?)

2017-02-07 Thread Greg Landrum
Hi James,

This is definitely a bug. The problem seems to be connected to the way what
the RDKit calls "ring stereochemistry" is handled when there are spiro
linkages.

Here's the github issue: https://github.com/rdkit/rdkit/issues/1294

I'll take a look.

Best,
-greg



On Tue, Feb 7, 2017 at 8:32 PM, James Davidson 
wrote:

> Dear All,
>
>
>
> I have hit what I think is a problem with stereochemistry
> perception/handling for certain types of pseudochiral and/or spirocyclic
> systems.
>
> Basically I am observing that some types of input tetrahedral
> stereochemical information gets lost when an RDKit molecule is generated.
>
> But I only realised this because I was wanting to generate conformers and
> was seeing stereochemical scrambling…
>
>
>
> Anyway, an example with pictures will probably explain things better:
>
> https://gist.github.com/jepdavidson/fdfbf6366a17f4829de3d4de22f3b442
>
>
>
> Any help/advice appreciated.
>
>
>
> Kind regards
>
>
>
> James
>
> __
> PLEASE READ: This email is confidential and may be privileged. It is
> intended for the named addressee(s) only and access to it by anyone else is
> unauthorised. If you are not an addressee, any disclosure or copying of the
> contents of this email or any action taken (or not taken) in reliance on it
> is unauthorised and may be unlawful. If you have received this email in
> error, please notify the sender or postmas...@vernalis.com. Email is not
> a secure method of communication and the Company cannot accept
> responsibility for the accuracy or completeness of this message or any
> attachment(s). Please check this email for virus infection for which the
> Company accepts no responsibility. If verification of this email is sought
> then please request a hard copy. Unless otherwise stated, any views or
> opinions presented are solely those of the author and do not represent
> those of the Company.
>
> The Vernalis Group of Companies
> 100 Berkshire Place
> Wharfedale Road
> Winnersh, Berkshire
> RG41 5RD, England
> Tel: +44 (0)118 938  <+44%20118%20938%20>
>
> To access trading company registration and address details, please go to
> the Vernalis website at www.vernalis.com and click on the "Company
> address and registration details" link at the bottom of the page..
> __
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry issue for spirocycles/pseudochiral centres(?)

2017-02-07 Thread James Davidson
Dear All,

I have hit what I think is a problem with stereochemistry perception/handling 
for certain types of pseudochiral and/or spirocyclic systems.
Basically I am observing that some types of input tetrahedral stereochemical 
information gets lost when an RDKit molecule is generated.
But I only realised this because I was wanting to generate conformers and was 
seeing stereochemical scrambling...

Anyway, an example with pictures will probably explain things better:
https://gist.github.com/jepdavidson/fdfbf6366a17f4829de3d4de22f3b442

Any help/advice appreciated.

Kind regards

James

__
PLEASE READ: This email is confidential and may be privileged. It is intended 
for the named addressee(s) only and access to it by anyone else is 
unauthorised. If you are not an addressee, any disclosure or copying of the 
contents of this email or any action taken (or not taken) in reliance on it is 
unauthorised and may be unlawful. If you have received this email in error, 
please notify the sender or postmas...@vernalis.com. Email is not a secure 
method of communication and the Company cannot accept responsibility for the 
accuracy or completeness of this message or any attachment(s). Please check 
this email for virus infection for which the Company accepts no responsibility. 
If verification of this email is sought then please request a hard copy. Unless 
otherwise stated, any views or opinions presented are solely those of the 
author and do not represent those of the Company.

The Vernalis Group of Companies
100 Berkshire Place
Wharfedale Road
Winnersh, Berkshire
RG41 5RD, England
Tel: +44 (0)118 938 

To access trading company registration and address details, please go to the 
Vernalis website at www.vernalis.com and click on the "Company address and 
registration details" link at the bottom of the page..
__--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-19 Thread Jean-Marc Nuzillard
Sure !

I was only looking for a way of doing the things with bonds that
would be similar to the one with the atoms.

All the best,

Jean-Marc

Le 19/12/2016 à 11:55, Paul Emsley a écrit :
> On 19/12/2016 10:42, Jean-Marc Nuzillard wrote:
>> Thank you all!
>>
>> One more point:
>>
>> How do I get the bond indexes for which the E/Z configuration has been set?
>> I seems there are no "magic" properties for bonds and no HasProp() function 
>> for bonds.
> Iterate through the bond list and use bond.GetStereo() to find particular 
> values?
>
> It returns one of:
>
> STEREONONE
> STEREOANY 
> STEREOZ   
> STEREOE
>
> Paul.
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>


-- 
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/


--
Developer Access Program for Intel Xeon Phi Processors
Access to Intel Xeon Phi processor-based developer platforms.
With one year of Intel Parallel Studio XE.
Training and support from Colfax.
Order your platform today.http://sdm.link/intel
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-19 Thread Paul Emsley
On 19/12/2016 10:42, Jean-Marc Nuzillard wrote:
> Thank you all!
>
> One more point:
>
> How do I get the bond indexes for which the E/Z configuration has been set?
> I seems there are no "magic" properties for bonds and no HasProp() function 
> for bonds.

Iterate through the bond list and use bond.GetStereo() to find particular 
values?

It returns one of:

STEREONONE  
STEREOANY   
STEREOZ 
STEREOE

Paul.


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-19 Thread Jean-Marc Nuzillard

Thank you all!

One more point:

How do I get the bond indexes for which the E/Z configuration has been set?
I seems there are no "magic" properties for bonds and no HasProp() 
function for bonds.


All the best,

Jean-Marc



Le 19/12/2016 à 04:40, Greg Landrum a écrit :
One more piece that might help: the allHsExplicit to MolToSmiles() is 
there to make sure that implicit Hs (Hs not actually in the graph) 
show up in the output SMILES inside square brackets:

 In [12]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [13]: Chem.MolToSmiles(m,allHsExplicit=True)
Out[13]: '[CH3][CH]([OH])[Cl]'

If you actually have Hs in the molecular graph they will always be in 
the output SMILES, you don't need to use the allHsExplicit argument::

In [17]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [18]: mh = Chem.AddHs(m)

In [19]: Chem.MolToSmiles(mh)
Out[19]: '[H]OC([H])(Cl)C([H])([H])[H]'

-greg




On Mon, Dec 19, 2016 at 1:00 AM, Paolo Tosco > wrote:


Dear Jean-Marc,

as lactic2.sdf is a 3D structure which does not carry any
stereochemistry information in the SDF file, you will need to
perceive stereochemistry from the 3D structure with

Chem.AssignAtomChiralTagsFromStructure(mol)

before calling Chem.AssignStereochemistry().
It looks like allHsExplicit=True prevents SMILES chirality
specifications from being output:

In [1]: from rdkit import Chem

In [2]: molfilename = "lactic2.sdf"

In [3]: mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

In [4]: Chem.AssignAtomChiralTagsFromStructure(mol)

In [5]: Chem.AssignStereochemistry(mol, cleanIt=False,
force=False, flagPossibleStereoCenters=True)

In [6]: chiralAtoms = [a for a in mol.GetAtoms() if
a.HasProp("_ChiralityPossible")]

In [7]: chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]

In [8]: chiralAtomNums
Out[8]: [4]

In [9]: configs = [a.GetProp("_CIPCode") for a in chiralAtoms]

In [10]: configs
Out[10]: ['S']

In [11]: smi = Chem.MolToSmiles(mol, isomericSmiles=True)

In [12]: smi
Out[12]: '[H]OC(=O)[C@@]([H])(O[H])C([H])([H])[H]'

In [13]: smi = Chem.MolToSmiles(mol, isomericSmiles=True,
allHsExplicit=True)

In [14]: smi
Out[14]: '[H][O][C](=[O])[C]([H])([O][H])[C]([H])([H])[H]'


Cheers,
p.


On 12/18/2016 11:29 PM, Jean-Marc Nuzillard wrote:

Hi again,

When I run:

#
from rdkit import Chem

molfilename = "lactic2.sdf"
mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

Chem.AssignStereochemistry(mol, cleanIt=False, force=False,
flagPossibleStereoCenters=True)
chiralAtoms = [a for a in mol.GetAtoms() if
a.HasProp("_ChiralityPossible")]
chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
print "chiral centers: ",
print chiralAtomNums
configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
print configs

smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
print smi
#

Two (related?) problems arise.
First, _CIPCode rises a KeyError, even for atoms for which
_ChiralityPossible is defined.
When I comment the lines that define and print the configs
variable, the second problem arises.
The string smi does not contain any '@' or '@@', something I
expected from a chiral molecule
for an isomeric smiles string.

The attached lactic2.sdf file comes from PubChem. I removed (set
to 0) the parity flag for atom 4 (index 3)
because there are no parity flags in the files I will have to
deal with later.
Keeping the parity flag does not change anything.

What did I miss?

All the best,

Jean-Marc




--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org!http://sdm.link/slashdot

___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
___ Rdkit-discuss
mailing list Rdkit-discuss@lists.sourceforge.net

https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
 


--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


Re: [Rdkit-discuss] Stereochemistry

2016-12-18 Thread Greg Landrum
One more piece that might help: the allHsExplicit to MolToSmiles() is there
to make sure that implicit Hs (Hs not actually in the graph) show up in the
output SMILES inside square brackets:
 In [12]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [13]: Chem.MolToSmiles(m,allHsExplicit=True)
Out[13]: '[CH3][CH]([OH])[Cl]'

If you actually have Hs in the molecular graph they will always be in the
output SMILES, you don't need to use the allHsExplicit argument::
In [17]: m = Chem.MolFromSmiles('CC(O)(Cl)')

In [18]: mh = Chem.AddHs(m)

In [19]: Chem.MolToSmiles(mh)
Out[19]: '[H]OC([H])(Cl)C([H])([H])[H]'

-greg




On Mon, Dec 19, 2016 at 1:00 AM, Paolo Tosco  wrote:

> Dear Jean-Marc,
>
> as lactic2.sdf is a 3D structure which does not carry any stereochemistry
> information in the SDF file, you will need to perceive stereochemistry from
> the 3D structure with
>
> Chem.AssignAtomChiralTagsFromStructure(mol)
>
> before calling Chem.AssignStereochemistry().
> It looks like allHsExplicit=True prevents SMILES chirality specifications
> from being output:
>
> In [1]: from rdkit import Chem
>
> In [2]: molfilename = "lactic2.sdf"
>
> In [3]: mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]
>
> In [4]: Chem.AssignAtomChiralTagsFromStructure(mol)
>
> In [5]: Chem.AssignStereochemistry(mol, cleanIt=False, force=False,
> flagPossibleStereoCenters=True)
>
> In [6]: chiralAtoms = [a for a in mol.GetAtoms() if
> a.HasProp("_ChiralityPossible")]
>
> In [7]: chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
>
> In [8]: chiralAtomNums
> Out[8]: [4]
>
> In [9]: configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
>
> In [10]: configs
> Out[10]: ['S']
>
> In [11]: smi = Chem.MolToSmiles(mol, isomericSmiles=True)
>
> In [12]: smi
> Out[12]: '[H]OC(=O)[C@@]([H])(O[H])C([H])([H])[H]'
>
> In [13]: smi = Chem.MolToSmiles(mol, isomericSmiles=True,
> allHsExplicit=True)
>
> In [14]: smi
> Out[14]: '[H][O][C](=[O])[C]([H])([O][H])[C]([H])([H])[H]'
>
>
> Cheers,
> p.
>
>
> On 12/18/2016 11:29 PM, Jean-Marc Nuzillard wrote:
>
> Hi again,
>
> When I run:
>
> #
> from rdkit import Chem
>
> molfilename = "lactic2.sdf"
> mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]
>
> Chem.AssignStereochemistry(mol, cleanIt=False, force=False,
> flagPossibleStereoCenters=True)
> chiralAtoms = [a for a in mol.GetAtoms() if a.HasProp("_ChiralityPossible")]
>
> chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
> print "chiral centers: ",
> print chiralAtomNums
> configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
> print configs
>
> smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
> print smi
> #
>
> Two (related?) problems arise.
> First, _CIPCode rises a KeyError, even for atoms for which
> _ChiralityPossible is defined.
> When I comment the lines that define and print the configs variable, the
> second problem arises.
> The string smi does not contain any '@' or '@@', something I expected from
> a chiral molecule
> for an isomeric smiles string.
>
> The attached lactic2.sdf file comes from PubChem. I removed (set to 0) the
> parity flag for atom 4 (index 3)
> because there are no parity flags in the files I will have to deal with
> later.
> Keeping the parity flag does not change anything.
>
> What did I miss?
>
> All the best,
>
> Jean-Marc
>
>
>
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
>
>
>
> ___
> Rdkit-discuss mailing 
> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
> 
> --
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, SlashDot.org! http://sdm.link/slashdot
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-18 Thread Greg Landrum
On Mon, Dec 19, 2016 at 1:00 AM, Paolo Tosco  wrote:

>
> It looks like allHsExplicit=True prevents SMILES chirality specifications
> from being output:
>


In [8]: m = Chem.MolFromSmiles('C[C@H](F)(Cl)')

In [9]: Chem.MolToSmiles(m,isomericSmiles=True,allHsExplicit=True)
Out[9]: '[CH3][CH]([F])[Cl]'

Ouch! Yeah, that's a bug.
https://github.com/rdkit/rdkit/issues/1219

-greg
--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry

2016-12-18 Thread Paolo Tosco

Dear Jean-Marc,

as lactic2.sdf is a 3D structure which does not carry any 
stereochemistry information in the SDF file, you will need to perceive 
stereochemistry from the 3D structure with


Chem.AssignAtomChiralTagsFromStructure(mol)

before calling Chem.AssignStereochemistry().
It looks like allHsExplicit=True prevents SMILES chirality 
specifications from being output:


In [1]: from rdkit import Chem

In [2]: molfilename = "lactic2.sdf"

In [3]: mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

In [4]: Chem.AssignAtomChiralTagsFromStructure(mol)

In [5]: Chem.AssignStereochemistry(mol, cleanIt=False, force=False, 
flagPossibleStereoCenters=True)


In [6]: chiralAtoms = [a for a in mol.GetAtoms() if 
a.HasProp("_ChiralityPossible")]


In [7]: chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]

In [8]: chiralAtomNums
Out[8]: [4]

In [9]: configs = [a.GetProp("_CIPCode") for a in chiralAtoms]

In [10]: configs
Out[10]: ['S']

In [11]: smi = Chem.MolToSmiles(mol, isomericSmiles=True)

In [12]: smi
Out[12]: '[H]OC(=O)[C@@]([H])(O[H])C([H])([H])[H]'

In [13]: smi = Chem.MolToSmiles(mol, isomericSmiles=True, 
allHsExplicit=True)


In [14]: smi
Out[14]: '[H][O][C](=[O])[C]([H])([O][H])[C]([H])([H])[H]'


Cheers,
p.

On 12/18/2016 11:29 PM, Jean-Marc Nuzillard wrote:

Hi again,

When I run:

#
from rdkit import Chem

molfilename = "lactic2.sdf"
mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

Chem.AssignStereochemistry(mol, cleanIt=False, force=False, 
flagPossibleStereoCenters=True)
chiralAtoms = [a for a in mol.GetAtoms() if 
a.HasProp("_ChiralityPossible")]

chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
print "chiral centers: ",
print chiralAtomNums
configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
print configs

smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
print smi
#

Two (related?) problems arise.
First, _CIPCode rises a KeyError, even for atoms for which 
_ChiralityPossible is defined.
When I comment the lines that define and print the configs variable, 
the second problem arises.
The string smi does not contain any '@' or '@@', something I expected 
from a chiral molecule

for an isomeric smiles string.

The attached lactic2.sdf file comes from PubChem. I removed (set to 0) 
the parity flag for atom 4 (index 3)
because there are no parity flags in the files I will have to deal 
with later.

Keeping the parity flag does not change anything.

What did I miss?

All the best,

Jean-Marc



--
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry

2016-12-18 Thread Jean-Marc Nuzillard

Hi again,

When I run:

#
from rdkit import Chem

molfilename = "lactic2.sdf"
mol = Chem.SDMolSupplier(molfilename, removeHs = False)[0]

Chem.AssignStereochemistry(mol, cleanIt=False, force=False, 
flagPossibleStereoCenters=True)

chiralAtoms = [a for a in mol.GetAtoms() if a.HasProp("_ChiralityPossible")]
chiralAtomNums = [a.GetIdx()+1 for a in chiralAtoms]
print "chiral centers: ",
print chiralAtomNums
configs = [a.GetProp("_CIPCode") for a in chiralAtoms]
print configs

smi = Chem.MolToSmiles(mol, isomericSmiles=True, allHsExplicit=True)
print smi
#

Two (related?) problems arise.
First, _CIPCode rises a KeyError, even for atoms for which 
_ChiralityPossible is defined.
When I comment the lines that define and print the configs variable, the 
second problem arises.
The string smi does not contain any '@' or '@@', something I expected 
from a chiral molecule

for an isomeric smiles string.

The attached lactic2.sdf file comes from PubChem. I removed (set to 0) 
the parity flag for atom 4 (index 3)
because there are no parity flags in the files I will have to deal with 
later.

Keeping the parity flag does not change anything.

What did I miss?

All the best,

Jean-Marc

--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

Lactic acid. Atom 4 without parity.
  -OEChem-12181617163D

 12 11  0 1  0  0  0  0  0999 V2000
   -1.38751.11820.1968 O   0  0  0  0  0  0  0  0  0  0  0  0
1.4877   -1.03680.2617 O   0  0  0  0  0  0  0  0  0  0  0  0
1.22631.1148   -0.4123 O   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7078   -0.11180.4002 C   0  0  0  0  0  0  0  0  0  0  0  0
   -1.3669   -1.1626   -0.4759 C   0  0  0  0  0  0  0  0  0  0  0  0
0.74810.07810.0295 C   0  0  0  0  0  0  0  0  0  0  0  0
   -0.7822   -0.37481.4601 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.2848   -0.8968   -1.5360 H   0  0  0  0  0  0  0  0  0  0  0  0
   -2.4357   -1.2376   -0.2485 H   0  0  0  0  0  0  0  0  0  0  0  0
   -0.9100   -2.1472   -0.3365 H   0  0  0  0  0  0  0  0  0  0  0  0
   -1.02631.76040.8318 H   0  0  0  0  0  0  0  0  0  0  0  0
2.4313   -0.90490.0279 H   0  0  0  0  0  0  0  0  0  0  0  0
  1  4  1  0  0  0  0
  1 11  1  0  0  0  0
  2  6  1  0  0  0  0
  2 12  1  0  0  0  0
  3  6  2  0  0  0  0
  4  5  1  0  0  0  0
  4  6  1  0  0  0  0
  4  7  1  0  0  0  0
  5  8  1  0  0  0  0
  5  9  1  0  0  0  0
  5 10  1  0  0  0  0
M  END

--
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry Perception

2016-05-30 Thread John M
Rob,

You're actually correct in the first instance, that SMILES is correct and
you can define the stereochemistry like that. Although the molecule may not
be constitutionally chiral, those atoms are and are (pseudo)asymetric. In
Cahn-Ingold-Prelog notation they get a lower case r or s.

Try breaking the ring open, this changes nothing with the symmetry. Notice
this case is now the same as the first molecule which is handled correctly.

[image: Inline images 1]

N[C@@H]1CC[C@@](N)(CC1)CCC open-ring

J

Regards,
John W May
john.wilkinson...@gmail.com

On 27 May 2016 at 15:24, Rob Smith  wrote:

> Thank you very much Peter & Peter.
>
> The result makes perfect sense now. As I suspected, I did miss something
> obvious - the mirror plane.
>
> Best regards,
>
> Rob
>
>
> On Fri, May 27, 2016 at 3:14 PM, Peter Gedeck 
> wrote:
>
>> Hello Rob
>>
>> The compound is not chiral. There is a mirror plane that contains the
>> 5-ring and the C-NH3 bond. There is a cis / trans stereoisomers here like
>> in 1,4-dichloro-cyclohexane. That cannot be defined using the @symbols.
>> However I cannot tell you how to do this for cases like this in SMILES.
>>
>> Best
>>
>> Peter
>> On Fri, 27 May 2016 at 21:38, Rob Smith  wrote:
>>
>>> Hi all,
>>>
>>> I know there's been a lot of discussion about stereochemistry in RDKit,
>>> and I don't really want to open the can of worms particularly, but I would
>>> appreciate gaining a little more understanding to help explain an
>>> observation I've had (and it could be I've missed something really obvious).
>>>
>>> If I run the following Python RDKit code:
>>>
>>> from rdkit.Chem import AllChem as Chem
>>>
>>> AllMolecules = Chem.MolFromSmiles('CC[C@@]1(NC)CC[C@H](N)CC1.N[C@
>>> @H]1CC[C@]2(CC1)CCCN2.N[C@H]1CCC[C@@]2(C1)CCCN2.N[C@H]2[C@
>>> @]12CCCN1')
>>> molecules = Chem.GetMolFrags(AllMolecules, asMols=True)
>>> for eachMolecule in molecules:
>>> print(Chem.MolToSmiles(eachMolecule, isomericSmiles=True))
>>>
>>> The output I get is:
>>> CC[C@]1(NC)CC[C@@H](N)CC1
>>> NC1CCC2(CCCN2)CC1
>>> N[C@H]1CCC[C@]2(CCCN2)C1
>>> N[C@H]1[C@]12CCCN2
>>>
>>> The second molecule appears to be perceived as having no
>>> steroechemistry, however when a bond is broken in the pyrollidine to remove
>>> the spirocentre (the first molecule), the molecule is perceived as having
>>> stereochemistry. Also moving the pyrollidine spiro centre away from the 4
>>> position of the cyclohexyl ring appears to enable the stereocentre to be
>>> 'perceived'.
>>>
>>> Thanks in advance for your help,
>>>
>>> Kind regards,
>>>
>>> Rob
>>>
>>> --
>>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>>> traffic
>>> patterns at an interface-level. Reveals which users, apps, and protocols
>>> are
>>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>>> planning reports.
>>> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>>> ___
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>>
>>
>
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry Perception

2016-05-27 Thread Rob Smith
Thank you very much Peter & Peter.

The result makes perfect sense now. As I suspected, I did miss something
obvious - the mirror plane.

Best regards,

Rob


On Fri, May 27, 2016 at 3:14 PM, Peter Gedeck 
wrote:

> Hello Rob
>
> The compound is not chiral. There is a mirror plane that contains the
> 5-ring and the C-NH3 bond. There is a cis / trans stereoisomers here like
> in 1,4-dichloro-cyclohexane. That cannot be defined using the @symbols.
> However I cannot tell you how to do this for cases like this in SMILES.
>
> Best
>
> Peter
> On Fri, 27 May 2016 at 21:38, Rob Smith  wrote:
>
>> Hi all,
>>
>> I know there's been a lot of discussion about stereochemistry in RDKit,
>> and I don't really want to open the can of worms particularly, but I would
>> appreciate gaining a little more understanding to help explain an
>> observation I've had (and it could be I've missed something really obvious).
>>
>> If I run the following Python RDKit code:
>>
>> from rdkit.Chem import AllChem as Chem
>>
>> AllMolecules = Chem.MolFromSmiles('CC[C@@]1(NC)CC[C@H](N)CC1.N[C@
>> @H]1CC[C@]2(CC1)CCCN2.N[C@H]1CCC[C@@]2(C1)CCCN2.N[C@H]2[C@@]12CCCN1')
>> molecules = Chem.GetMolFrags(AllMolecules, asMols=True)
>> for eachMolecule in molecules:
>> print(Chem.MolToSmiles(eachMolecule, isomericSmiles=True))
>>
>> The output I get is:
>> CC[C@]1(NC)CC[C@@H](N)CC1
>> NC1CCC2(CCCN2)CC1
>> N[C@H]1CCC[C@]2(CCCN2)C1
>> N[C@H]1[C@]12CCCN2
>>
>> The second molecule appears to be perceived as having no steroechemistry,
>> however when a bond is broken in the pyrollidine to remove the spirocentre
>> (the first molecule), the molecule is perceived as having stereochemistry.
>> Also moving the pyrollidine spiro centre away from the 4 position of the
>> cyclohexyl ring appears to enable the stereocentre to be 'perceived'.
>>
>> Thanks in advance for your help,
>>
>> Kind regards,
>>
>> Rob
>>
>> --
>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>> traffic
>> patterns at an interface-level. Reveals which users, apps, and protocols
>> are
>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>> planning reports.
>> https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
>> ___
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry Perception

2016-05-27 Thread Peter Gedeck
Hello Rob

The compound is not chiral. There is a mirror plane that contains the
5-ring and the C-NH3 bond. There is a cis / trans stereoisomers here like
in 1,4-dichloro-cyclohexane. That cannot be defined using the @symbols.
However I cannot tell you how to do this for cases like this in SMILES.

Best

Peter
On Fri, 27 May 2016 at 21:38, Rob Smith  wrote:

> Hi all,
>
> I know there's been a lot of discussion about stereochemistry in RDKit,
> and I don't really want to open the can of worms particularly, but I would
> appreciate gaining a little more understanding to help explain an
> observation I've had (and it could be I've missed something really obvious).
>
> If I run the following Python RDKit code:
>
> from rdkit.Chem import AllChem as Chem
>
> AllMolecules = Chem.MolFromSmiles('CC[C@@]1(NC)CC[C@H](N)CC1.N[C@@H]1CC[C@
> ]2(CC1)CCCN2.N[C@H]1CCC[C@@]2(C1)CCCN2.N[C@H]2[C@@]12CCCN1')
> molecules = Chem.GetMolFrags(AllMolecules, asMols=True)
> for eachMolecule in molecules:
> print(Chem.MolToSmiles(eachMolecule, isomericSmiles=True))
>
> The output I get is:
> CC[C@]1(NC)CC[C@@H](N)CC1
> NC1CCC2(CCCN2)CC1
> N[C@H]1CCC[C@]2(CCCN2)C1
> N[C@H]1[C@]12CCCN2
>
> The second molecule appears to be perceived as having no steroechemistry,
> however when a bond is broken in the pyrollidine to remove the spirocentre
> (the first molecule), the molecule is perceived as having stereochemistry.
> Also moving the pyrollidine spiro centre away from the 4 position of the
> cyclohexyl ring appears to enable the stereocentre to be 'perceived'.
>
> Thanks in advance for your help,
>
> Kind regards,
>
> Rob
>
> --
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry Perception

2016-05-27 Thread Rob Smith
Hi all,

I know there's been a lot of discussion about stereochemistry in RDKit, and
I don't really want to open the can of worms particularly, but I would
appreciate gaining a little more understanding to help explain an
observation I've had (and it could be I've missed something really obvious).

If I run the following Python RDKit code:

from rdkit.Chem import AllChem as Chem

AllMolecules = Chem.MolFromSmiles('CC[C@@]1(NC)CC[C@H](N)CC1.N[C@@H]1CC[C@
]2(CC1)CCCN2.N[C@H]1CCC[C@@]2(C1)CCCN2.N[C@H]2[C@@]12CCCN1')
molecules = Chem.GetMolFrags(AllMolecules, asMols=True)
for eachMolecule in molecules:
print(Chem.MolToSmiles(eachMolecule, isomericSmiles=True))

The output I get is:
CC[C@]1(NC)CC[C@@H](N)CC1
NC1CCC2(CCCN2)CC1
N[C@H]1CCC[C@]2(CCCN2)C1
N[C@H]1[C@]12CCCN2

The second molecule appears to be perceived as having no steroechemistry,
however when a bond is broken in the pyrollidine to remove the spirocentre
(the first molecule), the molecule is perceived as having stereochemistry.
Also moving the pyrollidine spiro centre away from the 4 position of the
cyclohexyl ring appears to enable the stereocentre to be 'perceived'.

Thanks in advance for your help,

Kind regards,

Rob
--
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-14 Thread Greg Landrum
On Mon, Mar 14, 2016 at 6:39 AM, Jean-Marc Nuzillard <
jm.nuzill...@univ-reims.fr> wrote:

>
> You might want also to consider nitrones
> https://en.wikipedia.org/wiki/Nitrone
> that are sometimes written (CAS does it!) with
> a nitrogen atom surrounded by a C=C and a C=O double bond.
>

Fortunately those work already:

In [*9*]: m = Chem.MolFromSmiles('C/C=N(=O)/C')

In [*10*]: print(Chem.MolToSmiles(m,True))

C/C=[N+](/C)[O-]

:-)
 -greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-14 Thread Jean-Marc Nuzillard

Dear all,

for sure, having a double bond surrounded by four single bonds makes
the assignment of the E/Z configuration simpler.

You might want also to consider nitrones
https://en.wikipedia.org/wiki/Nitrone
that are sometimes written (CAS does it!) with
a nitrogen atom surrounded by a C=C and a C=O double bond.

Best regards,

Jean-Marc

Le 14/03/2016 13:51, Greg Landrum a écrit :

Dear all,

After reading through this, thinking about it, and searching some 
more, I decided to adopt an alternate solution.


Instead of removing the stereochemistry of the P=C double bond in in 
molecules like:

C/C=P(=O)/OC1=CC=CC=C1
I added that substructure to the list of things that sanitization 
"corrects". It now yields the zwitterionic [P+]-[O-] form. Here's an 
example:


In [*4*]: m = Chem.MolFromSmiles('C/C=P(=O)/OC1=CC=CC=C1')

In [*5*]: print(Chem.MolToSmiles(m,True))

C/C=[P+](\[O-])Oc1c1


Best,
-greg


On Thu, Mar 10, 2016 at 8:11 PM, Greg Landrum > wrote:


Dear all,

Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?

Here's a pubchem compound example that has the double bond crossed
(possibly leading one to believe that it could have stereochemistry):
https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem
received the structure):
https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the
compound record:
https://pubchem.ncbi.nlm.nih.gov/compound/87396055

Best,
-greg








--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-14 Thread Jean-Marc Nuzillard

Dear all,

for sure, having a double bond surrounded by four single bonds makes
the assignment of the E/Z configuration simpler.

My might want also to consider nitrones
https://en.wikipedia.org/wiki/Nitrone
that are sometimes written (CAS does it!) with
a nitrogen atom surrounded by a C=C and a C=O double bond.

Best regards,

Jean-Marc


Le 14/03/2016 13:51, Greg Landrum a écrit :

Dear all,

After reading through this, thinking about it, and searching some 
more, I decided to adopt an alternate solution.


Instead of removing the stereochemistry of the P=C double bond in in 
molecules like:

C/C=P(=O)/OC1=CC=CC=C1
I added that substructure to the list of things that sanitization 
"corrects". It now yields the zwitterionic [P+]-[O-] form. Here's an 
example:


In [*4*]: m = Chem.MolFromSmiles('C/C=P(=O)/OC1=CC=CC=C1')

In [*5*]: print(Chem.MolToSmiles(m,True))

C/C=[P+](\[O-])Oc1c1


Best,
-greg


On Thu, Mar 10, 2016 at 8:11 PM, Greg Landrum > wrote:


Dear all,

Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?

Here's a pubchem compound example that has the double bond crossed
(possibly leading one to believe that it could have stereochemistry):
https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem
received the structure):
https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the
compound record:
https://pubchem.ncbi.nlm.nih.gov/compound/87396055

Best,
-greg








--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785231=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-12 Thread Giuseppe Marco Randazzo
Im agree with you but if you consider triphenylphosphorane such as 
ethoxycarbonylmethylene triphenylphosphorane you will have different 
equilibrium between the cis and trans form function of the organic solvent. If 
you increase the polarity of the solvent, the equilibrium shifts in the 
direction of the trans isomer.
To explain this equilibrium if you take the cis rotamer the P+/O- attraction is 
maximised. So, Increasing the relative permittivity of the solvent, there will 
be reduction in the attraction of the opposite charges, thus the trans form 
will increase respect to the cis. To explain into images:




So.. probably i was too generic but i wanted to talk about situations like this.

Of course the simple triphenilphosphorane have no isomerism, but Jean-Marc do 
you  have any other example about cis/trans configuration?

Have a nice weekend
Marco



> On 11 Mar 2016, at 18:44, Jean-Marc Nuzillard  
> wrote:
> 
> Le 11/03/2016 10:38, Giuseppe Marco Randazzo a écrit :
>> An example can be the case of this isomerism is given by 
>> triphenylphosphorane (Witting reagents).
> 
> Wittig reagents with their three identical phenyl groups on the phosphorus 
> atom
> do not present any intriguing configuration problem around the P=C bond,
> contrarily to the compound that it was about in Greg's first message on this 
> topic.
> 
> I also wanted to point out that chirality is not necessarily centered on an 
> atom
> but may be axial, like in allenes:
> https://en.wikipedia.org/wiki/Axial_chirality 
> 
> 
> All the best,
> 
> Jean-Marc
> 
>> 
>> Here i give to you some publications were can find a clear publication about 
>> cis/trans isomerism and the importance.
>> 
>> [1] Conformation isomerism and coupling constants of formylmethylene 
>> triphenylphosphorane (C6H5)3P=CH-CHO
>> Comptes Rendus des Seances de l'Academie des Sciences, Serie C: Sciences 
>> Chimiques (1970), 270, (21), 1747-9.
>> 
>> [2] Structural and conformational analysis of 2-triphenylphosphoranylidene 
>> succinic acid derivatives by 1H, 13C and 31P one and two dimensional NMR 
>> spectroscopy and molecular modelling
>> Radu Bacaloglu,   Andrei Blaskó,   Clifford A. Bunton,   Giorgio Cerichelli, 
>>   Fernando Castaneda and   Enrique Rivera  
>> J. Chem. Soc., Perkin Trans. 2, 1995, 965-972
>> DOI: 10.1039/P2995965 
>> 
>> 
>> [3]  Favoured conformations of methyl iso­propyl, ethyl iso­propyl, methyl 
>> tert-butyl, and ethyl tert-butyl 2-(tri­phenyl­phospho­ranyl­idene)malonate
>> 
>> [4] Conformations of diester tri­phenyl­phospho­nium ylides with an ylidic 
>> ester or keto and ester ylidic groups
>> 
>> 
>> Best regards
>> Marco
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>> On 11 Mar 2016, at 10:12, Greg Landrum >> > wrote:
>>> 
>>> 
>>> On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard 
>>> >wrote:
>>> 
>>> Le 11/03/2016 05:11, Greg Landrum a écrit :
 
 Here's a question for the chemists in the group: do we need to be 
 concerned about representing the stereochemistry of the P=C bond in 
 substructures like O=P(/O)=C/C under normal circumstances?
>>> 
>>> It has a meaning to write that the configuration of the P=C bond is Z or E. 
>>> 
>>> If this is the case, I'd love to add some real examples to the test suite. 
>>> Can you point me to some examples (or a paper/web page talking about the 
>>> topic)?
>>> 
>>> -greg
>>>  
>>> --
>>> Transform Data into Opportunity.
>>> Accelerate data analysis in your applications with
>>> Intel Data Analytics Acceleration Library.
>>> Click to learn more.
>>> http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
>>>  
>>> 
>>> Rdkit-discuss mailing list
>>> Rdkit-discuss@lists.sourceforge.net 
>>> 
>>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
>>> 
>> 
> 
> 
> -- 
> Jean-Marc Nuzillard
> Institut de Chimie Moléculaire de Reims
> CNRS UMR 7312
> Moulin de la Housse
> CPCBAI, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
> 
> Tel : 03 26 91 82 10
> Fax : 03 26 91 31 66
> http://www.univ-reims.fr/ICMR 
> 
> http://www.univ-reims.fr/LSD/ 
> http://www.univ-reims.fr/LSD/JmnSoft/ 
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.

Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard

Le 11/03/2016 10:38, Giuseppe Marco Randazzo a écrit :
An example can be the case of this isomerism is given by 
triphenylphosphorane (Witting reagents).


Wittig reagents with their three identical phenyl groups on the 
phosphorus atom

do not present any intriguing configuration problem around the P=C bond,
contrarily to the compound that it was about in Greg's first message on 
this topic.


I also wanted to point out that chirality is not necessarily centered on 
an atom

but may be axial, like in allenes:
https://en.wikipedia.org/wiki/Axial_chirality

All the best,

Jean-Marc



Here i give to you some publications were can find a clear publication 
about cis/trans isomerism and the importance.


[1] Conformation isomerism and coupling constants of formylmethylene 
triphenylphosphorane (C6H5)3P=CH-CHO
Comptes Rendus des Seances de l'Academie des Sciences, Serie C: 
Sciences Chimiques (1970), 270, (21), 1747-9.


[2] Structural and conformational analysis of 
2-triphenylphosphoranylidene succinic acid derivatives by 1H, 13C 
and 31P one and two dimensional NMR spectroscopy and molecular modelling
Radu Bacaloglu,   Andrei Blaskó,   Clifford A. Bunton,   Giorgio 
Cerichelli,   Fernando Castaneda and   Enrique Rivera

J. Chem. Soc., Perkin Trans. 2, 1995, 965-972
DOI: 10.1039/P2995965


[3]  Favoured conformations of methyl iso­propyl, ethyl iso­propyl, 
methyl tert-butyl, and ethyl tert-butyl 
2-(tri­phenyl­phospho­ranyl­idene)malonate


[4] Conformations of diester tri­phenyl­phospho­nium ylides with an 
ylidic ester or keto and ester ylidic groups



Best regards
Marco










On 11 Mar 2016, at 10:12, Greg Landrum > wrote:



On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard 
> wrote:



Le 11/03/2016 05:11, Greg Landrum a écrit :


Here's a question for the chemists in the group: do we need to
be concerned about representing the stereochemistry of the P=C
bond in substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond
is Z or E.


If this is the case, I'd love to add some real examples to the test 
suite. Can you point me to some examples (or a paper/web page talking 
about the topic)?


-greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss





--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Greg Landrum
I think these are all different. The substructure in question here is
R1O/P(=O)=C/R2

I think I managed to convince myself that stereochemistry here is
reasonable by rewriting the structure as:

R1O/[P+]([O-])=C/R2

but I would still certainly like some real examples.

-greg

On Fri, Mar 11, 2016 at 10:38 AM, Giuseppe Marco Randazzo <
gmranda...@gmail.com> wrote:

> An example can be the case of this isomerism is given by
> triphenylphosphorane (Witting reagents).
>
> Here i give to you some publications were can find a clear publication
> about cis/trans isomerism and the importance.
>
> [1] Conformation isomerism and coupling constants of formylmethylene
> triphenylphosphorane (C6H5)3P=CH-CHO
> Comptes Rendus des Seances de l'Academie des Sciences, Serie C:
> Sciences Chimiques (1970), 270, (21), 1747-9.
>
> [2] Structural and conformational analysis of 2-triphenylphosphoranylidene
> succinic acid derivatives by 1H, 13C and 31P one and two dimensional NMR
> spectroscopy and molecular modelling
> Radu Bacaloglu,   Andrei Blaskó,   Clifford A. Bunton,   Giorgio
> Cerichelli,   Fernando Castaneda and   Enrique Rivera
> J. Chem. Soc., Perkin Trans. 2, 1995, 965-972
> DOI: 10.1039/P2995965
>
>
> [3]  Favoured conformations of methyl iso­propyl, ethyl iso­propyl,
> methyl tert-butyl, and ethyl tert-butyl
> 2-(tri­phenyl­phospho­ranyl­idene)malonate
>
> [4] Conformations of diester tri­phenyl­phospho­nium ylides with an ylidic
> ester or keto and ester ylidic groups
>
>
> Best regards
> Marco
>
>
>
>
>
>
>
> On 11 Mar 2016, at 10:12, Greg Landrum  wrote:
>
>
> On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard <
> jm.nuzill...@univ-reims.fr> wrote:
>
>>
>> Le 11/03/2016 05:11, Greg Landrum a écrit :
>>
>>
>> Here's a question for the chemists in the group: do we need to be
>> concerned about representing the stereochemistry of the P=C bond in
>> substructures like O=P(/O)=C/C under normal circumstances?
>>
>>
>> It has a meaning to write that the configuration of the P=C bond is Z or
>> E.
>>
>
> If this is the case, I'd love to add some real examples to the test suite.
> Can you point me to some examples (or a paper/web page talking about the
> topic)?
>
> -greg
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard
I do not have the feeling that the handling of a C=P bond should be 
different of the one of a C=C bond.


Jean-Marc


Le 11/03/2016 10:12, Greg Landrum a écrit :


On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard 
> wrote:



Le 11/03/2016 05:11, Greg Landrum a écrit :


Here's a question for the chemists in the group: do we need to be
concerned about representing the stereochemistry of the P=C bond
in substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond
is Z or E.


If this is the case, I'd love to add some real examples to the test 
suite. Can you point me to some examples (or a paper/web page talking 
about the topic)?


-greg



--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Greg Landrum
On Fri, Mar 11, 2016 at 10:05 AM, Jean-Marc Nuzillard <
jm.nuzill...@univ-reims.fr> wrote:

>
> Le 11/03/2016 05:11, Greg Landrum a écrit :
>
>
> Here's a question for the chemists in the group: do we need to be
> concerned about representing the stereochemistry of the P=C bond in
> substructures like O=P(/O)=C/C under normal circumstances?
>
>
> It has a meaning to write that the configuration of the P=C bond is Z or
> E.
>

If this is the case, I'd love to add some real examples to the test suite.
Can you point me to some examples (or a paper/web page talking about the
topic)?

-greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Jean-Marc Nuzillard

Dear all,

Le 11/03/2016 05:11, Greg Landrum a écrit :

Dear all,

Here's a question for the chemists in the group: do we need to be 
concerned about representing the stereochemistry of the P=C bond in 
substructures like O=P(/O)=C/C under normal circumstances?


It has a meaning to write that the configuration of the P=C bond is Z or E.

All the best,

Jean-Marc



Here's a pubchem compound example that has the double bond crossed 
(possibly leading one to believe that it could have stereochemistry):

https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem 
received the structure):

https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the compound 
record:

https://pubchem.ncbi.nlm.nih.gov/compound/87396055






Best,
-greg







--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Giuseppe Marco Randazzo
ahhh :-) now i understand. Ok it’s an other point of question so… 

if the oxygen bonded to the Phosphor of the group C=P is in Cis or Trans. Yes, 
describe this feature make sense. 

The bond C=P is blocked, so the oxygen is not free to be rotated along the bond 
C=P. 
Finally, i think is important to describe this kind of isomerism. 

However about atropisomerism i’m a bit unconvinced to be added into a SMILES 
notation, because this kind of isomerism it depends on the conformation of the 
molecule and not in the configuration as in the case of the oxygen in Cis/Trans 
of the C=P group. 

Marco


> On 11 Mar 2016, at 09:48, Greg Landrum  wrote:
> 
> Hi Marco,
> 
> Sorry I wasn't clear in the original question. I was asking about the 
> cis/trans stereochemistry of the C=P bond. I agree that it's not generally 
> useful to think of bonds as being chiral.[1] 
> 
> -greg
> [1] There's an argument to be made here about the best way to represent 
> atropisomers, but that's for a different discussion
> 
> 
> On Fri, Mar 11, 2016 at 9:22 AM, Giuseppe Marco Randazzo 
> > wrote:
> Dear Greg,
> 
> as i know from organic/inorganic and physical chemistry courses a 
> stereochemistry like that is unreal and i think it’s a bug of the pubchem 
> depiction generator.
> 
> Atoms can be chiral.
> 
> Bonds are not chiral. 
> 
> Why bonds are not chiral? The answer is given by the molecular orbital theory 
> (MO), which says that when you make a bond between two atoms, orbitals need 
> to be  “in phase”, and aligned one along the other. MO use the linear 
> combination of atomic orbitals, which says that from N orbitals which are 
> combined, where generated N new orbitals:
> N/2 boding and N/2 antibonding.  These orbitals bonding and anti bonding, are 
> not chiral because the direction of these is given by the resolution of the 
> schroedinger equations so… and they have a well “defined” direction in the 3D 
> space (probability to find an electron in that space). So the concept of 
> phase between the orbitals which are combined is very important and can’t be 
> chiral because of the well defined direction in the 3D space. 
> 
> I’m available if you need something else.
> 
> Best regards
> Marco
> 
> 
>> On 11 Mar 2016, at 05:11, Greg Landrum > > wrote:
>> 
>> Dear all,
>> 
>> Here's a question for the chemists in the group: do we need to be concerned 
>> about representing the stereochemistry of the P=C bond in substructures like 
>> O=P(/O)=C/C under normal circumstances?
>> 
>> Here's a pubchem compound example that has the double bond crossed (possibly 
>> leading one to believe that it could have stereochemistry):
>> https://pubchem.ncbi.nlm.nih.gov/compound/56981965 
>> 
>> Here's the corresponding substance record (which is how PubChem received the 
>> structure):
>> https://pubchem.ncbi.nlm.nih.gov/substance/135741697 
>> 
>> 
>> Another example, this time without the crossed bond in the compound record:
>> https://pubchem.ncbi.nlm.nih.gov/compound/87396055 
>> 
>> 
>> Best,
>> -greg
>> 
>> 
>> 
>> 
>> 
>> --
>> Transform Data into Opportunity.
>> Accelerate data analysis in your applications with
>> Intel Data Analytics Acceleration Library.
>> Click to learn more.
>> http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
>>  
>> 
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net 
>> 
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss 
>> 
> 
> 

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Greg Landrum
Hi Marco,

Sorry I wasn't clear in the original question. I was asking about the
cis/trans stereochemistry of the C=P bond. I agree that it's not generally
useful to think of bonds as being chiral.[1]

-greg
[1] There's an argument to be made here about the best way to represent
atropisomers, but that's for a different discussion


On Fri, Mar 11, 2016 at 9:22 AM, Giuseppe Marco Randazzo <
gmranda...@gmail.com> wrote:

> Dear Greg,
>
> as i know from organic/inorganic and physical chemistry courses a
> stereochemistry like that is unreal and i think it’s a bug of the pubchem
> depiction generator.
>
> Atoms can be chiral.
>
> Bonds are not chiral.
>
> Why bonds are not chiral? The answer is given by the molecular orbital
> theory (MO), which says that when you make a bond between two atoms,
> orbitals need to be  “in phase”, and aligned one along the other. MO use
> the linear combination of atomic orbitals, which says that from N orbitals
> which are combined, where generated N new orbitals:
> N/2 boding and N/2 antibonding.  These orbitals bonding and anti bonding,
> are not chiral because the direction of these is given by the resolution of
> the schroedinger equations so… and they have a well “defined” direction in
> the 3D space (probability to find an electron in that space). So the
> concept of phase between the orbitals which are combined is very important
> and can’t be chiral because of the well defined direction in the 3D space.
>
> I’m available if you need something else.
>
> Best regards
> Marco
>
>
> On 11 Mar 2016, at 05:11, Greg Landrum  wrote:
>
> Dear all,
>
> Here's a question for the chemists in the group: do we need to be
> concerned about representing the stereochemistry of the P=C bond in
> substructures like O=P(/O)=C/C under normal circumstances?
>
> Here's a pubchem compound example that has the double bond crossed
> (possibly leading one to believe that it could have stereochemistry):
> https://pubchem.ncbi.nlm.nih.gov/compound/56981965
> Here's the corresponding substance record (which is how PubChem received
> the structure):
> https://pubchem.ncbi.nlm.nih.gov/substance/135741697
>
> Another example, this time without the crossed bond in the compound record:
> https://pubchem.ncbi.nlm.nih.gov/compound/87396055
>
> Best,
> -greg
>
>
>
>
>
>
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
>
>
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry question

2016-03-11 Thread Giuseppe Marco Randazzo
Dear Greg,

as i know from organic/inorganic and physical chemistry courses a 
stereochemistry like that is unreal and i think it’s a bug of the pubchem 
depiction generator.

Atoms can be chiral.

Bonds are not chiral. 

Why bonds are not chiral? The answer is given by the molecular orbital theory 
(MO), which says that when you make a bond between two atoms, orbitals need to 
be  “in phase”, and aligned one along the other. MO use the linear combination 
of atomic orbitals, which says that from N orbitals which are combined, where 
generated N new orbitals:
N/2 boding and N/2 antibonding.  These orbitals bonding and anti bonding, are 
not chiral because the direction of these is given by the resolution of the 
schroedinger equations so… and they have a well “defined” direction in the 3D 
space (probability to find an electron in that space). So the concept of phase 
between the orbitals which are combined is very important and can’t be chiral 
because of the well defined direction in the 3D space. 

I’m available if you need something else.

Best regards
Marco


> On 11 Mar 2016, at 05:11, Greg Landrum  wrote:
> 
> Dear all,
> 
> Here's a question for the chemists in the group: do we need to be concerned 
> about representing the stereochemistry of the P=C bond in substructures like 
> O=P(/O)=C/C under normal circumstances?
> 
> Here's a pubchem compound example that has the double bond crossed (possibly 
> leading one to believe that it could have stereochemistry):
> https://pubchem.ncbi.nlm.nih.gov/compound/56981965 
> 
> Here's the corresponding substance record (which is how PubChem received the 
> structure):
> https://pubchem.ncbi.nlm.nih.gov/substance/135741697 
> 
> 
> Another example, this time without the crossed bond in the compound record:
> https://pubchem.ncbi.nlm.nih.gov/compound/87396055 
> 
> 
> Best,
> -greg
> 
> 
> 
> 
> 
> --
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry question

2016-03-10 Thread Greg Landrum
Dear all,

Here's a question for the chemists in the group: do we need to be concerned
about representing the stereochemistry of the P=C bond in substructures
like O=P(/O)=C/C under normal circumstances?

Here's a pubchem compound example that has the double bond crossed
(possibly leading one to believe that it could have stereochemistry):
https://pubchem.ncbi.nlm.nih.gov/compound/56981965
Here's the corresponding substance record (which is how PubChem received
the structure):
https://pubchem.ncbi.nlm.nih.gov/substance/135741697

Another example, this time without the crossed bond in the compound record:
https://pubchem.ncbi.nlm.nih.gov/compound/87396055

Best,
-greg
--
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-11 Thread John M
Interesting discussion, never decided myself whether it was worth handling
two implied neighbors:

C[S@H](=O)


Probably v. low barrier to inversion for this example but thought I'd share.

John
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-11 Thread Andrew Dalke
On Feb 10, 2016, at 6:09 AM, Greg Landrum wrote:
> I agree that this is a bug.

Glad to hear. I was wondering how I would get my code to handle that case 
otherwise.

On Feb 10, 2016, at 4:19 PM, David Cosgrove wrote:
> As chiralities go, this one has turned out to be quite valuable!


You can tell that despite my work at AZ, I never really looked at their 
structures.
Even if it may have been paying for me. :)

On Feb 11, 2016, at 11:04 AM, John M wrote:
> Interesting discussion, never decided myself whether it was worth handling 
> two implied neighbors:
> 
> C[S@H](=O)
> 
> Probably v. low barrier to inversion for this example but thought I'd share.


For what it's worth:

>>> from rdkit import Chem
>>> Chem.CanonSmiles("C[S@H](=O)")
'C[SH]=O'
>>> Chem.CanonSmiles("C[S@]([H])(=O)")
'C[SH]=O'
>>> Chem.CanonSmiles("C[S@]([2H])(=O)")
'[2H][S@@](C)=O'

There's a PubChem entry for the last structure, CID 53693370 at

  https://pubchem.ncbi.nlm.nih.gov/compound/53693370

It uses the non-chiral [2H]S(=O)C . The tritium version is CID 58150378. 

My PubChem search was for 'CS(=O)[H]' with all of the options checked off. 
Other hits were CID 18594370, CID 59598555, and CID 59950339. None are marked 
as chiral.

All appear to come from patent sources. As I barely know what I'm doing here, 
I'll leave it at that.

Cheers,
Andrew
da...@dalkescientific.com



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-11 Thread Jean-Marc Nuzillard

Not sure that the anything[S@H](=O) molecules exist...

Jean-Marc

Le 11/02/2016 11:04, John M a écrit :
Interesting discussion, never decided myself whether it was worth 
handling two implied neighbors:


C[S@H](=O)


Probably v. low barrier to inversion for this example but thought I'd 
share.


John


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss



--
Jean-Marc Nuzillard
Institut de Chimie Moléculaire de Reims
CNRS UMR 7312
Moulin de la Housse
CPCBAI, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 03 26 91 82 10
Fax : 03 26 91 31 66
http://www.univ-reims.fr/ICMR

http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-10 Thread David Cosgrove
Hi Andrew,

As chiralities go, this one has turned out to be quite valuable!

https://en.wikipedia.org/wiki/Esomeprazole

Dave


On Mon, Feb 8, 2016 at 3:05 PM, Andrew Dalke 
wrote:

> Hi!
>
>   Could someone explain to this non-chemist what the chirality means in
> the following?
>
>   CN[S@@](=O)C1=CC=CC=C1
>
> It comes from PubChem id 12194260 at
> https://pubchem.ncbi.nlm.nih.gov/compound/12194260 .
>
> Isn't this a symmetric structure, which can't have an orientation at that
> point? Even if it can have a chirality, which sort of chirality is it? The
> list at http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html
> says:
>
>   Tetrahedral is the default class for degree four
>   Allene-like is the default class for degree 2
>   Square-planar is another class for degree four
>   Trigonal-bipyramidal is the default class for degree five
>   Octahedral is the default class for degree six
>
> but says nothing about degree three. And RDKit agrees that this is degree
> 3:
>
>   >>> mol = Chem.MolFromSmiles("CN[S@@](=O)C1=CC=CC=C1")
>   >>> mol.GetAtomWithIdx(2).GetDegree()
>   3
>
>
> This came up while testing my algorithm to fragment a structure. I expect
> to get the same structure back.
>
> I started with:
>
>   >>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
>   'CN[S@@](=O)c1c1'
>
> The fragmentation produces:
>
>   >>> Chem.CanonSmiles("C*.N*.*[S@@](=O)C1=CC=CC=C1")
>   '[*]C.[*]N.[*][S@@](=O)c1c1'
>
> I can manipulate this at the SMILES level to insert two closures and
> produce the reconnect-able SMILES
>
> C2.N23.[S@@]3(=O)C1=CC=CC=C1
>  ^--^
>  ^--^
>
> When I process that, I get a flipped chirality:
>
>   >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
>   'CN[S@](=O)c1c1'
>
> I did not expect this. The Daylight SMILES spec says:
>
>   The chiral order of the ring closure bond is implied by the
>   lexical order that the ring closure digit appears on the
>   chiral atom (not in the lexical order of the "substituent" atom).
>
> I expected the '*' of '*[S**]' and the '3' of '[S**]3' to have the same
> bond position so give the same chirality.
>
> Finally, if I replace the '[S@@]' with a '[C@@]' or '[P@@]' I lose the
> chirality:
>
>   >>> Chem.CanonSmiles("CN[C@@](=O)C1=CC=CC=C1")
>   'CNC(=O)c1c1'
>   >>> Chem.CanonSmiles("CN[P@@](=O)C1=CC=CC=C1")
>   'CN[P](=O)c1c1'
>
>
> At this point I can't tell if there's a problem with how I understand
> stereochemistry, how I understand SMILES, or how I understand RDKit.
>
>
>
> Andrew
> da...@dalkescientific.com
>
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-09 Thread Greg Landrum
I agree that this is a bug.
Here's a simpler reproducible:
In [11]: Chem.CanonSmiles("C[S@](Cl)=O")
Out[11]: 'C[S@@](=O)Cl'

In [12]: Chem.CanonSmiles("C[S@]2=O.Cl2")
Out[12]: 'C[S@](=O)Cl'

Note that it seems to have something to do with the special handling of the
S=O, because this looks fine:

In [8]: Chem.CanonSmiles("C[C@](F)(Cl)O")
Out[8]: 'C[C@](O)(F)Cl'

In [9]: Chem.CanonSmiles("C[C@]1(Cl)O.F1")
Out[9]: 'C[C@](O)(F)Cl'

I'll file the bug report and take a look.
-greg


On Tue, Feb 9, 2016 at 4:12 AM, Andrew Dalke 
wrote:

>
> Interestingly, I see that two different RDKit versions give two different
> answers. Which is correct?
>
>   == most recent version appears to swap the chirality ==
>
> >>> import rdkit
> >>> rdkit.__version__
> '2016.03.1.dev1'
> >>> Chem.CanonSmiles("CN[S@](c1c1)=O")
> 'CN[S@@](=O)c1c1'
> >>> Chem.CanonSmiles("CN[S@]2=O.c12c1")
> 'CN[S@](=O)c1c1'
>
>   == older version gives the answer I expect ==
>
> >>> import rdkit
> >>> rdkit.__version__
> '2015.09.1.dev1'
> >>> Chem.CanonSmiles("CN[S@](c1c1)=O")
> 'CN[S@@](=O)c1c1'
> >>> Chem.CanonSmiles("CN[S@]2=O.c12c1")
> 'CN[S@@](=O)c1c1'
>
> I think the older version is correct because the SMILES chirality depends
> on the bond ordering, not the lexical position.
>
>
> I don't see anything in the milestone:2016_03_1 issues related to this
> specific item, so I wonder if this change was deliberate.
>
>
>
> Andrew
> da...@dalkescientific.com
>
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Andrew D. Fant
The other thing to remember is that at room temperature and pressure, small 
sulphoxides will be able to interconvert forms from R to S rapidly.  It's only 
when the groups on the sulphur get big enoough (or interconnected, like in a 3 
or 4 member ring) that they actually can be resolved and isolated in one 
enantiopure form or another.  In principle, this is also true for any other 
tri-valent element with a lone pair, although I don't know if anyone has ever 
done the resolution of something like 1N,2-dimethylaziridine.

Andy

On February 8, 2016 10:30:35 AM EST, Andrew Dalke  
wrote:
>Thanks Paolo and Hannes for pointing me to sulfoxide. I am enlightened!
>
>I assume this is something that every chemist knows, but it's not
>mentioned in the Daylight SMILES documentation (or the OpenSMILES
>documentation), so I had no clue. I wonder how many more cases there
>are like that.
>
>Any idea then on why the following two have inverted chiralities?
>
>  >>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
>  'CN[S@@](=O)c1c1'
>
>   >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
>  'CN[S@](=O)c1c1'
>
>
>
>
>   Andrew
>   da...@dalkescientific.com
>
>
>
>--
>Site24x7 APM Insight: Get Deep Visibility into Application Performance
>APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>Monitor end-to-end web transactions and take corrective actions now
>Troubleshoot faster and improve end-user experience. Signup Now!
>http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
>___
>Rdkit-discuss mailing list
>Rdkit-discuss@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Andrew Dalke
On Feb 8, 2016, at 7:03 PM, Paolo Tosco wrote:
> ... there is a "ghost" atom involved in determining the sulfur chirality, 
> which is the sulfur lone pair. Even if this is not in the Daylight specs, the 
> lone-pair is usually treated as an implicit hydrogen, and therefore 
> considered as the first atom in the clockwise or anticlockwise accounting:

Thanks for the explanation.

Interestingly, I see that two different RDKit versions give two different 
answers. Which is correct?

  == most recent version appears to swap the chirality ==

>>> import rdkit
>>> rdkit.__version__
'2016.03.1.dev1'
>>> Chem.CanonSmiles("CN[S@](c1c1)=O")
'CN[S@@](=O)c1c1'
>>> Chem.CanonSmiles("CN[S@]2=O.c12c1")
'CN[S@](=O)c1c1'

  == older version gives the answer I expect ==

>>> import rdkit
>>> rdkit.__version__
'2015.09.1.dev1'
>>> Chem.CanonSmiles("CN[S@](c1c1)=O")
'CN[S@@](=O)c1c1'
>>> Chem.CanonSmiles("CN[S@]2=O.c12c1")
'CN[S@@](=O)c1c1'

I think the older version is correct because the SMILES chirality depends on 
the bond ordering, not the lexical position. 


I don't see anything in the milestone:2016_03_1 issues related to this specific 
item, so I wonder if this change was deliberate.



Andrew
da...@dalkescientific.com



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Dear Andrew,

that functional group is a sulfoxide, and it is indeed chiral because 
has a lone pair on the sulfur, which is pyramidal; there is a short 
description here:
https://en.wikipedia.org/wiki/Sulfoxide

So it is the same (R,S) chirality you would have on a tetrahedral 
carbon. The carbon analogue of a sulfoxide, that is a carbonyl group, is 
planar and therefore is not chiral; this explains why you lose the 
chirality.

Kind regards,
Paolo

On 08/02/2016 15:05, Andrew Dalke wrote:
> Hi!
>
>Could someone explain to this non-chemist what the chirality means in the 
> following?
>
>CN[S@@](=O)C1=CC=CC=C1
>
> It comes from PubChem id 12194260 at 
> https://pubchem.ncbi.nlm.nih.gov/compound/12194260 .
>
> Isn't this a symmetric structure, which can't have an orientation at that 
> point? Even if it can have a chirality, which sort of chirality is it? The 
> list at http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html says:
>
>Tetrahedral is the default class for degree four
>Allene-like is the default class for degree 2
>Square-planar is another class for degree four
>Trigonal-bipyramidal is the default class for degree five
>Octahedral is the default class for degree six
>
> but says nothing about degree three. And RDKit agrees that this is degree 3:
>
>>>> mol = Chem.MolFromSmiles("CN[S@@](=O)C1=CC=CC=C1")
>>>> mol.GetAtomWithIdx(2).GetDegree()
>3
>
>
> This came up while testing my algorithm to fragment a structure. I expect to 
> get the same structure back.
>
> I started with:
>
>>>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
>'CN[S@@](=O)c1c1'
>
> The fragmentation produces:
>
>>>> Chem.CanonSmiles("C*.N*.*[S@@](=O)C1=CC=CC=C1")
>'[*]C.[*]N.[*][S@@](=O)c1c1'
>
> I can manipulate this at the SMILES level to insert two closures and produce 
> the reconnect-able SMILES
>
>  C2.N23.[S@@]3(=O)C1=CC=CC=C1
>   ^--^
>   ^--^
>
> When I process that, I get a flipped chirality:
>
>>>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
>'CN[S@](=O)c1c1'
>
> I did not expect this. The Daylight SMILES spec says:
>
>The chiral order of the ring closure bond is implied by the
>lexical order that the ring closure digit appears on the
>chiral atom (not in the lexical order of the "substituent" atom).
>
> I expected the '*' of '*[S**]' and the '3' of '[S**]3' to have the same bond 
> position so give the same chirality.
>
> Finally, if I replace the '[S@@]' with a '[C@@]' or '[P@@]' I lose the 
> chirality:
>
>>>> Chem.CanonSmiles("CN[C@@](=O)C1=CC=CC=C1")
>'CNC(=O)c1c1'
>>>> Chem.CanonSmiles("CN[P@@](=O)C1=CC=CC=C1")
>'CN[P](=O)c1c1'
>
>
> At this point I can't tell if there's a problem with how I understand 
> stereochemistry, how I understand SMILES, or how I understand RDKit.
>
>
>
>   Andrew
>   da...@dalkescientific.com
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Andrew Dalke
Thanks Paolo and Hannes for pointing me to sulfoxide. I am enlightened!

I assume this is something that every chemist knows, but it's not mentioned in 
the Daylight SMILES documentation (or the OpenSMILES documentation), so I had 
no clue. I wonder how many more cases there are like that.

Any idea then on why the following two have inverted chiralities?

  >>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
  'CN[S@@](=O)c1c1'

   >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
  'CN[S@](=O)c1c1'




Andrew
da...@dalkescientific.com



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Hannes Loeffler
On Mon, 8 Feb 2016 16:05:46 +0100
Andrew Dalke  wrote:

> Hi!
> 
>   Could someone explain to this non-chemist what the chirality means
> in the following?
> 
>   CN[S@@](=O)C1=CC=CC=C1
> 
> It comes from PubChem id 12194260 at
> https://pubchem.ncbi.nlm.nih.gov/compound/12194260 .
> 
> Isn't this a symmetric structure, which can't have an orientation at
> that point? Even if it can have a chirality, which sort of chirality
> is it?

Sulfoxides are chiral: https://en.wikipedia.org/wiki/Sulfoxide

I suspect the degree comes from the fact that the sulfur binds three
atoms and the lone pair is not counted.


Cheers,
Hannes.

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Andrew Dalke
Hi!

  Could someone explain to this non-chemist what the chirality means in the 
following?

  CN[S@@](=O)C1=CC=CC=C1

It comes from PubChem id 12194260 at 
https://pubchem.ncbi.nlm.nih.gov/compound/12194260 .

Isn't this a symmetric structure, which can't have an orientation at that 
point? Even if it can have a chirality, which sort of chirality is it? The list 
at http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html says:

  Tetrahedral is the default class for degree four
  Allene-like is the default class for degree 2
  Square-planar is another class for degree four
  Trigonal-bipyramidal is the default class for degree five
  Octahedral is the default class for degree six

but says nothing about degree three. And RDKit agrees that this is degree 3:

  >>> mol = Chem.MolFromSmiles("CN[S@@](=O)C1=CC=CC=C1")
  >>> mol.GetAtomWithIdx(2).GetDegree()
  3


This came up while testing my algorithm to fragment a structure. I expect to 
get the same structure back.

I started with:

  >>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
  'CN[S@@](=O)c1c1'

The fragmentation produces:

  >>> Chem.CanonSmiles("C*.N*.*[S@@](=O)C1=CC=CC=C1")
  '[*]C.[*]N.[*][S@@](=O)c1c1'

I can manipulate this at the SMILES level to insert two closures and produce 
the reconnect-able SMILES

C2.N23.[S@@]3(=O)C1=CC=CC=C1
 ^--^
 ^--^

When I process that, I get a flipped chirality:

  >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
  'CN[S@](=O)c1c1'

I did not expect this. The Daylight SMILES spec says:

  The chiral order of the ring closure bond is implied by the
  lexical order that the ring closure digit appears on the
  chiral atom (not in the lexical order of the "substituent" atom).

I expected the '*' of '*[S**]' and the '3' of '[S**]3' to have the same bond 
position so give the same chirality.

Finally, if I replace the '[S@@]' with a '[C@@]' or '[P@@]' I lose the 
chirality:

  >>> Chem.CanonSmiles("CN[C@@](=O)C1=CC=CC=C1")
  'CNC(=O)c1c1'
  >>> Chem.CanonSmiles("CN[P@@](=O)C1=CC=CC=C1")
  'CN[P](=O)c1c1'


At this point I can't tell if there's a problem with how I understand 
stereochemistry, how I understand SMILES, or how I understand RDKit.



Andrew
da...@dalkescientific.com



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Guillaume GODIN
Dear Andrew,

You can find an chemical example there:

https://books.google.ch/books?id=IZInzn8Rsp8C=PA49=PA49=stereochemistry+sulfinamide+%5BS@@%5D=bl=7AD1hUe0PJ=037kY78v-qG6WRtSL6yJc-pCHn4=fr=X=0ahUKEwiPv4aRuujKAhVHSBQKHTYDB7wQ6AEIHjAA#v=onepage=stereochemistry%20sulfinamide%20%5BS%40%40%5D=false


best regards,

Dr. Guillaume GODIN
Project Manager
Innovation
CORPORATE R DIVISION
DIRECT LINE +41 (0)22 780 3645
MOBILE   +41 (0)79 536 1039 
Firmenich SA
RUE DES JEUNES 1 | CASE POSTALE 239 | CH-1211 GENEVE 8
TEL +41(0)22 780 2211 | Fax. +41(0)22 780 3334 | www.firmenich.com

De : Andrew Dalke <da...@dalkescientific.com>
Envoyé : lundi 8 février 2016 16:05
À : rdkit-discuss@lists.sourceforge.net Discuss
Objet : [Rdkit-discuss] stereochemistry of S with degree 3

Hi!

  Could someone explain to this non-chemist what the chirality means in the 
following?

  CN[S@@](=O)C1=CC=CC=C1

It comes from PubChem id 12194260 at 
https://pubchem.ncbi.nlm.nih.gov/compound/12194260 .

Isn't this a symmetric structure, which can't have an orientation at that 
point? Even if it can have a chirality, which sort of chirality is it? The list 
at http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html says:

  Tetrahedral is the default class for degree four
  Allene-like is the default class for degree 2
  Square-planar is another class for degree four
  Trigonal-bipyramidal is the default class for degree five
  Octahedral is the default class for degree six

but says nothing about degree three. And RDKit agrees that this is degree 3:

  >>> mol = Chem.MolFromSmiles("CN[S@@](=O)C1=CC=CC=C1")
  >>> mol.GetAtomWithIdx(2).GetDegree()
  3


This came up while testing my algorithm to fragment a structure. I expect to 
get the same structure back.

I started with:

  >>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
  'CN[S@@](=O)c1c1'

The fragmentation produces:

  >>> Chem.CanonSmiles("C*.N*.*[S@@](=O)C1=CC=CC=C1")
  '[*]C.[*]N.[*][S@@](=O)c1c1'

I can manipulate this at the SMILES level to insert two closures and produce 
the reconnect-able SMILES

C2.N23.[S@@]3(=O)C1=CC=CC=C1
 ^--^
 ^--^

When I process that, I get a flipped chirality:

  >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
  'CN[S@](=O)c1c1'

I did not expect this. The Daylight SMILES spec says:

  The chiral order of the ring closure bond is implied by the
  lexical order that the ring closure digit appears on the
  chiral atom (not in the lexical order of the "substituent" atom).

I expected the '*' of '*[S**]' and the '3' of '[S**]3' to have the same bond 
position so give the same chirality.

Finally, if I replace the '[S@@]' with a '[C@@]' or '[P@@]' I lose the 
chirality:

  >>> Chem.CanonSmiles("CN[C@@](=O)C1=CC=CC=C1")
  'CNC(=O)c1c1'
  >>> Chem.CanonSmiles("CN[P@@](=O)C1=CC=CC=C1")
  'CN[P](=O)c1c1'


At this point I can't tell if there's a problem with how I understand 
stereochemistry, how I understand SMILES, or how I understand RDKit.



Andrew
da...@dalkescientific.com



--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
**  
DISCLAIMER  
This email and any files transmitted with it, including replies and forwarded 
copies (which may contain alterations) subsequently transmitted from Firmenich, 
are confidential and solely for the use of the intended recipient. The contents 
do not represent the opinion of Firmenich except to the extent that it relates 
to their official business.  
**

--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Sorry for the noise, this is the same message as before, just with less 
typos and repetitions. I couldn't help re-sending it after reading what 
I had written!

Dear Andrew,

the reason why Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1") returns

'CN[S@@](=O)c1c1'

and Chem.CanonSmiles("CN1.[S@@]1(=O)C1=CC=CC=C1") returns

'CN[S@](=O)c1c1'

is that there is a "ghost" atom involved in determining the sulfur 
chirality, which is the sulfur lone pair. Even if this is not in the 
Daylight specs, the lone-pair is usually treated as an implicit 
hydrogen, and therefore considered as the first atom in the clockwise or 
anticlockwise accounting:

http://sourceforge.net/p/cdk/mailman/message/34650435/
http://www.opensmiles.org/opensmiles.html#chirality

Therefore, the sulfoxide case is equivalent to the following:

Chem.CanonSmiles("CN[C@@H](O)C1=CC=CC=C1")

'CN[C@@H](O)c1c1'

Chem.CanonSmiles("CN1.[C@@H]1(O)C1=CC=CC=C1")

'CN[C@H](O)c1c1'

Best,
Paolo


On 02/08/16 15:30, Andrew Dalke wrote:
> Thanks Paolo and Hannes for pointing me to sulfoxide. I am enlightened!
>
> I assume this is something that every chemist knows, but it's not mentioned 
> in the Daylight SMILES documentation (or the OpenSMILES documentation), so I 
> had no clue. I wonder how many more cases there are like that.
>
> Any idea then on why the following two have inverted chiralities?
>
>>>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
>'CN[S@@](=O)c1c1'
>
> >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
>'CN[S@](=O)c1c1'
>
>
>
>
>   Andrew
>   da...@dalkescientific.com
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] stereochemistry of S with degree 3

2016-02-08 Thread Paolo Tosco
Dear Andrew,

the reason why Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1") returns

'CN[S@@](=O)c1c1'

and Chem.CanonSmiles("CN1.[S@@]1(=O)C1=CC=CC=C1") returns

'CN[S@](=O)c1c1'

is that there is a "ghost" atom involved in determining the sulfur 
chirality, which is a lone pair, which is the sulfur lone pair, which 
concurs in determining the atom parity. Even if this is not in the 
Daylight specs, the lone-pair is usually treated as an implicit 
nitrogen, and therefore considered as the first atom in the clockwise or 
anticlockwise accounting:

http://sourceforge.net/p/cdk/mailman/message/34650435/
http://www.opensmiles.org/opensmiles.html#chirality

Therefore, the sulfoxide case is equivalent to the following:

Chem.CanonSmiles("CN[C@@H](O)C1=CC=CC=C1")

'CN[C@@H](O)c1c1'

Chem.CanonSmiles("CN1.[C@@H]1(O)C1=CC=CC=C1")

'CN[C@H](O)c1c1'

Best,
Paolo


On 02/08/16 15:30, Andrew Dalke wrote:
> Thanks Paolo and Hannes for pointing me to sulfoxide. I am enlightened!
>
> I assume this is something that every chemist knows, but it's not mentioned 
> in the Daylight SMILES documentation (or the OpenSMILES documentation), so I 
> had no clue. I wonder how many more cases there are like that.
>
> Any idea then on why the following two have inverted chiralities?
>
>>>> Chem.CanonSmiles("CN[S@@](=O)C1=CC=CC=C1")
>'CN[S@@](=O)c1c1'
>
> >>> Chem.CanonSmiles("C2.N23.[S@@]3(=O)C1=CC=CC=C1")
>'CN[S@](=O)c1c1'
>
>
>
>
>   Andrew
>   da...@dalkescientific.com
>
>
>
> --
> Site24x7 APM Insight: Get Deep Visibility into Application Performance
> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
> Monitor end-to-end web transactions and take corrective actions now
> Troubleshoot faster and improve end-user experience. Signup Now!
> http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151=/4140
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry breaks ReactionRunner.cpp

2015-11-30 Thread Dante
On Wed, Nov 18, 2015 at 1:13 PM, Dante  wrote:

> Hi all,
>
> I have run across some errors when attempting to use RunReactants on
> molecules with specified stereochemistry, as show in the below two example
> cases:
>
> I notice that the same molecules will run without errors using this
> reaction specification if stereochemistry is turned off.
>
> case 1:
> >>> rxn2 =
> AllChem.ReactionFromSmarts('[#1;D1R0:4][#8;H1D2R0:3][#6;H0D3R0:2](=[#8;H0D1R0:5])[#6;D4;H1,H0,H2:1]([#6:7])[#6,#1D1AR0,ClH0D1AR0,FH0D1AR0,BrH0D1AR0:6]>>[*:3]=[*:2]=[*:5].[*:4]-[*:1](-[*:6])-[*:7]')
> >>> mol2 = AllChem.MolFromSmiles('CSCC[C@@H](N)C(=O)O')
> >>> mol2 = AllChem.AddHs(mol2)
> >>> rxn2.RunReactants([mol2])
> [13:06:37]
>
> 
> Invariant Violation
> expected reactant bond not found
> Violation occurred on line 533 in file
> /tmp/rdkit20150904-11712-k5lp6f/rdkit-Release_2015_03_1/Code/GraphMol/ChemReactions/ReactionRunner.cpp
> Failed Expression: rBond
> 
>
> Traceback (most recent call last):
>   File "", line 1, in 
> RuntimeError: Invariant Violation
> >>> mol2 = AllChem.MolFromSmiles('CSCCC(N)C(=O)O')
> >>> mol2 = AllChem.AddHs(mol2)
> >>> rxn2.RunReactants([mol2])
> ((,  object at 0x1078823c8>),)
>
> case 2:
>
> rxn =
> AllChem.ReactionFromSmarts('[#1;D1R0:5][#6;H1D4:4]1[#6;H1D4:6][#6;H1D4:7]([#8;H1D2R0:8])[#6;H1D4:9][#8;H0D2:1][#6;H1D4:2]1[#8;H1D2R0:3]>>[*:3]-[*:2](-[*:5])-[*:4]-1-[*:1]-[*:9]-[*:7](-[*:8])-[*:6]-1')
> >>> mol = AllChem.MolFromSmiles('OC[C@H]1OC(O)[C@H](O)[C@H](O)[C@@H]1O')
> >>> mol = AllChem.AddHs(mol)
> >>> rxn.RunReactants([mol])
> [12:51:43]
>
> 
> Invariant Violation
> expected reactant bond not found
> Violation occurred on line 533 in file
> /tmp/rdkit20150904-11712-k5lp6f/rdkit-Release_2015_03_1/Code/GraphMol/ChemReactions/ReactionRunner.cpp
> Failed Expression: rBond
> 
>
> Traceback (most recent call last):
>   File "", line 1, in 
> RuntimeError: Invariant Violation
> >>> mol = AllChem.MolFromSmiles('OCC1OC(O)C(O)C(O)C1O')
> >>> mol = AllChem.AddHs(mol)
> >>> rxn.RunReactants([mol])
> ((,),)
>
> Would anyone be able to shed light on why this might be occurring?
>
> Cheers,
>
> Dante
>
--
Go from Idea to Many App Stores Faster with Intel(R) XDK
Give your users amazing mobile app experiences with Intel(R) XDK.
Use one codebase in this all-in-one HTML5 development environment.
Design, debug & build mobile apps & 2D/3D high-impact games for multiple OSs.
http://pubads.g.doubleclick.net/gampad/clk?id=254741911=/4140___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


[Rdkit-discuss] Stereochemistry breaks ReactionRunner.cpp

2015-11-18 Thread Dante
Hi all,

I have run across some errors when attempting to use RunReactants on
molecules with specified stereochemistry, as show in the below two example
cases:

I notice that the same molecules will run without errors using this
reaction specification if stereochemistry is turned off.

case 1:
>>> rxn2 =
AllChem.ReactionFromSmarts('[#1;D1R0:4][#8;H1D2R0:3][#6;H0D3R0:2](=[#8;H0D1R0:5])[#6;D4;H1,H0,H2:1]([#6:7])[#6,#1D1AR0,ClH0D1AR0,FH0D1AR0,BrH0D1AR0:6]>>[*:3]=[*:2]=[*:5].[*:4]-[*:1](-[*:6])-[*:7]')
>>> mol2 = AllChem.MolFromSmiles('CSCC[C@@H](N)C(=O)O')
>>> mol2 = AllChem.AddHs(mol2)
>>> rxn2.RunReactants([mol2])
[13:06:37]


Invariant Violation
expected reactant bond not found
Violation occurred on line 533 in file
/tmp/rdkit20150904-11712-k5lp6f/rdkit-Release_2015_03_1/Code/GraphMol/ChemReactions/ReactionRunner.cpp
Failed Expression: rBond


Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: Invariant Violation
>>> mol2 = AllChem.MolFromSmiles('CSCCC(N)C(=O)O')
>>> mol2 = AllChem.AddHs(mol2)
>>> rxn2.RunReactants([mol2])
((, ),)

case 2:

rxn =
AllChem.ReactionFromSmarts('[#1;D1R0:5][#6;H1D4:4]1[#6;H1D4:6][#6;H1D4:7]([#8;H1D2R0:8])[#6;H1D4:9][#8;H0D2:1][#6;H1D4:2]1[#8;H1D2R0:3]>>[*:3]-[*:2](-[*:5])-[*:4]-1-[*:1]-[*:9]-[*:7](-[*:8])-[*:6]-1')
>>> mol = AllChem.MolFromSmiles('OC[C@H]1OC(O)[C@H](O)[C@H](O)[C@@H]1O')
>>> mol = AllChem.AddHs(mol)
>>> rxn.RunReactants([mol])
[12:51:43]


Invariant Violation
expected reactant bond not found
Violation occurred on line 533 in file
/tmp/rdkit20150904-11712-k5lp6f/rdkit-Release_2015_03_1/Code/GraphMol/ChemReactions/ReactionRunner.cpp
Failed Expression: rBond


Traceback (most recent call last):
  File "", line 1, in 
RuntimeError: Invariant Violation
>>> mol = AllChem.MolFromSmiles('OCC1OC(O)C(O)C(O)C1O')
>>> mol = AllChem.AddHs(mol)
>>> rxn.RunReactants([mol])
((,),)

Would anyone be able to shed light on why this might be occurring?

Cheers,

Dante
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-21 Thread Markus Sitzmann
Hi James,

I know that my opinion might sound extreme but I had this discussion
many times (mostly regarding tautomerism which is, however, similar in
some way). The problem is, you can look at a chemical structure in
many different ways - two scenarios are:

1. What can I perceive from a chemical structure if all I have is the
pure connection table and nothing else (and maybe millions of them)
2. What can I find about a particular structure if a I can run fully
fledged quantum-mechanical calculations, do an extensive literature
search, and/or have carefully measured experimental data and
conditions (rarely in the millions :-))

So, if I deal with something like implementing RDKit, things are
probably always quite close to scenario 1, hence my suggestion to
disregard stereochemistry on these type of N atoms (you need a lot of
information from scenario 2 to even decide whether there is
stereochemistry or not). The ideal solution, of course, would be to
offer three different modes for stereo perception: disregard,
keep, perceive from 3D (I am not sure if Greg likes that :-)).  If
these three modes would be available I still would suggest to set the
default to disregard for 3-coordinated N because the other two modes
require that you know what you are doing and/or have full trust in
your data - otherwise you probably do more harm than good.

Best,
Markus

On Fri, Aug 21, 2015 at 3:10 PM, James Davidson j.david...@vernalis.com wrote:
 Hi Greg (and Markus, Peter, et al.),



 Personal opinion – my vote would be to always keep the chiral information at
 3-valent nitrogen centres…

 As Peter pointed-out, there are bridgehead examples (most of which, I guess,
 will have additional carbon chiral centres – and offer diastereomeric
 considerations).

 There are also, I believe, some nice oxaziridine examples where the
 oxaziridine N is the only chiral centre present (interpreted from abstract
 here: http://dx.doi.org/10.1039/C3985998):



 3,3-dimethyl (2S)-2-tert-butyloxaziridine-3,3-dicarboxylate

 COC(=O)C1(O[N@]1C(C)(C)C)C(=O)OC



 and many other examples of diastereomeric oxaziridines – where the N is a
 chiral centre – eg see http://dx.doi.org/10.1016/j.tetasy.2008.09.016





 Kind regards



 James


 __
 PLEASE READ: This email is confidential and may be privileged. It is
 intended for the named addressee(s) only and access to it by anyone else is
 unauthorised. If you are not an addressee, any disclosure or copying of the
 contents of this email or any action taken (or not taken) in reliance on it
 is unauthorised and may be unlawful. If you have received this email in
 error, please notify the sender or postmas...@vernalis.com. Email is not a
 secure method of communication and the Company cannot accept responsibility
 for the accuracy or completeness of this message or any attachment(s).
 Please check this email for virus infection for which the Company accepts no
 responsibility. If verification of this email is sought then please request
 a hard copy. Unless otherwise stated, any views or opinions presented are
 solely those of the author and do not represent those of the Company.

 The Vernalis Group of Companies
 100 Berkshire Place
 Wharfedale Road
 Winnersh, Berkshire
 RG41 5RD, England
 Tel: +44 (0)118 938 

 To access trading company registration and address details, please go to the
 Vernalis website at www.vernalis.com and click on the Company address and
 registration details link at the bottom of the page..
 __

 --

 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-20 Thread Markus Sitzmann
Hehe, that is why I keep my computers always really cold when I run RDKit ... 

-
|  Markus Sitzmann
|  markus.sitzm...@gmail.com

 On 20.08.2015, at 04:33, Peter Shenkin shen...@gmail.com wrote:
 
 Maybe when you have a toolkit as blazingly fast as RDKit it captures the 
 chirality of N center before it has time to interconvert
 
 -P.
 
 On Wed, Aug 19, 2015 at 10:17 PM, John M john.wilkinson...@gmail.com wrote:
 More odd is the carbon stereocentre with two methyls...
 
 Generally trivalent nitrogens are not considered chiral due to inversion of 
 the lone-pair. The two usual exceptions are when they are a bridgehead or in 
 a tight ring (cyclopropane). This is the same in most toolkits, the InChI 
 technical documentation provides useful examples.
 
 InChI actually only sees one stereo centre since it strips the proton off:
 InChI=1S/C13H26N2/c1-4-14-8-5-12(6-9-14)15-10-7-13(15)11(2)3/h11-13H,4-10H2,1-3H3/p+1/t13-/m1/s1
 
 It may well be chiral in this case but since it's not you should also 
 strictly remove the other stereocentre in the para position to the nitrogen
 
 For the record just tested and ChemAxon/CDK/OpenBabel do the same.
 
 John
 
 Regards,
 John W May 
 john.wilkinson...@gmail.com
 
 On 19 August 2015 at 09:00, Rob Smith robtsm...@gmail.com wrote:
 Dear RDKit community,
 
 I'm trying to use RDKit to read in Corina generated stereoisomers (from a 
 Mol file), assign chiral tags and stereochemistry to the structure and 
 output the canonical smiles string for each isomer of a given molecule (in 
 Python), when I do this, half the canonical smiles strings are not unique.
 
 When I read in the output from Corina into an Indigo instance, then use the 
 canonical smiles from Indigo to create an RDKit molecule, canonical smiles 
 strings generated from the molecule objects are all unique.
 
 I may be missing an option to enable RDKit to 'visualise' the chiral centre 
 adjacent to the protonated nitrogen, so if someone can spot where I've made 
 a mistake, I'd really appreciate it. I've included the output and Python 
 script below. If you require any further information, please let me know.
 
 Many thanks,
 Rob
 
 Output:
 
 RDKit Read in of Molecule
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1
 
 INDIGO Read in of Molecule
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@H]2C(C)C)CC1
 
 Python script :
 
 from rdkit import Chem
 import subprocess # Used to run Corina
 from indigo import *
 
 def runCorinaTest(inputMol):
 indigo = Indigo()
 
 molFile = Chem.MolToMolBlock(inputMol)
 
 corinaCommand = echo \' + molFile + \' | 
 # Then Corina - generate stereoisomers...
 corinaCommand = corinaCommand + /apps/corina/corina -t n -d 
 canon,stergen,preserve,names,wh,flapn,msc=7,msi=128 -i t=sdf
 corinaResult = subprocess.check_output([corinaCommand], shell=True) # 
 Gives the stereoisomer species as an SDF string
 
 allMoleculeObjects = []
 allMolecules = corinaResult.split(\n) # Separate Corina output 
 into individual molecules
 allMolecules = allMolecules[0:len(allMolecules)-1]
 
 print(RDKit Read in of Molecule)
 
 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = Chem.MolFromMolBlock(eachMolecule, sanitize=True, 
 removeHs=True, strictParsing=False)
 Chem.rdmolops.AssignAtomChiralTagsFromStructure(mol, 
 replaceExistingTags=True)
 Chem.rdmolops.AssignStereochemistry(mol)
 print(RDKit Output -   + Chem.MolToSmiles(mol, 
 isomericSmiles=True))
 
 print(INDIGO Read in of Molecule)
 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = indigo.loadMolecule(eachMolecule)
 # print(Indigo Output -  + mol.canonicalSmiles())
 # Use Indigo Canonical Smiles to create RDKit molecule
 mol = Chem.MolFromSmiles(mol.canonicalSmiles())
 if mol is not None:
 print(RDKit Output -   + Chem.MolToSmiles(mol, 
 isomericSmiles=True))
 
 return 0
 
 mol = Chem.MolFromSmiles(CC(C)C1[NH+](C2CCN(CC)CC2)CC1)
 z = runCorinaTest(mol)
 
 

Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-20 Thread Greg Landrum
This isn't a simple one, so it may take a bit to get to an answer that's
comprehensible.

There are two things going on here in the RDKit:
1) Ring stereochemistry
2) stereochemistry about nitrogen centers

Let's start with the second, because it's easier: RDKit does not generally
believe in stereochemistry around three coordinate nitrogens. Here's a
very simple example:
In [45]: m3 = Chem.MolFromSmiles('Br[N@](F)Cl')

In [46]: Chem.MolToSmiles(m3,isomericSmiles=True)
Out[46]: 'FN(Cl)Br'


The 3D equivalent of that:
In [41]: m = Chem.MolFromSmiles('BrN(F)Cl')

In [42]: AllChem.EmbedMolecule(m)
Out[42]: 0

In [43]: Chem.AssignAtomChiralTagsFromStructure(m)

In [44]: Chem.MolToSmiles(m,isomericSmiles=True)
Out[44]: 'FN(Cl)Br'

Contrast this with what you get for a carbon:

In [34]: m2 = Chem.MolFromSmiles('FC(Br)(Cl)I')

In [35]: AllChem.EmbedMolecule(m2)
Out[35]: 0

In [36]: Chem.AssignAtomChiralTagsFromStructure(m2)

In [37]: Chem.MolToSmiles(m2,isomericSmiles=True)
Out[37]: 'F[C@](Cl)(Br)I'


Back to the first: ring stereochemistry. By this I mean things like C[C@H
]1CC[C@@H](C)CC1 - molecules where the stereochemistry information is
really about whether the substituents of the ring are cis or trans relative
to the ring plane.

The way the RDKit handles this is something of a hack: it doesn't identify
those atoms as chiral centers, but it does preserve the chiral tags when
generating a canonical SMILES:

In [47]: m = Chem.MolFromSmiles('C[C@H]1CC[C@@H](C)CC1')

In [48]: Chem.FindMolChiralCenters(m)
Out[48]: []

In [49]: Chem.MolToSmiles(m,isomericSmiles=True)
Out[49]: 'C[C@H]1CC[C@@H](C)CC1'

Curiously, to me at least, it does the same thing with nitrogens;

In [52]: m2 = Chem.MolFromSmiles('C[N@@]1CC[C@@H](C)CC1')

In [53]: Chem.MolToSmiles(m2,isomericSmiles=True)
Out[53]: 'C[C@H]1CC[N@](C)CC1'

Lest anyone think that this might make sense because being a ring makes
inversion more difficult, that's not what is going on here. If I make the
ring truly chiral, then the stereochemistry of the N is removed:

In [54]: m3 = Chem.MolFromSmiles('C[N@@]1CO[C@@H](C)CC1')

In [55]: Chem.MolToSmiles(m3,isomericSmiles=True)
Out[55]: 'C[C@H]1CCN(C)CO1'

I believe that this inconsistent behavior is a bug: either N should always
have the input stereochemistry preserved (and that should be perceived from
the 3D coordinates) or it should never have the input stereochemistry
preserved. My initial answer, and I would love input on this, is that
three-coordinate N should always have stereochemistry removed.

-greg



On Thu, Aug 20, 2015 at 2:22 PM, Rob Smith robtsm...@gmail.com wrote:

 Hi Greg,

 I've attached the SDF that Corina generates. I'm not convinced it is a
 problem, more an observation that I'm trying to understand.

 Looking at the results again today - it seems that from the Corina output
 Indigo is interpreting the conformer (including whether the ethyl
 substituent on the piperidine nitrogen is equatorial or axial) - and
 outputting a canonical smiles string that has the conformer encoded in it
 (using the chiral flags). Whereas RDKit is reading in the Corina output,
 discounting whether the nitrogen is axial or equatorial (which due to
 inversion I can understand) and interpreting it as having only two chiral
 centers (which is correct).

 What is confusing me, is that when I supply RDKit with the canonical
 smiles string from Indigo (which has the conformer encoded in it), and
 then ask for the isomeric canonical smiles, it supplies the canonical
 smiles with the conformer still encoded within it.

 For example, I read in the following canonical smiles string into
 RDKit: CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1 (which was generated
 by reading in one of the mols in the SD File into RDKit and output the
 isomeric canonical smiles), running the FindMolChiralCenters on this
 molecule, correctly reports the number of chiral centres to be 2 (6S, 9R),
 and then asking it to output the canonical smiles string (with
 isomericSmiles=True) gives CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1 (1).

 If I take the same mol file, read it into Indigo, and ask it to output the
 canonical smiles string, I get: CC(C)[C@H]1CC[N@H+]1[C@@H]1CC[N@@](CC1)CC,
 if I read this smiles string into RDKit and run FindMolCenters on it, I get
 (3R, 6S) - which is fine, if I then out the canonical smiles (again with
 isomericSmiles=True) I get CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1. I
 expected this isomeric canonical smiles to be the same as (1), however
 RDKit appears to conserve the conformer representation given to it from an
 isomeric smiles string, but when reading a Mol file doesn't keep all
 conformer information (axial or equatorial substituents on a nitrogen).

 Thanks to all for your quick (and quick witted) responses

 Rob


 On Thu, Aug 20, 2015 at 3:46 AM, Greg Landrum greg.land...@gmail.com
 wrote:

 Hi Rob,

 The results below are quite strange. As John has already pointed out:
 there really shouldn't be chirality present on 

Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-20 Thread Markus Sitzmann
I agree with remove - the chance that you destroy actual information
by this is low - or in other words, the chance that steroinformation
on three-coordinate N is spurious I would expect as high.

Markus

On Thu, Aug 20, 2015 at 4:30 PM, Greg Landrum greg.land...@gmail.com wrote:
 This isn't a simple one, so it may take a bit to get to an answer that's
 comprehensible.

 There are two things going on here in the RDKit:
 1) Ring stereochemistry
 2) stereochemistry about nitrogen centers

 Let's start with the second, because it's easier: RDKit does not generally
 believe in stereochemistry around three coordinate nitrogens. Here's a
 very simple example:
 In [45]: m3 = Chem.MolFromSmiles('Br[N@](F)Cl')

 In [46]: Chem.MolToSmiles(m3,isomericSmiles=True)
 Out[46]: 'FN(Cl)Br'


 The 3D equivalent of that:
 In [41]: m = Chem.MolFromSmiles('BrN(F)Cl')

 In [42]: AllChem.EmbedMolecule(m)
 Out[42]: 0

 In [43]: Chem.AssignAtomChiralTagsFromStructure(m)

 In [44]: Chem.MolToSmiles(m,isomericSmiles=True)
 Out[44]: 'FN(Cl)Br'

 Contrast this with what you get for a carbon:

 In [34]: m2 = Chem.MolFromSmiles('FC(Br)(Cl)I')

 In [35]: AllChem.EmbedMolecule(m2)
 Out[35]: 0

 In [36]: Chem.AssignAtomChiralTagsFromStructure(m2)

 In [37]: Chem.MolToSmiles(m2,isomericSmiles=True)
 Out[37]: 'F[C@](Cl)(Br)I'


 Back to the first: ring stereochemistry. By this I mean things like
 C[C@H]1CC[C@@H](C)CC1 - molecules where the stereochemistry information is
 really about whether the substituents of the ring are cis or trans relative
 to the ring plane.

 The way the RDKit handles this is something of a hack: it doesn't identify
 those atoms as chiral centers, but it does preserve the chiral tags when
 generating a canonical SMILES:

 In [47]: m = Chem.MolFromSmiles('C[C@H]1CC[C@@H](C)CC1')

 In [48]: Chem.FindMolChiralCenters(m)
 Out[48]: []

 In [49]: Chem.MolToSmiles(m,isomericSmiles=True)
 Out[49]: 'C[C@H]1CC[C@@H](C)CC1'

 Curiously, to me at least, it does the same thing with nitrogens;

 In [52]: m2 = Chem.MolFromSmiles('C[N@@]1CC[C@@H](C)CC1')

 In [53]: Chem.MolToSmiles(m2,isomericSmiles=True)
 Out[53]: 'C[C@H]1CC[N@](C)CC1'

 Lest anyone think that this might make sense because being a ring makes
 inversion more difficult, that's not what is going on here. If I make the
 ring truly chiral, then the stereochemistry of the N is removed:

 In [54]: m3 = Chem.MolFromSmiles('C[N@@]1CO[C@@H](C)CC1')

 In [55]: Chem.MolToSmiles(m3,isomericSmiles=True)
 Out[55]: 'C[C@H]1CCN(C)CO1'

 I believe that this inconsistent behavior is a bug: either N should always
 have the input stereochemistry preserved (and that should be perceived from
 the 3D coordinates) or it should never have the input stereochemistry
 preserved. My initial answer, and I would love input on this, is that
 three-coordinate N should always have stereochemistry removed.

 -greg



 On Thu, Aug 20, 2015 at 2:22 PM, Rob Smith robtsm...@gmail.com wrote:

 Hi Greg,

 I've attached the SDF that Corina generates. I'm not convinced it is a
 problem, more an observation that I'm trying to understand.

 Looking at the results again today - it seems that from the Corina output
 Indigo is interpreting the conformer (including whether the ethyl
 substituent on the piperidine nitrogen is equatorial or axial) - and
 outputting a canonical smiles string that has the conformer encoded in it
 (using the chiral flags). Whereas RDKit is reading in the Corina output,
 discounting whether the nitrogen is axial or equatorial (which due to
 inversion I can understand) and interpreting it as having only two chiral
 centers (which is correct).

 What is confusing me, is that when I supply RDKit with the canonical
 smiles string from Indigo (which has the conformer encoded in it), and
 then ask for the isomeric canonical smiles, it supplies the canonical smiles
 with the conformer still encoded within it.

 For example, I read in the following canonical smiles string into RDKit:
 CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1 (which was generated by reading
 in one of the mols in the SD File into RDKit and output the isomeric
 canonical smiles), running the FindMolChiralCenters on this molecule,
 correctly reports the number of chiral centres to be 2 (6S, 9R), and then
 asking it to output the canonical smiles string (with isomericSmiles=True)
 gives CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1 (1).

 If I take the same mol file, read it into Indigo, and ask it to output the
 canonical smiles string, I get: CC(C)[C@H]1CC[N@H+]1[C@@H]1CC[N@@](CC1)CC,
 if I read this smiles string into RDKit and run FindMolCenters on it, I get
 (3R, 6S) - which is fine, if I then out the canonical smiles (again with
 isomericSmiles=True) I get CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1. I
 expected this isomeric canonical smiles to be the same as (1), however RDKit
 appears to conserve the conformer representation given to it from an
 isomeric smiles string, but when reading a Mol file doesn't keep all
 conformer 

[Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-19 Thread Rob Smith
Dear RDKit community,

I'm trying to use RDKit to read in Corina generated stereoisomers (from a
Mol file), assign chiral tags and stereochemistry to the structure and
output the canonical smiles string for each isomer of a given molecule (in
Python), when I do this, half the canonical smiles strings are not unique.

When I read in the output from Corina into an Indigo instance, then use the
canonical smiles from Indigo to create an RDKit molecule, canonical smiles
strings generated from the molecule objects are all unique.

I may be missing an option to enable RDKit to 'visualise' the chiral centre
adjacent to the protonated nitrogen, so if someone can spot where I've made
a mistake, I'd really appreciate it. I've included the output and Python
script below. If you require any further information, please let me know.

Many thanks,
Rob

Output:

RDKit Read in of Molecule
RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1
RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1

INDIGO Read in of Molecule
RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@H]2C(C)C)CC1
RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@H]2C(C)C)CC1

Python script :

from rdkit import Chem
import subprocess # Used to run Corina
from indigo import *

def runCorinaTest(inputMol):
indigo = Indigo()

molFile = Chem.MolToMolBlock(inputMol)

corinaCommand = echo \' + molFile + \' | 
# Then Corina - generate stereoisomers...
corinaCommand = corinaCommand + /apps/corina/corina -t n -d
canon,stergen,preserve,names,wh,flapn,msc=7,msi=128 -i t=sdf
corinaResult = subprocess.check_output([corinaCommand], shell=True) #
Gives the stereoisomer species as an SDF string

allMoleculeObjects = []
allMolecules = corinaResult.split(\n) # Separate Corina output
into individual molecules
allMolecules = allMolecules[0:len(allMolecules)-1]

print(RDKit Read in of Molecule)

for eachMolecule in allMolecules:
eachMolecule = eachMolecule + \n
mol = Chem.MolFromMolBlock(eachMolecule, sanitize=True,
removeHs=True, strictParsing=False)
Chem.rdmolops.AssignAtomChiralTagsFromStructure(mol,
replaceExistingTags=True)
Chem.rdmolops.AssignStereochemistry(mol)
print(RDKit Output -   + Chem.MolToSmiles(mol,
isomericSmiles=True))

print(INDIGO Read in of Molecule)
for eachMolecule in allMolecules:
eachMolecule = eachMolecule + \n
mol = indigo.loadMolecule(eachMolecule)
# print(Indigo Output -  + mol.canonicalSmiles())
# Use Indigo Canonical Smiles to create RDKit molecule
mol = Chem.MolFromSmiles(mol.canonicalSmiles())
if mol is not None:
print(RDKit Output -   + Chem.MolToSmiles(mol,
isomericSmiles=True))

return 0

mol = Chem.MolFromSmiles(CC(C)C1[NH+](C2CCN(CC)CC2)CC1)
z = runCorinaTest(mol)
--
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-19 Thread Peter Shenkin
Maybe when you have a toolkit as blazingly fast as RDKit it captures the
chirality of N center before it has time to interconvert

-P.

On Wed, Aug 19, 2015 at 10:17 PM, John M john.wilkinson...@gmail.com
wrote:

 More odd is the carbon stereocentre with two methyls...

 Generally trivalent nitrogens are not considered chiral due to inversion
 of the lone-pair. The two usual exceptions are when they are a bridgehead
 or in a tight ring (cyclopropane). This is the same in most toolkits, the
 InChI technical documentation provides useful examples.

 InChI actually only sees one stereo centre since it strips the proton off:

 InChI=1S/C13H26N2/c1-4-14-8-5-12(6-9-14)15-10-7-13(15)11(2)3/h11-13H,4-10H2,1-3H3/p+1/t13-/m1/s1

 It may well be chiral in this case but since it's not you should also
 strictly remove the other stereocentre in the para position to the nitrogen

 For the record just tested and ChemAxon/CDK/OpenBabel do the same.

 John

 Regards,
 John W May
 john.wilkinson...@gmail.com

 On 19 August 2015 at 09:00, Rob Smith robtsm...@gmail.com wrote:

 Dear RDKit community,

 I'm trying to use RDKit to read in Corina generated stereoisomers (from a
 Mol file), assign chiral tags and stereochemistry to the structure and
 output the canonical smiles string for each isomer of a given molecule (in
 Python), when I do this, half the canonical smiles strings are not unique.

 When I read in the output from Corina into an Indigo instance, then use
 the canonical smiles from Indigo to create an RDKit molecule, canonical
 smiles strings generated from the molecule objects are all unique.

 I may be missing an option to enable RDKit to 'visualise' the chiral
 centre adjacent to the protonated nitrogen, so if someone can spot where
 I've made a mistake, I'd really appreciate it. I've included the output and
 Python script below. If you require any further information, please let me
 know.

 Many thanks,
 Rob

 Output:

 RDKit Read in of Molecule
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1

 INDIGO Read in of Molecule
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@H]2C(C)C)CC1

 Python script :

 from rdkit import Chem
 import subprocess # Used to run Corina
 from indigo import *

 def runCorinaTest(inputMol):
 indigo = Indigo()

 molFile = Chem.MolToMolBlock(inputMol)

 corinaCommand = echo \' + molFile + \' | 
 # Then Corina - generate stereoisomers...
 corinaCommand = corinaCommand + /apps/corina/corina -t n -d
 canon,stergen,preserve,names,wh,flapn,msc=7,msi=128 -i t=sdf
 corinaResult = subprocess.check_output([corinaCommand], shell=True) #
 Gives the stereoisomer species as an SDF string

 allMoleculeObjects = []
 allMolecules = corinaResult.split(\n) # Separate Corina output
 into individual molecules
 allMolecules = allMolecules[0:len(allMolecules)-1]

 print(RDKit Read in of Molecule)

 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = Chem.MolFromMolBlock(eachMolecule, sanitize=True,
 removeHs=True, strictParsing=False)
 Chem.rdmolops.AssignAtomChiralTagsFromStructure(mol,
 replaceExistingTags=True)
 Chem.rdmolops.AssignStereochemistry(mol)
 print(RDKit Output -   + Chem.MolToSmiles(mol,
 isomericSmiles=True))

 print(INDIGO Read in of Molecule)
 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = indigo.loadMolecule(eachMolecule)
 # print(Indigo Output -  + mol.canonicalSmiles())
 # Use Indigo Canonical Smiles to create RDKit molecule
 mol = Chem.MolFromSmiles(mol.canonicalSmiles())
 if mol is not None:
 print(RDKit Output -   + Chem.MolToSmiles(mol,
 isomericSmiles=True))

 return 0

 mol = Chem.MolFromSmiles(CC(C)C1[NH+](C2CCN(CC)CC2)CC1)
 z = runCorinaTest(mol)


 --

 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




 

Re: [Rdkit-discuss] Stereochemistry - Differences between RDKit Indigo

2015-08-19 Thread Greg Landrum
Hi Rob,

The results below are quite strange. As John has already pointed out: there
really shouldn't be chirality present on either the N+ or the C that has
two methyls attached.

I tried to reproduce the problem by running corina myself using the same
command-line options you provided (from SMILES instead of SDF, but I don't
think that should make a difference), but I get sensible results;

In [5]: s = Chem.SDMolSupplier('sample.sdf')

In [6]: for m in s:
Chem.AssignAtomChiralTagsFromStructure(m)
Chem.AssignStereochemistry(m,cleanIt=True,force=True)
   ...: print Chem.MolToSmiles(m,True)
   ...:
CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@H]2C(C)C)CC1

In [7]: s = Chem.SDMolSupplier('sample.sdf')

In [8]: for m in s:
Chem.AssignAtomChiralTagsFromStructure(m)
print Chem.MolToSmiles(m,True)
   ...:
CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@H]2C(C)C)CC1
CCN1CCC([N@H+]2CC[C@H]2C(C)C)CC1


Could you please send the SDF that corina generates so I can try to
reproduce the problem (or at least try to understand what's gong on) from
that?

Thanks,
-greg

On Wed, Aug 19, 2015 at 3:00 PM, Rob Smith robtsm...@gmail.com wrote:

 Dear RDKit community,

 I'm trying to use RDKit to read in Corina generated stereoisomers (from a
 Mol file), assign chiral tags and stereochemistry to the structure and
 output the canonical smiles string for each isomer of a given molecule (in
 Python), when I do this, half the canonical smiles strings are not unique.

 When I read in the output from Corina into an Indigo instance, then use
 the canonical smiles from Indigo to create an RDKit molecule, canonical
 smiles strings generated from the molecule objects are all unique.

 I may be missing an option to enable RDKit to 'visualise' the chiral
 centre adjacent to the protonated nitrogen, so if someone can spot where
 I've made a mistake, I'd really appreciate it. I've included the output and
 Python script below. If you require any further information, please let me
 know.

 Many thanks,
 Rob

 Output:

 RDKit Read in of Molecule
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1
 RDKit Output -  CCN1CC[C@@H]([N@H+]2CC[C@H]2[C@H](C)C)CC1

 INDIGO Read in of Molecule
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@@H]([N@H+]2CC[C@H]2C(C)C)CC1
 RDKit Output -  CC[N@]1CC[C@H]([N@H+]2CC[C@H]2C(C)C)CC1

 Python script :

 from rdkit import Chem
 import subprocess # Used to run Corina
 from indigo import *

 def runCorinaTest(inputMol):
 indigo = Indigo()

 molFile = Chem.MolToMolBlock(inputMol)

 corinaCommand = echo \' + molFile + \' | 
 # Then Corina - generate stereoisomers...
 corinaCommand = corinaCommand + /apps/corina/corina -t n -d
 canon,stergen,preserve,names,wh,flapn,msc=7,msi=128 -i t=sdf
 corinaResult = subprocess.check_output([corinaCommand], shell=True) #
 Gives the stereoisomer species as an SDF string

 allMoleculeObjects = []
 allMolecules = corinaResult.split(\n) # Separate Corina output
 into individual molecules
 allMolecules = allMolecules[0:len(allMolecules)-1]

 print(RDKit Read in of Molecule)

 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = Chem.MolFromMolBlock(eachMolecule, sanitize=True,
 removeHs=True, strictParsing=False)
 Chem.rdmolops.AssignAtomChiralTagsFromStructure(mol,
 replaceExistingTags=True)
 Chem.rdmolops.AssignStereochemistry(mol)
 print(RDKit Output -   + Chem.MolToSmiles(mol,
 isomericSmiles=True))

 print(INDIGO Read in of Molecule)
 for eachMolecule in allMolecules:
 eachMolecule = eachMolecule + \n
 mol = indigo.loadMolecule(eachMolecule)
 # print(Indigo Output -  + mol.canonicalSmiles())
 # Use Indigo Canonical Smiles to create RDKit molecule
 mol = Chem.MolFromSmiles(mol.canonicalSmiles())
 if mol is not None: