From: Chris S. <sw...@ma...> - 2020-05-31 13:24:14
Hi,
I’ve written a Jupyter notebook to calculate a variety of calculated properties of molecules (MWt, TPSA, HAC, HBD/A etc.)
I’d like to include the number of sp3 atoms, is there an easy way to do this?
Cheers,
Chris
From: Andrew D. <da...@da...> - 2020-05-31 15:10:25
On May 31, 2020, at 15:23, Chris Swain via Rdkit-discuss <rdk...@li...> wrote:
> I’d like to include the number of sp3 atoms, is there an easy way to do this?
I don't easily see a function for that. There's rdMolDescriptors.CalcFractionCSP3() which "returns the fraction of C atoms that are SP3 hybridized".
You can do it yourself by looking at the atom's hybridization:
>>> mol = Chem.MolFromSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
>>> sum((a.GetHybridization() == Chem.HybridizationType.SP3) for a in mol.GetAtoms())
3
Cheers,
Andrew
da...@da...
From: Jean-Marc N. <jm....@un...> - 2020-05-31 16:23:00
Le 31/05/2020 à 16:52, Andrew Dalke a écrit :
> On May 31, 2020, at 15:23, Chris Swain via Rdkit-discuss <rdk...@li...> wrote:
>> I’d like to include the number of sp3 atoms, is there an easy way to do this?
> I don't easily see a function for that. There's rdMolDescriptors.CalcFractionCSP3() which "returns the fraction of C atoms that are SP3 hybridized".
>
> You can do it yourself by looking at the atom's hybridization:
>
>
>>>> mol = Chem.MolFromSmiles("CN1C=NC2=C1C(=O)N(C(=O)N2C)C")
>>>> sum((a.GetHybridization() == Chem.HybridizationType.SP3) for a in mol.GetAtoms())
> 3
>
> Cheers,
>
> Andrew
> da...@da...
>
>
>
>
> _______________________________________________
> Rdkit-discuss mailing list
> Rdk...@li...
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
Yes, but
>>> mol = Chem.MolFromSmiles("O=COC")
>>> sum((a.GetHybridization() == Chem.HybridizationType.SP3) for a in
mol.GetAtoms())
1
because the two oxygen atoms are SP2.
Best regards,
Jean-Marc
--
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/icmrhttp://eos.univ-reims.fr/LSD/CSNteam.htmlhttp://www.univ-reims.fr/LSD/http://www.univ-reims.fr/LSD/JmnSoft/