Looking at 
https://github.com/rdkit/rdkit/blob/master/Code/GraphMol/atomic_data.cpp , the 
sixth column has the masses to the third decimal place.
Using these,
7*1.008+3*12.011+14.007+2*15.999 = 
89.094


So, just a matter of where one rounds. Given the uncertainties in 
http://iupac.org/publications/pac/78/11/2051/ , I would argue that you are 
concerned with precision at a level beyond what is currently accepted. 

-- 
David Hall


On Thursday, December 12, 2013 at 5:13 PM, Dimitri Maziuk wrote:

> Hi,
> 
> what exactly does
> 
> rdkit.Chem.rdMolDescriptors._CalcMolWt( mol )
> 
> do? :
> 
> #!/usr/bin/python -u
> import sys
> import rdkit
> import rdkit.Chem.rdMolDescriptors
> 
> PYBEL_PATH = "/share/linux/openbabel-2.3.2/lib"
> sys.path.append( PYBEL_PATH )
> import pybel
> 
> H = { "std" : 1.00794 }
> C = { "std" : 12.0107 }
> N = { "std" : 14.0067 }
> O = { "std" : 15.9994 }
> 
> sdf = "CID_5950.sdf"
> 
> mol = rdkit.Chem.SupplierFromFilename( sdf ).next()
> rdkit.Chem.AddHs( mol )
> rdwt = rdkit.Chem.rdMolDescriptors._CalcMolWt( mol )
> 
> obmol = pybel.readfile( "sdf", sdf ).next()
> obmol.addh()
> obwt = obmol.molwt
> 
> mywt = 0.0
> for a in obmol.atoms :
> if a.OBAtom.IsHydrogen() : mywt += H["std"]
> if a.OBAtom.IsCarbon() : mywt += C["std"]
> if a.OBAtom.IsNitrogen() : mywt += N["std"]
> if a.OBAtom.IsOxygen() : mywt += O["std"]
> 
> print
> print "ALA", rdkit.Chem.rdMolDescriptors.CalcMolFormula( mol )
> print "**********************"
> print "me", mywt
> print "ob", obwt
> print "rd", rdwt
> #########################
> 
> The output:
> 
> ALA C3H7NO2
> **********************
> me 89.09318
> ob 89.09318
> rd 89.094
> 
> (without pretty-printing it's
> me 89.093180000000032
> ob 89.093180000000032
> rd 89.093999999999994)
> 
> What am I missing?
> 
> TIA
> -- 
> Dimitri Maziuk
> Programmer/sysadmin
> BioMagResBank, UW-Madison -- http://www.bmrb.wisc.edu
> 
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT 
> organizations don't have a clear picture of how application performance 
> affects their revenue. With AppDynamics, you get 100% visibility into your 
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> 
> _______________________________________________
> Rdkit-discuss mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss




------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
Rdkit-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to