<div dir="ltr">Hi Juha,<div><br></div><div>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.</div><div><br></div><div>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?</div><div><br></div><div>Let me know how it goes,</div><div><br></div><div>Matt</div><div><br><br>On Friday, May 1, 2015 at 3:46:30 PM UTC+1, jgh wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">Hi
<br>
<br>unfortunately, I don't have time to look into this. 
<br>It seems to me that for analytic potentials it wouldn't be that hard,
<br>but for potentials read in on a grid it would need special care.
<br>
<br>regards
<br>
<br>Juerg
<br>------------------------------<wbr>------------------------------<wbr>--
<br>Juerg Hutter                        <wbr> Phone : ++41 44 635 4491
<br>Institut für Chemie C                FAX   : ++41 44 635 6838
<br>Universität Zürich                   E-<wbr>mail: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">hut...@chem.uzh.ch</a>
<br>Winterthurerstrasse 190
<br>CH-8057 Zürich, Switzerland
<br>------------------------------<wbr>------------------------------<wbr>---
<br>
<br>-----<a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a> wrote: -----To: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>
<br>From: Juha Ritala 
<br>Sent by: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>
<br>Date: 04/30/2015 01:18PM
<br>Subject: Re: [CP2K:6441] Problems with GAPW + external potential
<br>
<br>Hi Juerg,
<br>
<br>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.
<br>
<br>- Juha
<br>
<br>On Wednesday, April 29, 2015 at 2:17:45 PM UTC+3, jgh wrote:Hi
<br>
<br>
<br>
<br>yes, this is a bug. The external potential is applied to the
<br>
<br>charge on the plane wave grid. In GAPW only the soft part
<br>
<br>of the charge is on the grid and one would have to also compute
<br>
<br>the contributions from the local atomic charges.
<br>
<br>
<br>
<br>regards
<br>
<br>
<br>
<br>Juerg Hutter 
<br>
<br>------------------------------<wbr>------------------------------<wbr>--
<br>
<br>Juerg Hutter                        <wbr> Phone : ++41 44 635 4491
<br>
<br>Institut für Chemie C                FAX   : ++41 44 635 6838
<br>
<br>Universität Zürich                   E-<wbr>mail: <a>hut...@chem.uzh.ch</a>
<br>
<br>Winterthurerstrasse 190
<br>
<br>CH-8057 Zürich, Switzerland
<br>
<br>------------------------------<wbr>------------------------------<wbr>---
<br>
<br>
<br>
<br>-----<a>cp...@googlegroups.com</a> wrote: -----To: <a>cp...@googlegroups.com</a>
<br>
<br>From: Juha Ritala 
<br>
<br>Sent by: <a>cp...@googlegroups.com</a>
<br>
<br>Date: 04/29/2015 09:52AM
<br>
<br>Subject: [CP2K:6432] Problems with GAPW + external potential
<br>
<br>
<br>
<br>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.
<br>
<br>
<br>
<br>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?
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>-- 
<br>
<br>
<br>
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>
<br>
<br>
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a>cp2k+...@googlegroups.com</a>.
<br>
<br>
<br>
<br>To post to this group, send email to <a>cp...@googlegroups.com</a>.
<br>
<br>
<br>
<br>Visit this group at <a href="http://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/cp2k';return true;" onclick="this.href='http://groups.google.com/group/cp2k';return true;">http://groups.google.com/<wbr>group/cp2k</a>.
<br>
<br>
<br>
<br>For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>[attachment "E_vs_V_GAPW_and_GPW.pdf" removed by Jürg Hutter/at/UZH]
<br>
<br>[attachment "H2O_constant_extpot_GPW.inp" removed by Jürg Hutter/at/UZH]
<br>
<br>[attachment "H2O_constant_extpot_GPW.out" removed by Jürg Hutter/at/UZH]
<br>
<br>[attachment "H2O_constant_extpot_GAPW.inp" removed by Jürg Hutter/at/UZH]
<br>
<br>[attachment "H2O_constant_extpot_GAPW.out" removed by Jürg Hutter/at/UZH]
<br>
<br>
<br>
<br>
<br>
<br>-- 
<br>
<br>You received this message because you are subscribed to the Google Groups "cp2k" group.
<br>
<br>To unsubscribe from this group and stop receiving emails from it, send an email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp2k+uns...@googlegroups.<wbr>com</a>.
<br>
<br>To post to this group, send email to <a href="javascript:" target="_blank" gdf-obfuscated-mailto="L1a6MBvv4zAJ" rel="nofollow" onmousedown="this.href='javascript:';return true;" onclick="this.href='javascript:';return true;">cp...@googlegroups.com</a>.
<br>
<br>Visit this group at <a href="http://groups.google.com/group/cp2k" target="_blank" rel="nofollow" onmousedown="this.href='http://groups.google.com/group/cp2k';return true;" onclick="this.href='http://groups.google.com/group/cp2k';return true;">http://groups.google.com/<wbr>group/cp2k</a>.
<br>
<br>For more options, visit <a href="https://groups.google.com/d/optout" target="_blank" rel="nofollow" onmousedown="this.href='https://groups.google.com/d/optout';return true;" onclick="this.href='https://groups.google.com/d/optout';return true;">https://groups.google.com/d/<wbr>optout</a>.
<br>
<br>
<br></blockquote></div></div>