Re: [Rdkit-discuss] Hybridization state

2020-05-26 Thread Jean-Marc Nuzillard

Dear Ivan,

I understand the underlying idea,
even though the result is not the one I expected.

Many thanks for the explanations.

Best regards,

Jean-Marc


Le 26/05/2020 à 14:52, Ivan Tubert-Brohman a écrit :

Hi Jean-Marc,

RDKit says that the oxygen is sp2 because it has a special rule that 
considers the conjugation. Whether that is the "true" hybridization 
for the oxygen could be a long debate; I sometimes hear that it's 
somewhere between sp2 and sp3, perhaps not as close to sp2 as the 
nitrogen in amides, but that's all fuzzy and in the end a 
cheminformatics toolkit needs to have a clear rule.


As far as I can tell here's the relevant code: 
https://github.com/greglandrum/rdkit/blob/d41752d558bf7200ab67b98cdd9e37f1bdd378de/Code/GraphMol/ConjugHybrid.cpp#L172


I'll quote the comment here (the "case 4" refers to the return value 
of numBondsPlusLonePairs() for the atom).


        case 4:
          // potentially SP3, but we'll set it down to SP2
          // if we have a conjugated bond (like the second O
          // in O=CO)
          // we'll also avoid setting the hybridization down to
          // SP2 in the case of an atom with degree higher than 3
          // (e.g. things like CP1(C)=CC=CN=C1C, where the P
          //   has norbs = 4, and a conjugated bond, but clearly should
          //   not be SP2)
          // This is Issue276

Hope this helps,
Ivan

On Tue, May 26, 2020 at 8:10 AM Jean-Marc Nuzillard 
mailto:jm.nuzill...@univ-reims.fr>> wrote:


Dear all,

I recently arrived to this:

>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles("C(=O)OC")
>>> for x in m.GetAtoms():
... if x.GetSymbol() == 'O':
... print(repr(x.GetHybridization()))
...
rdkit.Chem.rdchem.HybridizationType.SP2
rdkit.Chem.rdchem.HybridizationType.SP2
>>>

even though an oxygen atom is really SP2 but the other one is SP3.
I use version 2020.03.1 of RDKit.

Best regards,

Jean-Marc

-- 


Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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

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




--
Jean-Marc Nuzillard
Directeur de Recherches au CNRS

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://eos.univ-reims.fr/LSD/CSNteam.html

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

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


Re: [Rdkit-discuss] Hybridization state

2020-05-26 Thread Ivan Tubert-Brohman
Hi Jean-Marc,

RDKit says that the oxygen is sp2 because it has a special rule that
considers the conjugation. Whether that is the "true" hybridization for the
oxygen could be a long debate; I sometimes hear that it's somewhere between
sp2 and sp3, perhaps not as close to sp2 as the nitrogen in amides, but
that's all fuzzy and in the end a cheminformatics toolkit needs to have a
clear rule.

As far as I can tell here's the relevant code:
https://github.com/greglandrum/rdkit/blob/d41752d558bf7200ab67b98cdd9e37f1bdd378de/Code/GraphMol/ConjugHybrid.cpp#L172

I'll quote the comment here (the "case 4" refers to the return value of
numBondsPlusLonePairs() for the atom).

case 4:
  // potentially SP3, but we'll set it down to SP2
  // if we have a conjugated bond (like the second O
  // in O=CO)
  // we'll also avoid setting the hybridization down to
  // SP2 in the case of an atom with degree higher than 3
  // (e.g. things like CP1(C)=CC=CN=C1C, where the P
  //   has norbs = 4, and a conjugated bond, but clearly should
  //   not be SP2)
  // This is Issue276

Hope this helps,
Ivan

On Tue, May 26, 2020 at 8:10 AM Jean-Marc Nuzillard <
jm.nuzill...@univ-reims.fr> wrote:

> Dear all,
>
> I recently arrived to this:
>
> >>> from rdkit import Chem
> >>> m = Chem.MolFromSmiles("C(=O)OC")
> >>> for x in m.GetAtoms():
> ... if x.GetSymbol() == 'O':
> ... print(repr(x.GetHybridization()))
> ...
> rdkit.Chem.rdchem.HybridizationType.SP2
> rdkit.Chem.rdchem.HybridizationType.SP2
> >>>
>
> even though an oxygen atom is really SP2 but the other one is SP3.
> I use version 2020.03.1 of RDKit.
>
> Best regards,
>
> Jean-Marc
>
> --
>
> Dr. Jean-Marc Nuzillard
> Institute of Molecular Chemistry, CNRS UMR 7312
> Faculté des Sciences Exactes et Naturelles, Bâtiment 18
> BP 1039
> 51687 REIMS Cedex 2
> France
>
> Tel : 33 3 26 91 82 10
> Fax : 33 3 26 91 31 
> 66http://www.univ-reims.fr/icmrhttp://eos.univ-reims.fr/LSD/CSNteam.html
>
> ORCID: 
> -0002-5120-2556http://www.univ-reims.fr/LSD/http://www.univ-reims.fr/LSD/JmnSoft/
>
> ___
> 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] Hybridization state

2020-05-26 Thread Jean-Marc Nuzillard

Dear all,

I recently arrived to this:

>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles("C(=O)OC")
>>> for x in m.GetAtoms():
... if x.GetSymbol() == 'O':
... print(repr(x.GetHybridization()))
...
rdkit.Chem.rdchem.HybridizationType.SP2
rdkit.Chem.rdchem.HybridizationType.SP2
>>>

even though an oxygen atom is really SP2 but the other one is SP3.
I use version 2020.03.1 of RDKit.

Best regards,

Jean-Marc

--

Dr. Jean-Marc Nuzillard
Institute of Molecular Chemistry, CNRS UMR 7312
Faculté des Sciences Exactes et Naturelles, Bâtiment 18
BP 1039
51687 REIMS Cedex 2
France

Tel : 33 3 26 91 82 10
Fax : 33 3 26 91 31 66
http://www.univ-reims.fr/icmr
http://eos.univ-reims.fr/LSD/CSNteam.html

ORCID: -0002-5120-2556
http://www.univ-reims.fr/LSD/
http://www.univ-reims.fr/LSD/JmnSoft/

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