  We provide a new analytical tool to calculate the energies of Andreev bound
states (ABS) in long imperfect SNS junctions, at present these can only be
described by numerical tools. We model an NS junction as a delta-function
"Andreev" impurity, i.e., a localized potential which scatters an electron into
a hole with opposite spin. We show using the scattering matrix formalism that,
quite surprisingly, an "Andreev" impurity is equivalent to an NS junction
characterized by both Andreev reflection and a finite amount of normal
scattering. The ABS energies are then calculated using the T-matrix formalism
applied to a system with two Andreev impurities. Our results lie between those
for a perfect long SNS junction limit described by the Andreev approximation
(ABS energies depend linearly on the phase and are independent of the chemical
potential) and the particle-in-the-box limit (bound state energies are
independent of the phase and have a linear dependence on the chemical
potential). Moreover, we recover a closed-form expression for the ABS energies
by expanding around the particle-in-the-box limit.
