Calculating Molecular Mass With MX: Using a Complete Hydrogen to Uranium System of Atomic Masses Linked to the Primary Literature 3

Posted by Rich Apodaca Mon, 08 Dec 2008 16:02:00 GMT

Calculating molecular mass is an important capability in cheminformatics. Performing the calculation itself is trivial, but determining what the masses will be used can be tricky. Ideally, each measurement in a system of atomic masses and isotopic distributions would be traceable to the primary literature.

MX is an open source cheminformatics toolkit written in Java that can be used without modification in a variety of other languages including Python and Ruby. The latest release of MX, v0.106.0 includes a complete hydrogen to uranium system of atomic masses linked to the primary literature.

You can try out the new feature with an interactive Jython shell (or interactive JRuby, if you'd prefer). Let's calculate the molecular mass of cubane. After downloading the mx-0.106.0 jarfile to your working directory, use:

Jython Completion Shell
Jython 2.5b0 (trunk:5540, Oct 31 2008, 13:55:41) 
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.5.0_16
>>> import sys
>>> sys.path.append("mx-0.106.0.jar")
>>> from com.metamolecular.mx.io.daylight import SMILESReader
>>> from com.metamolecular.mx.calc import MassCalculator
>>> c=MassCalculator()
>>> c.findAveragedMass(SMILESReader.read("C12C3C4C1C5C4C3C25"))
104.14912000000001

As you can see, using this new calculator is quite easy. One minor detail is the "1" at the end of result, which appears to be a Java floating point issue unrelated to the system of atomic masses.

MX uses an XML file compiled from the definitive IUPAC publication on atomic masses. The source of each measurement is cited, complete with uncertainty. More information on this file and its uses is available here.

Comments

Leave a response

  1. baoilleach Mon, 08 Dec 2008 19:19:51 GMT
  2. Egon Willighagen Mon, 08 Dec 2008 19:33:31 GMT

    One reason could be that BODR does not have literature citations for each measure mass... but I do not see the sources in the XML...

  3. Rich Apodaca Mon, 08 Dec 2008 20:32:30 GMT

    Egon and Noel, the main reason is that the BO XML file doesn't cite any references.

    The header of the MX masses file links to the IUPAC paper, which in turn cites all of its mass and isotopic distribution sources. So, there's an unbroken series of links between the MW you calculate for a molecule and the primary literature.

    Also, I may be missing something, but it looks like there is no isotopic distribution data in the BO XML file.

    The MX file is quite old, going back to Octet around 2005 or so. I had used it before and it worked well.

Comments