The probability P-esc of obtaining recoil atoms from molybdenum (IV) disulfide nanoparticles with prescribed sizes and optimal diameter is calculated analytically, which made it possible to determine the main physical characteristics of the motion of recoil atoms inside nanoparticles. The results of a Monte Carlo calculation of P-esc using expressions from molecular dynamics are presented. The optimal diameter of nanoparticles is determined by comparing the results of analytical and numerical calculations.