Dear Andreas,
Yes your 1st paragraph is what I'm trying to do.
I also agree that the kink region could vary, because LDIPOL just compensates ΔV. And as you said, the thickness d could vary, then the computed charge Q from this also varies. So I feel the result is unreliable. For this, I also tried SIESTA https://docs.siesta-project.org/project ... ric-fields, which is another first-principle package but based on atomic orbital instead of plane wave, and its dipole correction result (from tag Slab.DipoleCorrection) also gives the electric field from dipole correction:
siesta: Electric dipole (a.u.) = -0.000000 -0.000000 -0.182917
siesta: Electric dipole (Debye) = -0.000000 -0.000000 -0.464929
Dipole moment in unit cell = -0.0000 -0.0000 -0.4649 D
Electric field for dipole correction = 0.000000 0.000000 0.041922 eV/Ang/e
Since it gives electric field, we can use formula \(E=\dfrac{\sigma}{\varepsilon_0}=\dfrac{Q}{A\varepsilon_0}\), so \(Q=\varepsilon_0 AE\). All quantities are known, and there's no worry about the problem of varying of \(d\) here.
Looks like VASP doesn't output electric field from dipole correction, is it possible to add this feature in the future? For now, I think we can't get it from post-processing due to the varying \(d\) you mentioned.
Anyway, I did all of this is because the following: the screening of graphene is not perfect, so in the heterostructure I attached, there's still ΔV in vacuum arise from the dipole moment. In the perfect screening case, ΔV should be 0 in vacuum. So I think the imperfect screening is because the induced charge on top & bottom graphene is not enough. If I add the charge from the virtual dipole layer to graphene, the screening should be perfect. In other words, the dipole moment computed from graphene + virtual dipole layer charge (model the slab itself as the capacitor here) should equal to the result from integration \(p=\int \rho(r) (r-r_{center})d^3r\), where integration region is only around FE slab.
The root cause that drives me to do this is because it looks like VASP dipole moment output in OUTCAR is for the whole system only, and there's no way to know the dipole moment of a FE slab in heterostructure case directly from VASP output.
In post processing, I found the total charge around integration around FE slab is nonzero due to charge transfer between graphene, so the dipole moment obtained from this integration depends on origin. Because of these, I'm trying to find another way to obtain dipole moment, which is described above.
Hope it make things more clear.