[CP2K:6441] Problems with GAPW + external potential

Juha Ritala jri... at gmail.com
Mon May 25 09:42:21 UTC 2015


I have tested the patch using the water molecule setup and everything looks 
good so far. The total energy stays almost perfectly constant (up to a 
negligible numerical error) when a constant background potential is 
applied. This was more or less obvious so I continued by applying a uniform 
electric field to the system (maximum magnitude 0.1 V/Å). The dependence of 
the energy on the electric field is the same (within the eps_scf) using 
both GPW and GAPW methods. Also the forces on the atoms are almost the 
same. The fixed GAPW method does a better job here, actually, since the sum 
of the forces is closer to zero, which should be the case for the charge 
neutral molecule.

Continuing the theoretical consideration, I would say that this fix should 
handle an uniform electric field exactly independently on the magnitude of 
the field. This requires only that the monopole and dipole moments of the 
charge density in the atomic region are correct, which should be the case 
with *rho0_s_rs* (*ñ^0).* More generally, any external potential that 
corresponds to a charge density outside the atoms should be fine, I guess. 
This would be true because outside the atomic region the electrostatic 
potential generated by the atomic charge density depends only on the 
multipole moments of the density. Since those are correct, everything 
should work perfectly.

I will next try a real simulation setup where the field is not perfectly 
uniform.

- Juha

On Wednesday, 20 May 2015 11:34:22 UTC+3, Juha Ritala wrote:
>
> Hi Matt,
>
> thank you for the patch. I think this approach makes sense. If I 
> understood correctly, *rho0_s_rs* is the realspace grid representation of 
> the charge density *ñ^0* (in the GAPW paper from 1999), and *ñ^0 *is sort 
> of a representation of the charge density in the atomic region using the 
> set of soft Gaussians. At least the multipole moments of the atomic charge 
> density and *ñ^0 *are equal, so in a sufficiently large length scale 
> these charge densities are approximately the same. This would imply that 
> for moderate electric fields this approximation would indeed be fine.
>
> I will check how this patch works for me and keep you informed.
>
> - Juha
>
> On Saturday, 16 May 2015 13:03:25 UTC+3, Matt W wrote:
>>
>> Hi Juha,
>>
>> there are a couple of files attached (compatible with latest version of 
>> cp2k at time of writing, but there are only a couple of lines changed) you 
>> can try and see if it works with GAPW. It only works with the soft part of 
>> the density, including the compensation charges. As the compensation 
>> charges, including the core, are put onto the fft grid the core routines in 
>> external_potential need to be protected. Might need tidying for mixed 
>> gpw/gapw.
>>
>> I guess this approximately means that the core (i.e. any functions on the 
>> hard atomic grids) isn't directly polarized by the field? For modest fields 
>> it should be fine, maybe?
>>
>> Let me know how it goes,
>>
>> Matt
>>
>>
>> On Friday, May 1, 2015 at 3:46:30 PM UTC+1, jgh wrote:
>>>
>>> Hi 
>>>
>>> unfortunately, I don't have time to look into this. 
>>> It seems to me that for analytic potentials it wouldn't be that hard, 
>>> but for potentials read in on a grid it would need special care. 
>>>
>>> regards 
>>>
>>> Juerg 
>>> -------------------------------------------------------------- 
>>> Juerg Hutter                         Phone : ++41 44 635 4491 
>>> Institut für Chemie C                FAX   : ++41 44 635 6838 
>>> Universität Zürich                   E-mail: hut... at chem.uzh.ch 
>>> Winterthurerstrasse 190 
>>> CH-8057 Zürich, Switzerland 
>>> --------------------------------------------------------------- 
>>>
>>> -----cp... at googlegroups.com wrote: -----To: cp... at googlegroups.com 
>>> From: Juha Ritala 
>>> Sent by: cp... at googlegroups.com 
>>> Date: 04/30/2015 01:18PM 
>>> Subject: Re: [CP2K:6441] Problems with GAPW + external potential 
>>>
>>> Hi Juerg, 
>>>
>>> thank you for confirming this. Is there any chance that this will be 
>>> fixed in the near future, or should I stick with GPW for the time being? I 
>>> could try and fix it myself, but as far as I understand how GAPW works, 
>>> considering the contribution from the local atomic charges is not at all 
>>> trivial. 
>>>
>>> - Juha 
>>>
>>> On Wednesday, April 29, 2015 at 2:17:45 PM UTC+3, jgh wrote:Hi 
>>>
>>>
>>>
>>> yes, this is a bug. The external potential is applied to the 
>>>
>>> charge on the plane wave grid. In GAPW only the soft part 
>>>
>>> of the charge is on the grid and one would have to also compute 
>>>
>>> the contributions from the local atomic charges. 
>>>
>>>
>>>
>>> regards 
>>>
>>>
>>>
>>> Juerg Hutter 
>>>
>>> -------------------------------------------------------------- 
>>>
>>> Juerg Hutter                         Phone : ++41 44 635 4491 
>>>
>>> Institut für Chemie C                FAX   : ++41 44 635 6838 
>>>
>>> Universität Zürich                   E-mail: hut... at chem.uzh.ch 
>>>
>>> Winterthurerstrasse 190 
>>>
>>> CH-8057 Zürich, Switzerland 
>>>
>>> --------------------------------------------------------------- 
>>>
>>>
>>>
>>> -----cp... at googlegroups.com wrote: -----To: cp... at googlegroups.com 
>>>
>>> From: Juha Ritala 
>>>
>>> Sent by: cp... at googlegroups.com 
>>>
>>> Date: 04/29/2015 09:52AM 
>>>
>>> Subject: [CP2K:6432] Problems with GAPW + external potential 
>>>
>>>
>>>
>>> I have had some problems when I tried to use GAPW method combined with 
>>> an external potential. To demonstrate what seems to be the source of the 
>>> problems, I made this simple test case with a water molecule in a constant 
>>> external potential. Physically, the constant background potential should 
>>> not affect the total energy of the water molecule since the molecule is 
>>> charge neutral. The energy does change as a function of the constant 
>>> potential when the GAPW method is used, however. You can see this in the 
>>> attached energy vs. background potential plot. GPW method gives expected 
>>> behaviour, the total energy stays perfectly constant when the potential is 
>>> varied. 
>>>
>>>
>>>
>>> It seems as if some part of the charge in the system is unaffected by 
>>> the external potential in GAPW and thus the total charge is effectively 
>>> non-zero. Is this a bug or is there some part of the implementation 
>>> missing? 
>>>
>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20150525/036d8673/attachment.htm>


More information about the CP2K-user mailing list