We study the energy levels of H-2 molecules in a superstrong magnetic
field (B greater than or similar to 10(12) G), typically found on the
surfaces of neutron stars. The interatomic interaction potentials are
calculated by a Hartree-Fock method with multiconfigurations assuming
electrons are in the ground Landau state. Both the aligned configurati
ons and arbitrary orientations of the molecular axis with respect to t
he magnetic-field axis are considered. Different types of molecular ex
citations are then studied: electronic excitations, aligned (along the
magnetic axis) vibrational excitations, and transverse vibrational ex
citations (a constrained rotation of the molecular axis around the mag
netic-field line). Similar results for the molecular ion H-2(+) are al
so obtained and compared with previous variational calculations. Both
numerical results and analytical fitting formulas are given for a wide
range of field strengths. In contrast to the zero-field case, it is f
ound that the transverse vibrational excitation energies can be larger
than the aligned vibration excitation, and they both can be comparabl
e to or larger than the electronic excitations. For B greater than or
similar to B-crit=4.23 X 10(13) G, the Landau energy of the proton is
appreciable and there is some controversy regarding the dissociation e
nergy of H-2. We show that H-2 is bound even for B much greater than B
-crit and that neither proton has a Landau excitation in the ground mo
lecular state.