The computation of electric dipole moments