[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Coulomb Energy

From: Florian Weik
Subject: Re: Problem with Coulomb Energy
Date: Thu, 14 Nov 2019 16:13:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0


there is a fix for the specific issue you raised in

Please by advised that all of the dielectric contrast/

potential difference part of ELC is not properly tested

and production use of this code is not recommended.



On 11/14/19 1:05 PM, Florian Weik wrote:

thank you for reporting this. There is a prefactor bug in the

energy calculation. I'll fix it and let you known then it is done.

For reference:

Line 1061 of src/core/electrostatics_magnetostatics/elc.cpp reads

  /* we count both i<->j and j<->i, so return just half of it */
  return 0.5 * eng;

which is incorrect, because 'eng' also contains the dipole correction

which is not a pair force.



On 11/13/19 2:50 PM, Fabian Glatzel wrote:
Dear developers,

using your package I encountered some problem I could not resolve by myself. I'd be deeply grateful if you could offer some advice.

The problem is the following:
Using P3M and ELC with an external potential (via the "pot_diff" argument), I get Coulomb energies that make no sense. The energy contribution of charges in the "external" potential defined by "pot_diff" seems to be off by a factor of 2.
Let's say the system has a length of 10 and pot_diff=1V is set. Further, only two particles are placed in the system at z=0 (charge q=+1e) and at z=9 (charge q=-1e) and the prefactor for the P3M is set such that the interactions among the particles are negligible. For this case, I would expect a Coulomb energy of approx. 0.8eV. However, espresso seems to have a different opinion, namely that it should be 0.4eV.

Please find a minimal example code attached to this email.

I'm looking forward to hearing from you,

Fabian Glatzel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]