The functions in the AtomPairs module are really intended to be used when
calculating the Atom Pairs and Topological Torsions fingerprints. For those
fingerprints the RDKit considers atoms in aromatic rings to have a single
pi electron (you could consider that it's really counting the number of
orbitals involved in pi bonding).

Are you looking to calculate the number of electrons in a pi system or
something like that? Since that's not currently immediately possible
(though that's fixable), I'm curious why you want to do that.

-greg



On Fri, Nov 22, 2019 at 5:08 AM Benjamin Datko <benjamin.datko....@gmail.com>
wrote:

> Hi all,
>
> When counting the number of pi-electrons in Imidazole, I would expect a
> total of 6 pi-electrons, and the contribution of pi-electrons from the
> nitrogen atoms showing 2 and 1.
>
> But both pyScorePair and NumPiElectrons within AtomPairs only show 5
> pi-electrons, missing the pi-electron from one of the nitrogens. What am
> I missing?
>
> >>> from rdkit import rdBase
> >>> rdBase.rdkitVersion,rdBase.boostVersion
>
> ('2019.03.4', '1_70')
>
> >>> from rdkit import Chem
> >>> from rdkit.Chem.AtomPairs import Pairs
>
> >>> m = Chem.MolFromSmiles('C1=CN=CN1')
> >>> score = Pairs.pyScorePair(m.GetAtomWithIdx(2),m.GetAtomWithIdx(4),3)
> >>> Pairs.ExplainPairScore(score)
> (('N', 2, 1), 3, ('N', 2, 1))
>
> >>> [Chem.AtomPairs.Utils.NumPiElectrons(atom) for atom in m.GetAtoms()]
>  [1, 1, 1, 1, 1]
>
> _______________________________________________
> 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

Reply via email to