Smale–Barden manifolds M are classified by their second homology H2(M,ℤ) and the Barden invariant i(M). It is an important and difficult question to decide when M admits a Sasakian structure in terms of these data. In this work, we show methods of doing this. In particular, we realize all M with H2(M,ℤ)=ℤk⊕(⊕ri=1ℤ2gimi) and i(M)=0,∞, provided that k≥1, mi≥2,gi≥1, mi are pairwise coprime. We give a complete solution to the problem of the existence of Sasakian structures on rational homology spheres in the class of semi-regular Sasakian structures. Our method allows us to completely solve the following problem of Boyer and Galicki in the class of semi-regular Sasakian structures: determine which simply connected rational homology 5-spheres admit negative Sasakian structures.