On 2014-04-23 16:01, Daniel Moser wrote:

Hi all,

I think I found some inconsistent behaviour between the cartridge and python. At least for "NCO" the cartridge function mol_hbd returns a different value than Descriptors.NumHDonors.

[...]

I'm seeing this behaviour both with the 2013.09.2 as well as the 2012.12.1 cartridge version. Can anyone confirm this?


I can confirm this difference between Python and the cartridge using a fairly recent git version.

The cartrige mol_hbd() function calls "calcLipinskiHBD":

    MOLDESCR(HBD,RDKit::Descriptors::calcLipinskiHBD,int)

which is

    unsigned int calcLipinskiHBD(const ROMol &mol){
      unsigned int res=0;
      for(ROMol::ConstAtomIterator iter=mol.beginAtoms();
          iter!=mol.endAtoms();++iter){
        if( ((*iter)->getAtomicNum()==7 || (*iter)->getAtomicNum()==8) ) {
          res += (*iter)->getTotalNumHs(true);
        }
      }
      return res;
    }

while the Python NumHDonors() is using a SMARTS-based approach as far as I can tell.

The function that the cartridge uses can be accessed via AllChem and then I can also demonstrate the difference in Python:

>>> from rdkit import Chem
>>> m = Chem.MolFromSmiles('NCO')
>>> from rdkit.Chem import Descriptors
>>> print Descriptors.NumHDonors(m)
2
>>> from rdkit.Chem import AllChem
>>> print AllChem.CalcNumLipinskiHBD(m)
3
>>>

Cheers
-- Jan
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform
Build your Enterprise Intranet with eXo Platform Software
Java Based Open Source Intranet - Social, Extensible, Cloud Ready
Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to