User Tools

Site Tools


smeagol_usage

This is an old revision of the document!


Tutorial in PDF

There is simple presentation of smeagol usage presented on Smeagol Workshop in Hungary

smeagol_tutorial.pdf

(no much text explanatiobn included)

The input data files for this tutorial could be downloaded here

smeagol_h2_tutorial.zip

Wiki Tutorial

Intro

Smeagol computation is split to 2 parts and 4 independent runs

  1. LEADs computation
    1. Fireball SCF (converge equlibrium density of LEADs)
    2. Export LEADs files
  2. SYSTEM computation
    1. Fireball SCF (converge equlibrium density of molecule with leads)
    2. Smeagol computation (Get current, conductivity, transmission spectra)

Currently there are 3 versions of smeagol implementation

  1. non-SCF smeagol - there you use equlibrium density from Fireball. It's much faster than nonequlibrium SCF-loop in smeagol. Currently this is the only version which looks to work fine.
  2. SCF with Kohn-Sham grid - This should be almost identical to siesta implementation of smeagol. Currently it looks working in principle but there are problems with discontinuity on bonundary of leads.
  3. McWeda smeagol - There is a problem with tranformation of overlap matrix, so consider it as non-working

As simplest example I will show computation of hydrogen molecule in between hydrogen leads

LEADS computation

Let's use this lead geometry

answer.bas

  6
  1      3.000000      3.000000      1.000000
  1      3.000000      3.000000      2.000000
  1      3.000000      3.000000      3.000000
  1      3.000000      3.000000      4.000000
  1      3.000000      3.000000      5.000000
  1      3.000000      3.000000      6.000000

cel.lvs

   20.000000000     0.000000000    0.000000000
    0.000000000    20.000000000    0.000000000
    0.000000000     0.000000000    6.000000000

because you have to converge density of lead is infinite system you should use good sampling in z-direction (NOTE: Smeagol always expect current to flow in z-direction !!!)

