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

Christian Glinsvad christian.glinsvad at fysik.dtu.dk
Fri Jul 16 21:41:30 CEST 2010


kgd wrote:
> The error disappears when we enlarge the cell from 1x1x1 to 3x1x1 (we
> do it by this srf1=read('POSCAR',format='vasp')
> srf=srf1.repeat(rep=(3,1,1))).

That doesn't make sense to me. This is an issue with too little vacuum 
in the z-direction as far as I can tell from the code.

> The cell of (1x1x1) is ([3.604, 0, 0],[0, 5.097,0 ],[0, 0, 27.82]),
> the (3x1x3) is (([10.813, 0, 0],[0, 5.097,0 ],[0, 0, 27.82]) . To my
> understansding, if the cutoff radius is less than lattice constant in
> peroidic direction, the error " too close to boundary" will not
> happen. However we find the cutoff radius is still more than the
> lattice constant in y direction. 
> Why not error is reported? For example "too close to boundary in y direction".

It is only an error if an augmentation sphere extends beyond any of the
non-periodic boundaries, i.e. top/bottom planes orthogonal to the z-axis
in this case.

> In our study, DZP is chosed and the cutoff radius of Cu(dzp) is 8.9 Bohr. 

There's your problem. I examined your POSCAR file and found that the Cu
atom closest to the z=0 plane is just 4 Å from the boundary but 8.9 Bohr
is 4.7 Å so you'll need at least 5 Å of vacuum if you want that DZP
basis. However, I'm able to run it surface.py without the (3,1,1)
repeated cell by adjusting the grid spacing a little and patching this:
http://en.pastebin.ca/1901962

Works just fine with 4 Å, but may be unphysical when enforcing zero BC.

> when we use 3x1x1 the STM initialize passed, but another error
> occurs. The error is as following:
> 
> Traceback (most recent call last):
>   File "mystm.py", line 29, in ?
>     stm.scan()
>   File "/usr/lib64/python2.4/site-packages/gpaw/transport/jstm.py", line 713, in scan
>     T_pe[j, estart:estart + nepts] = self.stm_calc.get_transmission(V)
>   File "/root/ase/ase/transport/stm.py", line 162, in get_transmission
>     v21_a1 = np.dot(v_21, a1[-dim0:])
> ValueError: objects are not aligned
> 

I don't know much about the STM code, but it's probably because your
matrix sizes are incompatible or something. I'm getting another shape
mismatch error:

Traceback (most recent call last):
   File "mystm.py", line 28, in <module>
     stm.initialize()
   File "/usr/local/lib/python2.6/dist-packages/gpaw/transport/jstm.py", 
line 400, in initialize
     self.initialize_transport()
   File "/usr/local/lib/python2.6/dist-packages/gpaw/transport/jstm.py", 
line 491, in initialize_transport
     bias=bias,)
   File "/usr/local/lib/python2.6/dist-packages/ase/transport/stm.py", 
line 70, in initialize
     h1_im[:pl1, :pl1], s1_im[:pl1, :pl1] = hs1_dij

For the record, here's my slightly altered (read optimized) surface.py:
http://en.pastebin.ca/1901965

Best of luck.


Regards
Christian Glinsvad


More information about the gpaw-users mailing list