VMD-L Mailing List
From: Peter Jensen Husen (phusen_at_sdu.dk)
Date: Mon Dec 18 2017 - 03:35:44 CST
- Next message: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Previous message: Peter Jensen Husen: "Re: Water molar mass in autoionize.tcl"
- Next in thread: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Reply: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
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.
Best,
Peter Husen
Dept. of Physics, Chemistry and Pharmacy
University of Southern Denmark
- Next message: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Previous message: Peter Jensen Husen: "Re: Water molar mass in autoionize.tcl"
- Next in thread: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Reply: John Stone: "Re: Suspected bug in BaseMolecule::default_mass"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]