Alignment control of liquid crystals on surface relief gratings