  The statistical results of transiting planets show that there are two peaks
around 1.5 and 2.0 in the distribution of orbital period ratios. A large number
of planet pairs are found near the exact location of mean motion resonances
(MMRs). In this work, we find out that the depletion and structures of gas disk
play crucial roles in driving planet pairs out of exact location of MMRs. Under
such scenario, planet pairs are trapped into exact MMRs during orbital
migration firstly and keep migrating in a same pace. The eccentricities can be
excited. Due to the existence of gas disk, eccentricities can be damped leading
to the change of orbital period. It will make planet pairs depart from the
exact location of MMRs. With depletion timescales larger than 1 Myr, near MMRs
configurations are formed easily. Planet pairs have higher possibilities to
escape from MMRs with higher disk aspect ratio. Additionally, with weaker
corotation torque, planet pairs can depart farther from exact location of MMRs.
The final location of the innermost planets in systems are directly related to
the transition radius from optically thick region to inner optically thin disk.
While the transition radius is smaller than 0.2 AU at the late stage of star
evolution process, the innermost planets can reach around 10 days. Our
formation scenario is a possible mechanism to explain the formation of near
MMRs configuration with the innermost planet farther than 0.1 AU.
