Hi,

On Wed, Apr 23, 2014 at 5:59 PM, Jan Holst Jensen <[email protected]>wrote:

>  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.
>

Jan has hit this dead on. The cartridge is using a Lipinski-based
definition: the number of NHs and OHs. The Python version is trying to be
more correct and include only centers that are likely to really be donors.

The somewhat inconsistent naming between the python wrappers and cartridge
is unfortunate (the cartridge should really be "mol_lipinski_hbd"), but
since changing that will break existing code, it would have to be done very
carefully.

-greg



> 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
>
>
------------------------------------------------------------------------------
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