Tunneling Hamiltonian description of the atomic-scale 0–π transition in superconductor/ferromagnetic-insulator junctions