Molecular systems in contact with the bounding surfaces are examined. New apparatus describing adequately quasi-two-dimensional structures whose cross sectional dimensions are comparable with the correlation length is suggested. It is based on the modified method of the Wigner distribution functions and the system of Ornstein-Zernike equations generalized for one-and two-particle distribution functions. Modeling of the physical gas sorption process in carbon nanofibers and nanotubes allows local microstructure, sorption characteristics, effective sizes, and optimal technological filling parameters to be calculated.