The paper studies process of interaction of a moving molecule with structure atoms. The mathematical description is based on application of Hamiltonian systems model and numerical methods for solving the basic problem of molecular dynamics. The interaction between individual atoms and the simplest molecules is cared out using the classical Lennard-Jones potential. Polyethylene nanostructures are considered as filtering elements for selective separation of natural gas mixtures, in particular, their light components: hydrogen and helium. The influence of geometric dimensions and geometric features of a nanostructure on selectivity of gas mixtures separation is studied.