Hello tasdiquearman,
This is a tricky question that is not easy to answer without more information. It is also much more a physics question than a VASP question, which is why my answer will not be super in-depth. I hope that it can stimulate a larger discussion with the VASP user base, however.
For adsorption, the case is much clearer, since the adsorbate and substrate do not occupy the same space, and the charge differences are usually small and localized at the interface. Also, due to the vacuum region, it is easy to match the simulation cells.
For a dopant, I think it is crucial to distinguish between substitutional and interstitial doping.
Sustitution:
I assume that you want to visualize only the redistribution of charge, not any net gain or loss introduced by the doping. In a first approximation, I would do it like this:
\(\Delta \rho = \rho(A_{N-1}B_1) - \rho(A_N) - \rho(B_1) + \rho(A_1)\),
where the first term is the doped system with N-1 A atoms, and 1 B atom, and the second term is the full, undoped host lattice. \(B_1\) and \(A_1\) are single atoms in the appropriate positions in an otherwise empty box. I think this is the easiest way to compare with the undoped host lattice, and still make sure that overall there is charge redistribution, but no net loss or net gain of charge. I would not allow for relaxations of the doped lattice in this analysis as a first approximation.
If you do want to visualize gain or loss of charge, the formula gets simpler, I think, but you would lose any detail of redistribution of charge:
\(\Delta \rho = \rho(A_{N-1}B_1) - \rho(A_N)\)
Interstitial:
For interstitial doping, a main issue is that relaxations cannot be ignored unless the dopant is very small or the lattice is very open, and I am frankly not quite sure how to deal with the issue. If it can be ignored, the situation would probably be exactly like that for the adsorption case:
\(\Delta \rho = \rho(A_NB_1) - \rho(A_N) - \rho(B_1)\).
The problem with Alex's approach, if I understand correctly, is that the cells of B and A do not have to match, and that it will be non-trivial to isolate the charge of a single B atom in the B environment. However, if the crystal structures and lattice parameters are similar, one could force B in the cell of A (assuming A is the host lattice) and isolate a single atom using Bader charge analysis. Then Alex's approach would probably work. It could be that I misunderstood Alex, however...
I hope this helps,
Cheers, Michael