Alignment of Liquid Crystals by Grooved Surfaces