  We present a formalism for a first-order estimation of the magnetosphere
radius of exoplanets orbiting stars in the range from 0.08 to 1.3 Mo. With this
radius, we estimate the atmospheric surface that is not protected from stellar
winds. We have analyzed this unprotected surface for the most extreme
environment for exoplanets: GKM-type and very low-mass stars at the two limits
of the habitable zone. The estimated unprotected surface makes it possible to
define a likelihood for an exoplanet to retain its atmosphere. This function
can be incorporated into the new habitability index SEPHI. Using different
formulations in the literature in addition to stellar and exoplanet physical
characteristics, we estimated the stellar magnetic induction, the main
characteristics of the stellar wind, and the different star-planet interaction
regions (sub- and super-Alfv\'enic, sub- and supersonic). With this
information, we can estimate the radius of the exoplanet magnetopause and thus
the exoplanet unprotected surface. We have conducted a study of the auroral
aperture angles for Earth-like exoplanets orbiting the habitable zone of its
star, and found different behaviors depending on whether the star is in
rotational saturated or unsaturated regimes, with angles of aperture of the
auroral ring above or below 36^\circ, respectively, and with different slopes
for the linear relation between the auroral aperture angle at the inner edge of
the habitable zone versus the difference between auroral aperture angles at the
two boundaries of the habitable zone. When the planet is tidally locked, the
unprotected angle increases dramatically to values higher than 40^\circ with a
low likelihood of keeping its atmosphere. When the impact of stellar wind is
produced in the sub-Alfv\'enic regime, the likelihood of keeping the atmosphere
is almost zero for exoplanets orbiting very close to their star.
