[gpaw-users] The dipole-layer correction with plane wave mode

Georg Kastlunger georg_kastlunger at brown.edu
Mon Nov 13 18:13:25 CET 2017


Dear Chang,


you are right this seems to be an inconsistency I encountered as well. 
There are, however, to simple ways to counter this issue:


1) You can turn the pbc in the specific direction of. This might sound 
counterintuitive, but it will not affect the results. The only thing 
that changes is the reference for the electrostatic potential, which 
will not alter any result.


2) You can add one line in dipole_correction.py:  In the function 
"check_direction" after "if pbc_c[self.c]:" you can add the if statement 
"if isinstance(dens, np.ndarray):". Doing so the dipole correction will 
not check for the pbc in PW mode.


I hope that helped and let me know if I am mistaking in any way.


Best wishes,

Georg







On 11/10/2017 04:37 AM, Chang Liu via gpaw-users wrote:
>
> Hi,
>
>
> With GPAW 1.3.0, it seems that if I set /slab.pbc = (1,1,1)/ for a 
> slab with a 7 Å vacuum on both sides, when I try to use the dipole 
> correction /poissonsolver={'dipolelayer': 'xy'} /with /mode=PW(500)/, 
> the program returns an error
>
>
> /File 
> "/hpc2n/eb/software/MPI/GCC/6.4.0-2.28/OpenMPI/2.1.1/GPAW/1.3.0-Python-2.7.14/lib/python2.7/site-packages/gpaw/dipole_correction.py", 
> line 54, in check_direction/
>
> /ValueError: System must be non-periodic perpendicular to dipole-layer./
>
>
> However, it works without problem with GPAW 0.11.0. Besides, on 
> https://wiki.fysik.dtu.dk/gpaw/tutorials/dipole_correction/dipole.html 
> it is stated that "In PW-mode, the potential must be periodic and in 
> that case".
>
>
> Is it a bug or intended change? Thanks.
>
>
> Best wishes,
> Chang Liu
> ----------------------------------------------------------
>                         Chang Liu
>                        PhD student
> Fysikum, Albanova, Stockholm University
>        S-106 91 Stockholm, Sweden
>  +46 767159891
> http://xsolasgroup.fysik.su.se/
>
>
> _______________________________________________
> gpaw-users mailing list
> gpaw-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/gpaw-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20171113/74b8c1c0/attachment-0001.html>


More information about the gpaw-users mailing list