handle case when hamiltonian() call fails in assembly.allmaps