  Through density functional theory and molecular dynamics calculations, we
have analysed various metal polyhydrides to understand whether hydrogen is
present in its molecular or atomic form - tetrahydrides of Ba,Sr,Ra, Cs and La;
Ba$_8$H$_{46}$ and BaH$_{12}$.
  We show that, in experimentally reported binary barium hydrides (BaH$_x$),
molecular H$_2$ and atomic H$^-$ can coexist with the metallic cations.
  In this thorough study of differences between BaH$_4$, higher barium
hydrides, and other binary tetrahydrides we find the number of atomic hydrogens
is equal to the formal charge of the cations. The remaining hydrogen forms
molecules in proportions yielding, e.g. BaH$_2$(H$_2)_x$, at pressures as high
as 200 GPa. At room temperature these are highly dynamic structures with the
hydrogens switching between H$^-$ and H$_2$ while retaining the 2:x ratio.
  We find some qualitative differences between our static DFT calculations and
previously reported structural and spectroscopic experimental results. Two
factors allow us to resolve such discrepancies: Firstly, in static relaxation
H$_2$ must be regarded as a non-spherical object, which breaks symmetry in a
way invisible to X-rays; Secondly the required number of molecules $x$ may be
incompatible with the experimental space group (e.g. $BaH_2(H_2)_5$). In
molecular dynamics, bond-breaking transitions between various structural
symmetry configurations happen on a picosecond timescale via an H$_3^-$
intermediate. Rebonding is slow enough to allow a spectroscopic signal but
frequent enough to average out over the lengthscale involved in diffraction.
