There were investigated phase diagram and distribution profile of the director field of simulated liquid crystal which is kept in the pore with homeotropic boundary conditions in different phases. By the means of molecular dynamics method there was performed the computer simulation of the changes of refractive index profile in gradient lightguide under the surface anchoring force and applied electric field.