private static boolean suppressibleHydrogen(final IAtomContainer container, final IAtom atom) {
        // is the atom a hydrogen
        if (!"H".equals(atom.getSymbol())) return false;
        // is the hydrogen an ion?
        if (atom.getFormalCharge() != null && atom.getFormalCharge() != 0) return false;
        // is the hydrogen deuterium / tritium?
        if (atom.getMassNumber() != null) return false;
        // molecule hydrogen with implicit H?
        if (atom.getImplicitHydrogenCount() != null && atom.getImplicitHydrogenCount() != 0) return false;
        // molecule hydrogen
        List<IAtom> neighbors = container.getConnectedAtomsList(atom);
        if (neighbors.size() == 1 && (neighbors.get(0).getSymbol().equals("H") ||
                                      neighbors.get(0) instanceof IPseudoAtom)) return false;
        // what about bridging hydrogens?
        // hydrogens with atom-atom mapping?
        return true;
    }
private static boolean suppressibleHydrogen ( final IAtomContainer container , final IAtom atom ) { if ( ! "H" . equals ( atom . getSymbol ( ) ) ) return false ; if ( atom . getFormalCharge ( ) != null && atom . getFormalCharge ( ) != 0 ) return false ; if ( atom . getMassNumber ( ) != null ) return false ; if ( atom . getImplicitHydrogenCount ( ) != null && atom . getImplicitHydrogenCount ( ) != 0 ) return false ; List < IAtom > neighbors = container . getConnectedAtomsList ( atom ) ; if ( neighbors . size ( ) == 1 && ( neighbors . get ( 0 ) . getSymbol ( ) . equals ( "H" ) || neighbors . get ( 0 ) instanceof IPseudoAtom ) ) return false ; return true ; }
Is the {@code atom} a suppressible hydrogen and can be represented as
implicit. A hydrogen is suppressible if it is not an ion, not the major
isotope (i.e. it is a deuterium or tritium atom) and is not molecular
hydrogen.

@param container the structure
@param atom      an atom in the structure
@return the atom is a hydrogen and it can be suppressed (implicit)