Before revision:  We describe the proteins in the framework of an effective potential model which contains the Ramachandran angles as degrees of freedom {\it   .
After revision:  We describe the proteins in the framework of an effective potential model which contains the Ramachandran angles as degrees of freedom {\it information about the native state. Hydrogen bonds, dipole-dipole- and hydrophobic interactions are taken explicitly into account. An interesting feature displayed by this potential is the presence of some intermediates between the unfolded and native states. We consider different types of confining potentials in order to study the structural properties of proteins folding inside cages with repulsive or attractive walls .