Dear Shihua

2012/8/27 Shihua Tan <[email protected]>

>
> Dear Emilio:
>
>
> *    * I’m try*i*ng to using the *Hamilton(H)* and *Overlap(S)* matrices
> stored in **.HSX* or **.TSHS* to get the transmission by NEGF, because I
> need the *T(E)* in a integration just like the current calculation. Now I
> have got the* **H* and *S* matrices in full form(both of them are *no_u**×
> **(4*no_u) *matrices, by using *no_u, numh, listh, H/S* in sparse form)
> from **.HSX* successfully. But some questions bother me for a long time,
> please help me:
>
> 1)      Is there any different between the H/S matrix in **.HSX* and *
> *.TSHS*? Although I have checked the */.../siesta-3.1/Src/m_hsx.F *and *
> m_ts_io.F90*, I’m still not sure that.
>
I highly doubt this. It is simply a different storage format.  I.e. it is
the same matrix.

>  2)      What does the function *cp_gf_vars *do in 
> */.../siesta-3.1/Util/TBTrans/sethhm2.F
> *line 327? I can’t find the source code like* cp_gf_vars.** anywhere.
> Please offer me the source code of *cp_gf_vars.** if possible.
>
Simply run: "grep  -i cp_gf_vars *" in siesta-3.1/Util/TBTrans/ directory.
It displays that cp_gf_vars are found in:
m_tbt_gf.F90. It starts on line 80.

> 3)      What does the integer* ix(maxnh)* in *
> /.../siesta-3.1/Util/TBTrans/sethhm2.F* line 112 refer to? I find that
> the integer* ix(maxnh)* plays a key role in defining *Hk, Sk, Hk2 *and *
> Sk2*.
>
 This is really a key role in building up the correct matrix for the
recursive surface Green's function. In the recursive scheme you need the
Hamiltonian within the unit-cell AND the transfer matrix.
The solution method for finding the transfer matrix for H and S is to
figure out the connections directions, i.e. the connection between i and j
in <i|H|j> and <i|S|j>. This requires that you have a supercell in the
calculation (i.e. you cannot generate the Greens function in an electrode
Gamma calculation). Remember that the supercell of the system has
"connections" in all directions where the atoms overlap. The easiest to way
figure out which connection the orbitals have is by using the reciprocal
cell and look for the integer placement of the neighbouring cell. This is
effectively done in the loop on lines: 301-317. recell is the reciprocal
cell (without the 2*Pi constant, otherwise the integer had to be compared
to Pi). That loop sets ix(ind) to 0 if the xij (distance between to
orbitals) is within the unitcell with respect to the transport direction.
And if it is in the neighbouring cell above (in the transport direction)
ix(ind) = 1.

>  4)      Could you please introduce the procedure of getting *Hk, Sk, Hk2
> and Sk2 *from the *H* and *S* in **.HSX* or **.TSHS* of one-dimensional
> system just like SWCNT or GNR? I used to think that the *H/S *can be
> split into *[Hk Hk2 O Hk2’]/[Sk Sk2 O Sk2’] *(both of them are *no_u**×**
> no_u*), but it’s wrong.
>
Remember that you need to ensure a large enough unit cell so that
connections between unit cells in the supercell is limited to 1
neighbouring cell!
What you ask is basically what is done by TBtrans when constructing the
electrode surface self-energies.
See the code in green4.F:
The key part is the following (and the same for R replaced by L)
Rh00 =0.0
Rs00 =0.0
Rh01 =0.0
Rs01 =0.0

tinit=.false.
tkham=.false. ! This flag tells sethhm2 to create the transfer matrix in
Rh01 and Rs01.
tlast=.false.
call sethhm2(joutfile,tinit,tkham,tlast,k_fdf,
. ispin_fdf,hsfile,nuaR,Rlasto,Rng1,nspin,
. cell,kscell,kdispl,RH00,Rs00,Rh01,Rs01)

Kind regards Nick

PS. Your code should look something like this (with correct indices)
tinit=.true. ! Initialize the arrays
tlast=.false.
tkham=.false.
call sethhm2(joutfile,tinit,tkham,tlast,kpoint,ispin,
  & hsfile, nua,lasto,ng1,nspin,cell,kscell,kdispl,
  & H00,s00,h01,s01)
tinit=.false.
  tkham=.false. ! create the transfer matrix and H00
tlast=.false.
call sethhm2(joutfile,tinit,tkham,tlast,k_fdf,
. ispin_fdf,hsfile,nuaL,Llasto,Lng1,nspin,
  . cell,kscell,kdispl,H00,s00,h01,s01)

! Use H00, S00, H01, S01

! Clear up
tinit=.false.
  tkham=.false.
tlast=.true. ! Clean up arrays
call sethhm2(joutfile,tinit,tkham,tlast,k_fdf,
. ispin_fdf,hsfile,nuaL,Llasto,Lng1,nspin,
. cell,kscell,kdispl,H00,s00,h01,s01)


  Here is my system information:
>
>        System operation: RedHatEnterpriseAS
>
>        Siesta Version:  siesta-3.1
>
>        Architecture  : Ifort10.1.026+Mkl10.1.015+openmpi
>
>        Compiler flags: mpif90 -g -O2
>
>
> Any help will be appreciated.
>
>
>
>    Best wish!
>
>
>   Shihua Tan
>
>
>

Responder a