[gpaw-users] An error occurs when performing STM simulation using GPAW

Christian Glinsvad christian.glinsvad at fysik.dtu.dk
Thu Jul 15 18:06:50 CEST 2010


kgd wrote:
> Dear gpaw-users,
> An error occurs when we perform STM simulation using GPAW(see
> attachment). First,we run surface.py and it works.Then,we run
> mystm.py and an error occurs during "stm.initialize()"(see 
> error_CuO).
> 
> The error is as following:
>  
> Traceback (most recent call last):
>   File "mystm.py", line 28, in ?
>     stm.initialize() 
>   File "/usr/lib64/python2.4/site-packages/gpaw/transport/jstm.py", line 360, in initialize
>     f = AtomCenteredFunctions(self.srf.wfs.gd, [phit], spos_c, j)
>   File "/usr/lib64/python2.4/site-packages/gpaw/transport/jstm.py", line 156, in __init__
>     lfc.set_positions((spos_c[np.newaxis, :] * gd.N_c - corner_c + 1) /
>   File "/usr/lib64/python2.4/site-packages/gpaw/lfc.py", line 262, in set_positions
>     movement |= sphere.set_position(spos_c, self.gd, self.cut)
>   File "/usr/lib64/python2.4/site-packages/gpaw/lfc.py", line 89, in set_position
>     for beg_c, end_c, sdisp_c in gd.get_boxes(spos_c, rcut, cut):
>   File "/usr/lib64/python2.4/site-packages/gpaw/grid_descriptor.py", line 259, in get_boxes
>     raise RuntimeError(('Atom at %.3f %.3f %.3f ' +
> RuntimeError: Atom at 0.500 0.500 0.504 too close to boundary (beg. of box [-2  1  1], end of box [23 24 25])
> 
> It is strange that the atom at ( 0.500 0.500 0.504) is not found. 
> "Atom at 0.500 0.500 0.504 too close to boundary (beg. of box [-2  1
>  1], end of box [23 24 25])" , we set pbc= (1, 1, 0), that is the 
> systerm has periodicity on X,Y,but not on Z. The negative value [-2 1
>  1] of beg. of box appears on X, we don't know where is the error 
> considering periodicity. Any reply is appreciated.

This error message is a bit misleading. It means that an augmentation
sphere centered on the atom has parts of it protruding beyond the unit
cell, but whether to take that as "atom is too close to boundary" or
"augmentation sphere is too large to fit in cell" is up to interpretation.

I think in this particular case, since the atom is smack in the middle,
it's probably an issue of a cutoff radius (rcut) being ever so slightly
larger than the distance to the boundary. An easy fix is to simply
ignore the volume integrals over the parts of such spheres which fall
outside the unit cell as they won't contribute that much (just 2 layers
of grid points along the x-axis in your case).

We can probably provide a patch that will allow you to do so, but we'll
need you to install the latest development version of GPAW first. It
would also be helpful if you could then re-run the scripts and post the
error messages from that here (and attach the POSCAR file if possible).

$ svn checkout https://svn.fysik.dtu.dk/projects/gpaw/trunk gpaw
https://wiki.fysik.dtu.dk/gpaw/install/installationguide.html#standard-installation

Regards
Christian Glinsvad


More information about the gpaw-users mailing list