We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f809e7a commit baae4daCopy full SHA for baae4da
tool/formula/src/main/java/org/openscience/cdk/tools/manipulator/MolecularFormulaManipulator.java
@@ -813,6 +813,8 @@ public static double getTotalExactMass(IMolecularFormula formula) {
813
* @return The mass with the correction
814
*/
815
private static double correctMass(double mass, Integer charge) {
816
+ if (charge == null)
817
+ return mass;
818
double massE = 0.00054857990927;
819
if (charge > 0)
820
mass -= massE * charge;
0 commit comments