From: Peter Jensen Husen (
Date: Mon Dec 18 2017 - 03:35:44 CST

In the method

float BaseMolecule::default_mass(const char *nm)

there are three lines:

    if (toupper(nm[0] == 'C') && toupper(nm[1] == 'L')) val = 35.453f;

    else if (toupper(nm[0] == 'N') && toupper(nm[1] == 'A')) val = 22.989770f;

    else if (toupper(nm[0] == 'M') && toupper(nm[1] == 'G')) val = 24.3050f;

which seem to have the wrong parenthesization. I suppose it should be, e.g:

        toupper(nm[0]) == 'C'

I think this means the method will work as if the toupper wasn't there, since it maps 0->0 and 1->1, so it works, if "CL", "NA" and "MG" are already uppercase, but not otherwise.

Peter Husen
Dept. of Physics, Chemistry and Pharmacy
University of Southern Denmark