input.kpts

  100
 0.0000000000   0.0000000000    -0.5183627873           0.0100000000 
 0.0000000000   0.0000000000    -0.5078908118           0.0100000000 
 0.0000000000   0.0000000000    -0.4974188363           0.0100000000 
 0.0000000000   0.0000000000    -0.4869468608           0.0100000000 
 0.0000000000   0.0000000000    -0.4764748853           0.0100000000 
 0.0000000000   0.0000000000    -0.4660029098           0.0100000000 
 0.0000000000   0.0000000000    -0.4555309343           0.0100000000 
 0.0000000000   0.0000000000    -0.4450589588           0.0100000000 
 0.0000000000   0.0000000000    -0.4345869833           0.0100000000 
 0.0000000000   0.0000000000    -0.4241150078           0.0100000000 
 0.0000000000   0.0000000000    -0.4136430323           0.0100000000 
 0.0000000000   0.0000000000    -0.4031710568           0.0100000000 
 0.0000000000   0.0000000000    -0.3926990813           0.0100000000 
 0.0000000000   0.0000000000    -0.3822271058           0.0100000000 
 0.0000000000   0.0000000000    -0.3717551303           0.0100000000 
 0.0000000000   0.0000000000    -0.3612831548           0.0100000000 
 0.0000000000   0.0000000000    -0.3508111793           0.0100000000 
 0.0000000000   0.0000000000    -0.3403392038           0.0100000000 
 0.0000000000   0.0000000000    -0.3298672283           0.0100000000 
 0.0000000000   0.0000000000    -0.3193952528           0.0100000000 
 0.0000000000   0.0000000000    -0.3089232773           0.0100000000 
 0.0000000000   0.0000000000    -0.2984513018           0.0100000000 
 0.0000000000   0.0000000000    -0.2879793263           0.0100000000 
 0.0000000000   0.0000000000    -0.2775073507           0.0100000000 
 0.0000000000   0.0000000000    -0.2670353753           0.0100000000 
 0.0000000000   0.0000000000    -0.2565633998           0.0100000000 
 0.0000000000   0.0000000000    -0.2460914243           0.0100000000 
 0.0000000000   0.0000000000    -0.2356194488           0.0100000000 
 0.0000000000   0.0000000000    -0.2251474733           0.0100000000 
 0.0000000000   0.0000000000    -0.2146754978           0.0100000000 
 0.0000000000   0.0000000000    -0.2042035223           0.0100000000 
 0.0000000000   0.0000000000    -0.1937315468           0.0100000000 
 0.0000000000   0.0000000000    -0.1832595713           0.0100000000 
 0.0000000000   0.0000000000    -0.1727875958           0.0100000000 
 0.0000000000   0.0000000000    -0.1623156203           0.0100000000 
 0.0000000000   0.0000000000    -0.1518436448           0.0100000000 
 0.0000000000   0.0000000000    -0.1413716693           0.0100000000 
 0.0000000000   0.0000000000    -0.1308996937           0.0100000000 
 0.0000000000   0.0000000000    -0.1204277182           0.0100000000 
 0.0000000000   0.0000000000    -0.1099557427           0.0100000000 
 0.0000000000   0.0000000000    -0.0994837672           0.0100000000 
 0.0000000000   0.0000000000    -0.0890117917           0.0100000000 
 0.0000000000   0.0000000000    -0.0785398163           0.0100000000 
 0.0000000000   0.0000000000    -0.0680678407           0.0100000000 
 0.0000000000   0.0000000000    -0.0575958652           0.0100000000 
 0.0000000000   0.0000000000    -0.0471238897           0.0100000000 
 0.0000000000   0.0000000000    -0.0366519142           0.0100000000 
 0.0000000000   0.0000000000    -0.0261799387           0.0100000000 
 0.0000000000   0.0000000000    -0.0157079633           0.0100000000 
 0.0000000000   0.0000000000    -0.0052359878           0.0100000000 
 0.0000000000   0.0000000000    0.0052359878           0.0100000000 
 0.0000000000   0.0000000000    0.0157079633           0.0100000000 
 0.0000000000   0.0000000000    0.0261799388           0.0100000000 
 0.0000000000   0.0000000000    0.0366519143           0.0100000000 
 0.0000000000   0.0000000000    0.0471238898           0.0100000000 
 0.0000000000   0.0000000000    0.0575958653           0.0100000000 
 0.0000000000   0.0000000000    0.0680678408           0.0100000000 
 0.0000000000   0.0000000000    0.0785398163           0.0100000000 
 0.0000000000   0.0000000000    0.0890117917           0.0100000000 
 0.0000000000   0.0000000000    0.0994837672           0.0100000000 
 0.0000000000   0.0000000000    0.1099557427           0.0100000000 
 0.0000000000   0.0000000000    0.1204277182           0.0100000000 
 0.0000000000   0.0000000000    0.1308996937           0.0100000000 
 0.0000000000   0.0000000000    0.1413716692           0.0100000000 
 0.0000000000   0.0000000000    0.1518436448           0.0100000000 
 0.0000000000   0.0000000000    0.1623156203           0.0100000000 
 0.0000000000   0.0000000000    0.1727875958           0.0100000000 
 0.0000000000   0.0000000000    0.1832595713           0.0100000000 
 0.0000000000   0.0000000000    0.1937315468           0.0100000000 
 0.0000000000   0.0000000000    0.2042035223           0.0100000000 
 0.0000000000   0.0000000000    0.2146754977           0.0100000000 
 0.0000000000   0.0000000000    0.2251474732           0.0100000000 
 0.0000000000   0.0000000000    0.2356194487           0.0100000000 
 0.0000000000   0.0000000000    0.2460914242           0.0100000000 
 0.0000000000   0.0000000000    0.2565633997           0.0100000000 
 0.0000000000   0.0000000000    0.2670353753           0.0100000000 
 0.0000000000   0.0000000000    0.2775073508           0.0100000000 
 0.0000000000   0.0000000000    0.2879793263           0.0100000000 
 0.0000000000   0.0000000000    0.2984513018           0.0100000000 
 0.0000000000   0.0000000000    0.3089232773           0.0100000000 
 0.0000000000   0.0000000000    0.3193952528           0.0100000000 
 0.0000000000   0.0000000000    0.3298672283           0.0100000000 
 0.0000000000   0.0000000000    0.3403392038           0.0100000000 
 0.0000000000   0.0000000000    0.3508111793           0.0100000000 
 0.0000000000   0.0000000000    0.3612831548           0.0100000000 
 0.0000000000   0.0000000000    0.3717551303           0.0100000000 
 0.0000000000   0.0000000000    0.3822271058           0.0100000000 
 0.0000000000   0.0000000000    0.3926990813           0.0100000000 
 0.0000000000   0.0000000000    0.4031710568           0.0100000000 
 0.0000000000   0.0000000000    0.4136430323           0.0100000000 
 0.0000000000   0.0000000000    0.4241150078           0.0100000000 
 0.0000000000   0.0000000000    0.4345869833           0.0100000000 
 0.0000000000   0.0000000000    0.4450589588           0.0100000000 
 0.0000000000   0.0000000000    0.4555309343           0.0100000000 
 0.0000000000   0.0000000000    0.4660029098           0.0100000000 
 0.0000000000   0.0000000000    0.4764748853           0.0100000000 
 0.0000000000   0.0000000000    0.4869468607           0.0100000000 
 0.0000000000   0.0000000000    0.4974188362           0.0100000000 
 0.0000000000   0.0000000000    0.5078908117           0.0100000000 
 0.0000000000   0.0000000000    0.5183627872           0.0100000000 

