A genetic algorithm approach in interface and surface structure optimization