[Rdkit-discuss] number of pi electrons

2014-10-14 Thread Eleanor J Gardiner
 Hi
I'm interested in the number of pi electrons. I have a molecule which has
smiles C=Cc1c1. And

mol = Chem.MolFromSmiles('C=Cc1c1')
for atom in mol.GetAtoms():
npibond = Chem.AtomPairs.Utils.NumPiElectrons(atom)
print npibond

gives
1
1
1
1
1
1
1
1
as expected.
However the molecule comes from a reaction and is coded as
[CH2:3]=[CH:1][c:2]1[cH:5][cH:7][cH:9][cH:8][cH:6]1

Using this in the above gives
3
2
1
1
1
1
1
1

Surely the atom-mapping should not make a difference?

Thanks

Eleanor


-- 
Dr Eleanor Gardiner

Information School
University of Sheffield
--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] number of pi electrons

2014-10-14 Thread Greg Landrum
Hi Eleanor,

The behavior you describe below is a bug (it's this one:
https://github.com/rdkit/rdkit/issues/334). It had been fixed in the C++
version of the code, but I forgot to fix the older python implementation. I
just made that fix and checked it in, so the github version should yield
the expected behavior.

Thanks for pointing this out.
-greg


On Tue, Oct 14, 2014 at 3:22 PM, Eleanor J Gardiner 
e.gardi...@sheffield.ac.uk wrote:

 Hi
 I'm interested in the number of pi electrons. I have a molecule which has
 smiles C=Cc1c1. And

 mol = Chem.MolFromSmiles('C=Cc1c1')
 for atom in mol.GetAtoms():
 npibond = Chem.AtomPairs.Utils.NumPiElectrons(atom)
 print npibond

 gives
 1
 1
 1
 1
 1
 1
 1
 1
 as expected.
 However the molecule comes from a reaction and is coded as
 [CH2:3]=[CH:1][c:2]1[cH:5][cH:7][cH:9][cH:8][cH:6]1

 Using this in the above gives
 3
 2
 1
 1
 1
 1
 1
 1

 Surely the atom-mapping should not make a difference?

 Thanks

 Eleanor


 --
 Dr Eleanor Gardiner

 Information School
 University of Sheffield


 --
 Comprehensive Server Monitoring with Site24x7.
 Monitor 10 servers for $9/Month.
 Get alerted through email, SMS, voice calls or mobile push notifications.
 Take corrective actions from your mobile device.
 http://p.sf.net/sfu/Zoho
 ___
 Rdkit-discuss mailing list
 Rdkit-discuss@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


--
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss