A k · p Effective Hamiltonian Generator