Implicit, Explicit and Query Hydrogens

    The Hydrogen atoms are included in the molecule implicitly, explicitly, or both. The implicit hydrogen count is calculated from the valence of the atom. It equals the valence of the atom minus the valence calculated from the bond connections. It is accurate if and only if there is no further modification on the structure since the last valence check.

    The following example demonstrates how to get the implicit / explicit hydrogen count of the atoms:

    import chemaxon.calculations.Hydrogenize;
    //import a simple chain
    Molecule mol = MolImporter.importMol("CCNCCCCCNCC");
    // check valences
    for (int i = 0; i < mol.getAtomCount(); i++){
        MolAtom atom = mol.getAtom(i);
        int implicitH = atom.getImplicitHcount();
        int explicitH = atom.getExplicitHcount();
        System.out.println(i+"th atom has "+implicitH+" implicit and "
            +explicitH+" explicit Hydrogens.");

    The implicit hydrogen atoms can be converted to explicit ones and vice cersa.