  The electronic structure of the perovskite La$_{1-x}$Sr$_x$CoO$_3$ has been
obtained as a function of Sr substitution and volume from a series of
generalized-gradient-corrected, full-potential, spin-density-functional band
structure calculations. The energetics of different spin configurations are
estimated using the fixed-spin-moment (FSM) method. From the total energy vs
spin magnetic moment curve for LaCoO$_3$ the ground state is found to be
nonmagnetic with the Co ions in a low-spin (LS) state, a result that is
consistent with the experimental observations. Somewhat higher in energy, we
find an intermediate-spin (IS) state with spin moment $\sim$1.2 $\mu_{B}$/f.u.
  From the anomalous temperature dependent susceptibility along with the
observation of an IS state we predict metamagnetism in LaCoO$_3$ originating
from an LS-to-IS transition. The IS state is found to be metallic and the
high-spin (HS) state of LaCoO$_3$ is predicted to be a half-metallic
ferromagnet. With increasing temperature, which is simulated by a corresponding
change of the lattice parameters we have observed the disappearence of the
metamagnetic solution that is associated with the IS state. The FSM
calculations on La$_{1-x}$Sr$_x$CoO$_3$ suggest that the hole doping stabilizes
the IS state and the calculated magnetic moments are in good agreement with the
corresponding experimental values. Our calculations show that the HS state
cannot be stabilized by temperature or hole doping since the HS state is
significantly higher in energy than the LS or IS state. Hence the spin-state
transition in LaCoO$_3$ by temperature/hole doping is from an LS to an IS spin
state and the present work rules out the other possibilities reported in the
literature.
