Modeling of neutral-atom scattering at the surface of a crystal for the case of grazing incidence