first you have to run SCF calculation to converge charges, use this input file Fireball.in (scf)

&OPTION
basisfile = answer.bas 
lvsfile = cel.lvs
icluster = 0
nstepf = 1
sigmatol = 0.0000000001
max_scf_iterations = 100
iqout = 1
ismeagol = 0
ifixcharge = 0
&END

&OUTPUT
iwrtHSrho = 0
iwrteigen = 1
iwrtdos = 0
&END

then fix charges, activate iwrtHSrho = 1 and run computation again to export LEADs density

&OPTION
basisfile = answer.bas 
lvsfile = cel.lvs
icluster = 0
nstepf = 1
sigmatol = 0.0000000001
max_scf_iterations = 100
dt = 0.5
iqout = 1
ismeagol = 0
ifixcharge = 1
&END

&OUTPUT
iwrtHSrho = 1
iwrteigen = 0
iwrtdos = 0
&END

to do this you have to specify k-point sampling of the SYSTEM you want to use the LEADs in. This kpoints file is called MOLECULE.kpts. In our case it has just gamma point, however in general it could have any sampling in x and y direction. (never in z!!).

MOLECULE.kpts

  1
 0.0000000000   0.0000000000    0.0000000000           1.0000000000 

after the computation you get file called ELECTRODE where k-space representations of Hamiltonian, Density matrix and overplap matrix are stored.

SYSTEM computation

Your system should contain the geometry of leads in it's geometry description, it should also contain some region where charge redistribution is screened in order to smoothly align with LEADs, because LEADs itselfs represent infinite bulk and their chrage distribution is fixed during the computation. Order of atoms MUST be exactly the same as in LEADs calculation and left lead must be at the begining, and right lead must be at the end of file. For example:

answer.bas

          24
   1    3.000000000    3.000000000    1.000000000  #start LEAD.left
   1    3.000000000    3.000000000    2.000000000
   1    3.000000000    3.000000000    3.000000000
   1    3.000000000    3.000000000    4.000000000
   1    3.000000000    3.000000000    5.000000000
   1    3.000000000    3.000000000    6.000000000  # end LEAD.left
 1    3.000000000    3.000000000    7.000000000    # screening region (left)
 1    3.000000000    3.000000000    8.000000000
 1    3.000000000    3.000000000    9.000000000
 1    3.000000000    3.000000000    10.000000000
 1    3.000000000    3.000000000    11.000000000
   1    3.000000000    3.000000000    13.000000000  # molecule itselfs
   1    3.000000000    3.000000000    14.000000000
 1    3.000000000    3.000000000    16.000000000    #  screening region (right)
 1    3.000000000    3.000000000    17.000000000
 1    3.000000000    3.000000000    18.000000000
 1    3.000000000    3.000000000    19.000000000
 1    3.000000000    3.000000000    20.000000000
  1    3.000000000    3.000000000    21.000000000  #start LEAD.right
  1    3.000000000    3.000000000    22.000000000
  1    3.000000000    3.000000000    23.000000000
  1    3.000000000    3.000000000    24.000000000
  1    3.000000000    3.000000000    25.000000000
  1    3.000000000    3.000000000    26.000000000  # end LEAD.left

cel.lvs

   20.000000000     0.000000000    0.000000000
    0.000000000    20.000000000    0.000000000
    0.000000000     0.000000000    26.000000000

Your kpoint sampling MUST be the same as MOLECULE.kpts in LEADs calculation. Otherweis ELECTRODE files are incompatible. input.kpts

  1
 0.0000000000   0.0000000000    0.0000000000           1.0000000000 

first you should run SCF run with fireball (with smeagol off), it's much faster than doing smeagol directly from neutral atom charges. What's more, currently smeagol SCF implementation in fireball is not perfect.

fireball.in (scf)

&OPTION
basisfile = answer.bas 
lvsfile = cel.lvs
icluster = 0
nstepf = 1
sigmatol = 0.0000000001
max_scf_iterations = 100
iqout = 1
ismeagol=0
&END

&OUTPUT
iwrtHSrho = 0
&END 

After convergence of charges, you need to copy ELECTRODE files from LEADs calculation. Rename it ELECTRODE.left, and ELECTRODE.right. You can use different leads on left and right. Both left and right lead should have the same order (top to down in z-direction) it means right lead SHOULD NOT be in reverse order (mirror).

smeagol_usage.1322825890.txt.gz · Last modified: 2011/12/02 12:38 (external edit)