Theoretical value of electric dipole moment of a molecule Consider a hydrogen chloride molecule (HCl). Let's assume that we're given the distance between hydrogen and chlorine nuclei $d=1.27 \times 10^{-30} \mbox{m}$. How to calculate electric dipole moment $p$ basing on that information? I came up with two ways of solving it but I'm not sure which one is correct.
Try one $p=qd$, where $q=18e$, because hydrogen and chloride have atomic numbers of 1 and 17 respectively and the negative charge is shifted. 
Try two $p=qd$, where $q=e$, because only the electron from hydrogen atom is shifted. Even though the answer I got from the second approach is closer to the actual value, I'm not really sure why it works and if the reasoning behind it is even correct.  
 A: You have almost got it. At first I want to notice that not all molecules has electric dipole moment, only those which have a distance between gravity centers of positive and negative charges greater than zero. Thus molecules which has mirror symmetry, doesn't have a dipole moment. Second, for di-atom molecules in place of dipole length you can plug a chemical bond length. Third - molecule can be only partly ionic or covalent, so this must be accounted in calculating electric dipole moment. Given all this, resulting expression for electric dipole moment in di-atom molecules is :
$$ \mu_{\,\textrm{di-atom}} = \frac{1}{3.336 \times 10^{-30}}\cdot q\cdot \,L\cdot\left(1-e^{-(\Delta \chi/2)^2}\right) \,\,\,[\text{D}]$$
Where first multiplier is for unit conversion to debye - a CGS unit mostly used in atom physics and chemistry and is better for a dipole moment comparison, $q$ is elementary charge, $L$ is effective distance between gravity centers of positive and negative charges in molecule (H-CL bond length in this case). Last multiplier is for calculation of ionic degree of bonds, based on electronegativity difference $\Delta \chi$ between those pair of atoms in molecule.
So, plugging bond length for HCL $\approx 1.28\,\times10^{-10}\,\text{m}$, electronegativity difference between H-CL atoms of $0.9$, we get theoretical electric dipole moment for HCL molecule about $1.1\,\text D$, which is in quite good agreement with measured dipole moment of $1.08 \,\text{D}$ of same molecule.
A: A dipole is the name given to a specific term in the multipole expansion of a field. In this case we are speaking about an electric field generated by several charges. In principle for isolated charges, the leading (and only) term is the monopole term, however for configurations whose total charge is 0, the monopole term vanishes and the dipole term starts to become the leading term. The difference is that the geometry (the spatial distribution) of the charges plays a role. 
Specifically for the case at hand, you have a system which is neutral, because there is the same number of protons as electrons so the monopole term will vanish as described above. Nevertheless the charges are not all sitting in the same spot. A first approximation should only consider valence electrons (this depends on the type of bond) for this polar covalent bond, given the energy levels of both atoms, the shared electron's probability density cloud will be concentrated towards the center of one of the atoms, in this case Cl (more electronegative). This creates the dipole, since you have an "effective" negative charge on the Cl side and an "effective" positive charge on the H side. 
Since this density cloud is diffuse, you don't obtain exactly a dipole moment $q= d*e$, although something very close since the electron is "mostly" on one side. So the dipole is actually made of two particles with $q=\varepsilon\cdot e$ where $\varepsilon$ is some number less than 1 but probably close to it, representing the effective charge separation of this molecular dipole.
