In [ ]:
from __future__ import print_function
import sisl
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline
First TranSiesta example.
This example will only create the structures for input into TranSiesta. I.e. sisl
's capabilities of creating geometries with different species is a core functionality which is handy for creating geometries for Siesta/TranSiesta.
This example will teach you one of the most important aspect of performing a successfull DFT+NEGF calculation. Namely that the electrodes should only couple to its nearest neighbouring cell.
In [ ]:
graphene = sisl.geom.graphene(1.44, orthogonal=True)
In [ ]:
graphene.write('STRUCT_ELEC_SMALL.fdf')
graphene.write('STRUCT_ELEC_SMALL.xyz')
In [ ]:
elec = graphene.tile(2, axis=0)
elec.write('STRUCT_ELEC.fdf')
elec.write('STRUCT_ELEC.xyz')
The above two code blocks writes two different electrodes that we will test in TranSiesta. In this example we will have the transport direction along the 1st lattice vector (0th index in Python). Note how TranSiesta does not limit your choice of orientation. Any direction may be used as a semi-infinite direction, just as in TBtrans.
In [ ]:
device = elec.tile(3, axis=0)
device.write('STRUCT_DEVICE.fdf')
device.write('STRUCT_DEVICE.xyz')
As this is your first example of running TranSiesta there are a few things you should know:
siesta
executable as this siesta --electrode
. This will create the *.TSHS
file which is the basic ingredient used in TranSiesta/TBtrans to calculate the self-energies from the given electrode.*.TSHS
) into sisl and create band-structures, just as in TB 1.tselecs.sh
which will generate a default input for $N\ge1$ electrodes and only require slight changes.Run TranSiesta
SCF.MustConverge T
(the default) to make TranSiesta die if it does not converge.dQ
column is close to $0$, below $0.01$ is preferable. Further, it is advised that the last couple of iterations also obey this condition.Go through the lines after:
***************************
* WELCOME TO TRANSIESTA *
***************************
which is the point where TranSiesta starts.
Try and familiarize your-self with the output of TranSiesta, lots of information is printed. Some more important than others.
Run TBtrans. Notice that TBtrans will default to the values given to TranSiesta, so do not be worried about missing TBT.*
flags in the input files. However, remark that TBtrans will only use the TS.<>
flag if TBT.<>
does not exist.
Run TranSiesta for the electrode:
siesta --electrode RUN_ELEC.fdf > RUN_ELEC.out
Run TranSiesta for the device region:
siesta RUN.fdf > RUN.out
This finalizes your (possibly) first TranSiesta calculation. All should have gone fine here, after some time. You should also have noticed that TranSiesta is considerably slower than TBtrans.
ELEC.*
filesRUN_ELEC.fdf
to include the STRUCT_ELEC_SMALL.fdf
instead of STRUCT_ELEC.fdf
siesta --electrode RUN_ELEC.fdf > ELEC_SMALL.out
)siesta RUN.fdf > TS_SMALL.out
)Evidently TranSiesta does not allow too small electrodes as that will create an erroneous coupling to the semi-infinite directions. Luckily this may easily be inferred in the electrode output by looking for this keyword: Internal auxiliary supercell
. The output of TranSiesta will print 3 numbers $\langle A\rangle \mathrm{x} \langle B\rangle \mathrm{x}\langle C\rangle$ which corresponds to the number of neighbouring unit-cells the primary unit-cell connects to. The important number to look for is the number corresponding to the semi-infinite direction.
What should this number be in order to preserve nearest-neighbour unit-cell interactions? Say, if the semi-infinite is along the $\langle A\rangle$ direction what should the number $\langle A\rangle$ (always!) be?