  We study the formation of the protoplanetary disk by the collapse of a
primordial molecular cloud, and how its evolution leads to the selection of
specific types of planets.
  We use a hydrodynamical code that accounts for the dynamics, thermodynamics,
geometry, and composition of the disk to numerically model its evolution as it
is fed by the infalling cloud material. As the mass accretion rate of the disk
onto the star determines its growth, we can calculate the stellar
characteristics by interpolating its radius, luminosity, and temperature over
the stellar mass from pre-calculated stellar evolution models. The density and
midplane temperature of the disk then allow us to model the interactions
between the disk and potential planets and determine their migration.
  At the end of the collapse phase, when the disk reaches its maximum mass, it
pursues its viscous spreading, similarly to the evolution from a minimum mass
solar nebula (MMSN). In addition, we establish a timeline equivalence between
the MMSN and a "collapse-formed disk" that would be older by about 2 Myr.
  We can save various types of planets from a fatal type-I inward migration: in
particular, planetary embryos can avoid falling on the star by becoming trapped
at the heat transition barriers and at most sublimation lines (except the
silicates one). One of the novelties concerns the possible trapping of putative
giant planets around a few astronomical units from the star around the end of
the infall. Moreover, trapped planets may still follow the traps outward during
the collapse phase and inward after it. Finally, this protoplanetary disk
formation model shows the early possibilities of trapping planetary embryos at
disk stages that are anterior by a few million years to the initial state of
the MMSN approximation.
