Bug :-)

There might be another util method buried somewhere though. As a workaround - convert the implicit hydrogens to explicit. I just updated the implicit->explicit hydrogen method to handle stereo chemistry which it doesn't work at all 1.5.4 and causes some random errors. For now a simple helper like this should do the trick. If you use XYZ / PDB / CML youíll need to atom type and add implicit hydrogens first. Smiles, InChi and Molfile should have them by default (query Molfiles may be a problem).

static double mass(IAtomContainer org) {
IAtomContainer cpy = org.clone();
return AtomContainerManipulator.getNaturalExactMass(cpy);


On 6 Jan 2014, at 22:05, Cyrus Harmon <ch-cdk@bobobeach.com> wrote:

Hello CDK Developers,

Are there any functions in CDK for getting the various flavors of mass of an AtomContainer? Iíve rolled my own using getExactMass of the constituent atoms (and their implicit hydrogens), but I figured others might have come across this as well and there might be some built in functions for this that I havenít found.



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!
Cdk-devel mailing list