Classical Hamiltonians in the generator coordinate theory