It is known that grain boundaries (GB) are the areas with declinations of local densities with plus and minus signs at microscopic atomic level. That is why, substitutional impurities (alloying elements) can interact with GB and form complexes with them. Complex elastic-strained state realized at microscopic atomic level near GB leads to the change of the energy of the complex GB-alloying element on the distance between defects, type of alloying atom, type of the knot where alloying atom is located. In the paper, atomic interaction of substitutional impuritiesis is studied by the method of molecular dynamics in the dependence on temperature, type of substitutional impurities, its concentration, tilting angle of symmetric GB. Fully ordered intermetallide Ni3Al was chosen as the object of the research. Cr, Fe, Nb were taken as substitutional impurities. The calculated block containing the definite tilting angle in the center of GB with the combination of periodical and rigid boundary conditions was made at the first stage of computer experiment. The calculated block contained up to 20*10^3 atoms. The interactions between different pairs of atoms were given in the approximation of interatomic Morse potentials, the bonds of atoms in the first seven coordination spheres were taken into account. The procedure of relaxation was made by the heating of the block near 0 K, the following rapid cooling to 0 K. Then the definite concentration of substitutional impurities was introduced in the structure. The following results were obtained. Atoms of Fe were pushed from GB at their distribution over Al sublattice and they were attracted over Ni knots. The interaction energy of Cr and Nb atoms appeared to be negative independently on the knot type. The concentration of dopants near GB was to be above the average. Diffusion of admixtures grew in the direction of GB mainly in the area of low local density of the material with the increase of disorientation angle.