private static double correctMass ( double mass , Integer charge ) { if ( charge == null ) return mass ; double massE = 0.00054857990927 ; if ( charge > 0 ) mass -= massE * charge ; else if ( charge < 0 ) mass += massE * Math . abs ( charge ) ; return mass ; }
Correct the mass according the charge of the IMmoleculeFormula . Negative charge will add the mass of one electron to the mass .