[dev] Changing return type in fermion::calc_density() to handle convergence.