[QE-developers] Potential bug in dipole correction of quantum espresso

Lingyuan Gao lg041 at uark.edu
Sat Apr 1 21:02:40 CEST 2023


Dear developers of quantum espresso,
My name is Lingyuan Gao and I am a postdoc at the University of Arkansas. I am recently looking at the code relevant to dipole correction. The code about computing electron or ionic dipole written in "compute_dip.f90" drew my attention and I am wondering whether they are correct. Please look at Line 69 and Line 164:
"
   ion_dipole = ion_dipole + zvia* saw(emaxpos,eopreg, tvectb ) &
                                                * (alat/bmod) * (fpi/omega)

  e_dipole = e_dipole + rhoir * saw(emaxpos,eopreg, sawarg) &
                      * (alat/bmod) * (fpi/(dfftp%nr1*dfftp%nr2*dfftp%nr3))
"
As I understand,  these two lines of codes are to compute the dipole of ionic part and electronic part, so they are the product of charges and distance times a constant. Nevertheless, I didn't see the reason why the sawtooth function (saw(x)) should be used here for recalculating position, which should be a function for correcting potential. In my opinion, here it should straightly use 'tvectb' and 'sawarg'.

Thanks for your time, and let me know if my concern is correct.


Best
Lingyuan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/developers/attachments/20230401/0e28e0a6/attachment.html>


More information about the developers mailing list