private static int charge ( IAtom atom ) { Integer charge = atom . getFormalCharge ( ) ; if ( charge != null ) return charge ; return 0 ; }
Access formal charge of an atom defaulting to 0 if undefined .