Calculation of dipole moments of edge atoms on stepped metal surfaces