public double getCurrentMaxBondOrder(IAtom atom, IAtomContainer ac) throws CDKException {
        IAtomType[] atomTypes = getAtomTypeFactory(atom.getBuilder()).getAtomTypes(atom.getSymbol());
        if (atomTypes.length == 0) return 0;
        double bondOrderSum = ac.getBondOrderSum(atom);
        Integer hcount = atom.getImplicitHydrogenCount() == CDKConstants.UNSET ? 0 : atom.getImplicitHydrogenCount();
        double max = 0;
        double current = 0;
        for (int f = 0; f < atomTypes.length; f++) {
            current = hcount + bondOrderSum;
            if (atomTypes[f].getBondOrderSum() - current > max) {
                max = atomTypes[f].getBondOrderSum() - current;
            }
        }
        return max;
    }
public double getCurrentMaxBondOrder ( IAtom atom , IAtomContainer ac ) throws CDKException { IAtomType [ ] atomTypes = getAtomTypeFactory ( atom . getBuilder ( ) ) . getAtomTypes ( atom . getSymbol ( ) ) ; if ( atomTypes . length == 0 ) return 0 ; double bondOrderSum = ac . getBondOrderSum ( atom ) ; Integer hcount = atom . getImplicitHydrogenCount ( ) == CDKConstants . UNSET ? 0 : atom . getImplicitHydrogenCount ( ) ; double max = 0 ; double current = 0 ; for ( int f = 0 ; f < atomTypes . length ; f ++ ) { current = hcount + bondOrderSum ; if ( atomTypes [ f ] . getBondOrderSum ( ) - current > max ) { max = atomTypes [ f ] . getBondOrderSum ( ) - current ; } } return max ; }
Returns the currently maximum formable bond order for this atom.

@param  atom  The atom to be checked
@param  ac    The AtomContainer that provides the context
@return       the currently maximum formable bond order for this atom