The hydrogen molecule in a vice