how to run siesta - physics to run siesta víctor m. garcía suárez gollum school. molesco network...

52
How to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Upload: phungcong

Post on 14-Mar-2018

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

How to run SIESTA

Víctor M. García SuárezGollum School. MOLESCO network

20-May-2015

Partially based on a talk by Javier Junquera

Page 2: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Outline

- Developers

- General features

- FDF. Input variables

- How to run the code

- Output files

- Saving and reading information

- Pseudopotential generation

- Visualization tools

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 3: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Developers

http://departments.icmab.es/leem/siesta

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 4: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

General features of Siesta

Born-Oppenheimer approximation. Structure relaxation (CG) and

molecular dynamics (MD)

Density functional theory (DFT). LDA, GGA, VdW functionals

Pseudopotentials. Norm-conserving

Linear combination of atomic orbitals (LCAO). Numerical atomic

orbitals. Order N (sparse matrices)

Numerical evaluation of the matrix elements (Smn, Hmn)Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 5: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

To run Siesta you need:

1. Access to the executable file

Compile Siesta with your favourite compiler

Watch out for BLAS and LAPACK libraries

Serial versus parallel compilation

2. An input file, called whatever.fdf

Written in Flexible Data Format (A. García and J. M. Soler)

Contains: Physical data of the system

Variables to control the approximations

3. A pseudopotential file for all different elements in the input file

Unformatted binary (.vps)

Formatted ASCII (.psf) (more portable and easy to read)

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 6: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Features of the Flexible Data Format language. FDF-I

Data can be given in any order

Data can be omitted in favour of default values

Syntax: ‘data label’ followed by its value

Character string: SystemLabel h2o

Integer: NumberOfAtoms 3

Real: PAO.SplitNorm 0.15

Logical: SpinPolarized .false.

Physical magnitudes: LatticeConstant 5.43 Ang

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 7: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Features of the Flexible Data Format language. FDF-II

Labels are case insensitive and characters -_. are ignored

LatticeConstant is equivalent to lattice_constant

Logical values: T, .true., true, yes

F, .false., false, no

Character strings, not in apostrophes

Complex data structures: blocks

%block label

%endblock label

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Text following # is a comment

Page 8: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Features of the Flexible Data Format language. FDF-III

Physical magnitudes: real number followed by its units

Many physical units are recognized for each magnitude

Length: m, cm, nm, Ang, bohr

Energy: eV, Rydberg

Automatic conversion to the ones internally required.

Allows to ‘include’ other FDF files or redirect the search to another file

block PAO.Basis < BaTiO3basis.fdf

AtomicCoordinatesAndAtomicSpecies < Interface.coor

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 9: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Clasification of the basic input variables

1. General system descriptors

2. Structural and geometrical variables

3. Basis set generation

4. Solution method

5. Method to solve the Hamiltonian

6. Control of the self-consistent cycle

7. Structural relaxation or molecular dynamics

8. Analysis of the results

9. Parallelization

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 10: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

General system descriptors

SystemName: descriptive name of the system

SystemName Si bulk, diamond structure

If properly updated, this variable might contain very useful

information to know what has been run

SystemLabel: nickname of the system to name output files

SystemLabel Si

(After a succesful run, you should have files like

Si.DM : Density matrix

Si.XV: Final positions and velocities

Si.bands: Electronic band structure

Si.DOS: Total density of states

...and many more, depending on your requests)

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 11: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Structural and geometrical variables:

number of atoms and species in the simulation box

NumberOfAtoms: number of atoms in the simulation box

NumberOfAtoms 2

NumberOfSpecies: number of different atomic species

NumberOfSpecies 1

ChemicalSpeciesLabel: spcecify the different chemical species

%block ChemicalSpeciesLabel

1 14 Si

%endblock ChemicalSpeciesLabel

From 1 to NumberOfSpecies

Atomic number of a given species

plus a label to identify

All these variables are MANDATORY

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 12: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Structural and geometrical variables:

lattice constant and lattice vectors

LatticeConstant: real length to define the scale of the lattice vectors

LatticeConstant 5.43 Ang

Coordinates. Followed by the species index

%block AtomicCoordinatesAndAtomicSpecies

0.000 0.000 0.000 1 Si 1

0.000 0.000 1.280 1 Si 2

%endblock AtomicCoordinatesAndAtomicSpecies

LatticeVectors (also LatticeParameters): read as a matrix, 1 Vect. → 1 line

(units of LatticeConstant)

%block LatticeVectors

0.000 0.500 0.500

0.500 0.000 0.500

0.500 0.500 0.000

%endblock LatticeVectors

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 13: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Basis set definition

Full definition of the basis

%block PAO.Basis

C 2

n=2 0 2

7.0 0.0

n=2 1 2

7.0 0.0

%endblock PAO.Basis

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Straightforward definition of the basis

%block PAO.BasisSizes

C SZ

%endblock PAO.BasisSizes

Number of shells

Principal quantum number (n),

angular quantum number (l)

and number of z

Page 14: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Real-space and k-grids

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Real-space mesh

MeshCutoff 150 Ry

k-grid (Monkhorst-Pack)

%block kgrid_Monkhorst_Pack

1 0 0 0.0

0 1 0 0.0

0 0 90 0.0

%endblock kgrid_Monkhorst_Pack

k-grid (energy cut-off)

kgrid_cutoff 20 Ang

)()(d * rrrS

nmnmmn

)(ˆ)(dˆ * rHrrHH

nmnmmn

Page 15: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Exchange and correlation functional

DFT

XC.Functional LDA GGA

XC.authors PW92CA

PZPBE

SpinPolarized

RPBErevPBE WCPBEsol BLYP

LDA Local Density Approximation

GGA Generalized Gradient

Approximation

CA Ceperley-Alder

PZ Perdew-Zunger

PW92 Perdew-Wang-92

PBE Perdew-Burke-Ernzerhof

WC Wu-Cohen

BLYP Becke-Lee-Yang-ParrVíctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 16: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

The density matrix, a basic ingredient in Siesta

Expansion of the eigenvectors in a basis of localized atomic orbitals

m

mm )()( rcr nn

The electron density is given by

n

nn frrn2

)()(

fn is the occupation of state n

Inserting the expansion into the definition of the density

mn

nmmn )()()( * rrrn

The density matrix is then defined as follows:

n

nnn fcc nmmn * Controls the SCF convergence

Used to restart calculations

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Secular equation:

0)( n

mmnmn nn cSEH

Page 17: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

The Kohn-Sham equations must be solved self-consistently

The potential (input) depends on the density (output)

)( ),( rnrn

],[)()()( xcHartreeexteff

nnVrVrVrV

)()()(2

1eff

2 rrrV nnn

n

nn frrn2

)()(

Self-consistent?

Calculate electron density

Solve the KS equation

Calculate the effective potential

Initial guess

Output quantities

Energy, forces,

stresses…

Yes

No

inout

max mnmnmn

DM.ToleranceVíctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 18: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Control of the convergence

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Maximum number of iterations

MaxSCFIterations 1000

Pulay mixing

DM.NumberPulay 5

DM.MixingWeight 0.1

N

i

iNn

i

n

1

)(

outout nnn

in

1

out

1

in )1(

N

i

iNn

i

n

1

)(

inin

Tolerance

DM.Tolerance 1.d-4

Page 19: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Relaxation of the coordinates

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Type of run (CG, MD)

MD.TypeOfRun cg

Number of steps, maximum displacement and force tolerance

MD.NumCGsteps 1000

MD.MaxCGDispl 0.2 Bohr

MD.MaxForceTol 0.05 eV/Ang

Variable cell

MD.VariableCell T

MD.PreconditionVariableCell 5.0 Ang

MD.MaxStressTol 1.0 GPa

Page 20: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Saving and reading information: restarting files

Some information is stored by Siesta to restart simulations from:

FDF tag to reuse Name of the file

Density matrix DM.UseSaveDM SystemLabel.DM

Atomic positions and Vel. MD.UseSaveXV SystemLabel.XV

Conjugate gradient history MD.UseSaveCG SystemLabel.CG

Localized W. Funct. (Order-N) ON.UseSaveLWF SystemLabel.LWF

Logical variables

Very useful to save a lot of time

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 21: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Saving and reading information: information needed as

Input for various post-processing programs

For example, to visualize:

Logical variables

FDF tag to reuse Name of the file

Total charge density SaveRho SystemLabel.RHO

Deformation charge density SaveDeltaRho SystemLabel.DRHO

Electrostatic potential SaveElectrostaticP… SystemLabel.VH

Total potential SaveTotalPotential SystemLabel.VT

Local density of states LocalDensityOfStates SystemLabel.LDOS

Charge density contours WriteDenchar SystemLabel.DIM

Atomic coordinates WriteCoorXmol SystemLabel.xyz

Animation of MD WriteDXMol SystemLabel.ANI

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 22: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

How to run the serial version of Siesta

To run the serial version:

[path]siesta < myinput > myoutput

To run the job in the background add &

[path]siesta < myinput > myoutput &

To see the output while it runs

[path]siesta < myinput |tee myouput

To see the information dumped in the output file during the run:

tail -f myoutput

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 23: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: the header

Information about:

- The version of Siesta

- The compiler

- Compilation flags

- Mode (serial or parallel)

- Date and time when the run starts

Useful to reproduce the

results of a simulation

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 24: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: dumping the input file

Exact copy of the input fileUseful to reproduce the

results of a simulation

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 25: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: processing the input

The input file is digested

Siesta prints out the value

of some variables (some

of them might take the

default value)

A complete list of the

parameters used,

including default values,

can be found in the file

fdf.log

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 26: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: coordinates, cell and k-samling

Coordinates, cell

vectors and k cutoff

and mesh

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 27: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: first molecular dynamic (MD) or conjugate gradient

(CG) step

Real space mesh

and energies

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 28: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: forces and stress tensor

WriteForces (logical): write the forces to the output file at the end of

every MD or relaxation step

The forces of the last step can be found in the file SystemLabel.FA

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 29: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: decomposition of the energy

Different types of energy

that have been calculated

(ionic, neutral atom,

kinetic, XC, free energy,

etc)

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 30: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Output: timer. How many times (and how much time) the

code has gone through the most important subroutines

Useful to optimize the

performance of the code

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 31: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Pseudopotential generation

The pseudopotential is generated with the atom program

Edit the makefile and include the Fortran compiler after the FC

variable. The compiler flags can also be defined after FLAGS

The generation of the pseudopotential and other data and plotting

files is done with the scripts ae.sh (all electrons), pg.sh

(pseudopotential) and pt.sh tests

The scripts need to know where the atm program and other scritps

are located. The simplest way of doing this is writing the its

location after the DEFAULT_DIR and default variable. For instance:

DEFAULT_DIR=../../../Pseudo.3.3/atom/Tutorial/Utils (*)

default="../../Pseudo.3.3/atom/atm”

An additional “../” is needed here because the script searches

these scripts from the generated directory

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 32: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

All-electron calculation

ae.sh generates the all-electron eigenvalues, wave functions, total

energy and charge densities

Input file (for instance Si): Si.ae.inp

Generation: ae.sh Si.ae.inp

Produces the directory Si.ae with all information

ae Si ground state all-electron

Si ca

0.0

3 2

3 0 2.00 0.00

3 1 2.00 0.00

Core shells

Valence shells

Plotting: gnuplot -persist “.gnuplot or .gps file”

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 33: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Pseudopotential calculation

pg.sh generates the eigenvalues, wave functions, total energy and

charge densities

Input file (for instance Si): Si.inp

Generation: pg.sh Si.inp

Produces the directory Si with all information and Si.vps (binary)

and Si.psf files

pg Silicon

tm2 3.0 # PS flavor, logder R

n=Si c=car # Symbol, XC flavor,{ |r|s}

0.0 0.0 0.0 0.0 0.0 0.0

3 4 # norbs_core, norbs_valence

3 0 2.00 0.00 # 3s2

3 1 2.00 0.00 # 3p2

3 2 0.00 0.00 # 3d0

4 3 0.00 0.00 # 4f0

1.90 1.90 1.90 1.90 0.00 0.00

# Last line (above):

# rc(s) rc(p) rc(d) rc(f) rcore_flag rcore

Core corrections?

Core radius. If

negative or 0, the

5th number gives

the charge density

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 34: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Pseudopotential test

pt.sh performs a transferability test by comparing the all-electron

calculation to the generated pseuopotential with various charges in

the valence shells (different environments)

Input file (for instance Si): Si.test.inp

Generation: pt.sh Si.test.inp Si.vps

Produces the directory Si.test with all information. Compares the

all-electron excitation energies (different configurations) and

eigenvalues

# A-E calculations

ae Si Test -- GS 3s2 3p2

Si ca

0.0

3 2

3 0 2.00

3 1 2.00

# Pseudopotential test calculations

pt Si Test -- GS 3s2 3p2

Si ca

0.0

3 2

3 0 2.00

3 1 2.00

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 35: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Generated data

A lot of data is available in the generated directory

Charge densities r(r) Log. Der.

Pseudopot. Fourier Trans.

From these graphs it is possible to see for instance if the core and

valence overlap, how the wave functions match if they are broad

enough and how smooth the pseudopotential is

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 36: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

How are the radii chosen?

The radii of each channel (s, p, d, etc) have to be chosen in such a

way that the wave function and the pseudopotential are smooth

and broad inside the radii

If the radii increases the wave function becomes broader but the

transferability decreases

A good choice would start around radii closer to the maximum of

r(r). Longer radii go into the region where wave function overlaps

with the WF of other atoms

The radius of the core

corrections has to be

chosen so that the pseudo-core

charge density reproduces the

core charge density in the region

where the core and the valence

overlap

Fe

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 37: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Summary of different tools for post-processing and

visualizationDenchar Plrho

DOS and PDOStotal

Fe, d

DOS, PDOS

Macrowave XCrySDen

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 38: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Fin

Page 39: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Siesta2Gollum interface

Víctor M. García SuárezGollum School. MOLESCO network

20-May-2015

Page 40: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Outline

- What is needed from Siesta

- How to obtain the Siesta information

- Program files and structure

- How to compile the code

- How to run the code

- Generated files

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 41: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- What is needed from a Siesta calculation

Number of spin components

Fermi energy

Information on the atomic orbitals

Transversal k-points

Hamiltonian and overlap matrices

Data

XX.Out Orbitals and geneneral system

information

SystemLabel.HSX Number of spin components, orbitals,

Hamiltonian and overlap matrices

SystemLabel.KP k-points

SystemLabel.EIG Fermi energy and eigenvalues

Siesta files

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 42: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- How that information can be obtained from Siesta

SaveHS .true. Generates the SystemLabel.HSX file

WriteEigenvalues .true. Generates the SystemLabel.EIG file

FDF flags to include in XX.fdf

Default files

Siesta hould also generate by default the SystemLabel.KP file

Outuput file

The Siesta ouput, which has a lot of information, has to be redirected to a

XX.out file

$ siesta < SystemLabel.fdf |tee XX.out

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 43: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- Siesta2Gollum program files and structure

tools/interface-to-siesta

Directory

Files

Hsx_m.f90 Module that reads and processes the

Hamiltonian and overlap from the .HSX file

siesta2gollum.f90 Main program, which reads the rest of the

information and generates the

Extended_Molecule and Lead_i files

Makefile Makes the siesta2gollum executable

(Linux and Mac)

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 44: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- How to compile the code

Edit the Makefile to specify the Fortran compiler after the FC (Fortran

compiler) variable

You can also specify the compiler flags after the FLAGS variable

Fortran compiler

Compilation in Linux or Mac

Type make. The code should compile and generate the siesta2gollum file

Compilation in Windows

Execute the following (with for instance the g95 compiler):

$ g95 siesta2gollum -o hsx_m.f90 siesta2gollum.f90

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 45: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- How to run the code. Generation of the Gollum files

The siesta2gollum executable should be in the same directory where the

Siesta calculation has been run or linked to it

It can also be in a directory with just the .out, .HSX, .KP and .EIG files

Location

Generation of the Extended_Molecule file

Siesta2gollum “XX.out file” “0”

For example, in a simulation of a BDT molecule between gold electrodes

where the Siesta output has been redirected to the BDT-Au.out file, type

the following:

$ siesta2gollum BDT-Au.out 0

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 46: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Generation of the Lead_i files

Siesta2gollum “XX.out file” “number between 1 and 123456789”

This tells siest2gollum to generate a number of Lead_i files, where “i”

runs to the numbers specified in the command line

For example, in a simulation of a gold lead which is going to be used in

electodes 1, 2 and 5 of a multiterminal simulation and which has been

redirected to the Au.out file, type the following:

$ siesta2gollum Au.out 125

This generates the following files:

Lead_1, Lead_2 and Lead_5

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 47: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

- Generated files

It should contain the following data from the DFT calculation of the extended

molecule:

• nspin. Defines wether the calculation is spin-unpolarized (1) or

polarized (2)

• FermiE. Value of the Fermi energy at the extended molecule in eV.

There should be only one file in the simulation. Contains information

about the orbitals, spin, k-points, overlap and Hamiltonian of the

extended molecule.

File Extended_Molecule

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 48: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

• iorb. Contains information about the orbitals used in the simulation. It

has as many rows as orbitals in the EM region.

- iorb(1): Atom to which orbital belongs.

- iorb(2): Principal quantum number n.

- iorb(3): Quantum number lz using real spherical harmonics.

- iorb(4): z-number (basis set with multiple zetas)

At the moment Gollum only uses iorb(1).

• kpoints_EM. Transverse k-poins used in the DFT simulation of the EM.

- kpoints(1): Value of kx.

- kpoints(2): Value of ky.

- kpoints(3): Weight in the k summation.

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 49: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

• HSM. Contains the overlap S(k,i,j) and Hamiltonian H(k,i,j,s) for a given

transverse k-point, given orbital pairs (i,j) and spin s.

The number of columns is 7 if nspin = 1 or 9 if nspin = 2.

There are as many rows as non-zero overlap or Hamiltonian elements. If

for a given (k,i,j,s) all elements are zero, then this row is skipped.

- HSM(1): Defines the k-point number as defined in kpoints.

- HSM(2): Defines the orbital number i as defined in iorb.

- HSM(3): Defines the orbital number j as defined in iorb.

- HSM(4): Real part of S(k,i,j).

- HSM(5): Imaginary part of S(k,i,j).

- HSM(6): Real part of H(k,i,j) (nspin = 1) or H(k,i,j,1) (nspin = 2).

- HSM(7): Imaginary part of H(k,i,j) (nspin = 1) or H(k,i,j,1) (nspin = 2).

- HSM(8): Exists only if nspin = 2. Real part of H(k,i,j,2).

- HSM(9): Exists only if nspin = 2. Imaginary part of H(k,i,j,2).

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 50: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Files Lead_i

It should contain the following data from the DFT calculation of the

leads:

There should be one of these files for each lead. The file will be read and

used if the corresponding variable leadp(3) is set to ±1.

• kpoints_Lead. Transverse k-poins used in the DFT simulation of the lead.

It must be given because the ordering of the k-points in the DFT

simulation of the Leads and the EM need not to coincide.

- kpoints(1): Value of kx.

- kpoints(2): Value of ky.

- kpoints(3): Weight in the k summation.

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 51: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

• HSL. Contains the intra- and inter-PL overlap S0,1(k,i,j) and Hamiltonian

H0,1 (k,i,j,s) for a given transverse k-point, given orbital pairs (i,j) and spin s.

The number of columns is 11 if nspin = 1 or 15 if nspin = 2.

There are as many rows as non-zero overlap or Hamiltonian elements. If

for a given (k,i,j,s) all elements are zero, then this row is skipped.

- Ordering of the variable.

For nspin = 1: k i j Real[S0] Imag[S0] Real[H0] Imag[H0] Real[S1] Imag[S1]

Real[H1] Imag[H1]

For nspin = 2: k i j Real[S0] Imag[S0] Real[H0,1] Imag[H0,1] Real[H0,2] Imag[H0,2]

Real[S1] Imag[S1] Real[H1,1] Imag[H1,1] Real[H1,2] Imag[H1,2]

Víctor M. García Suárez. Oviedo. 20-May-2015

Gollum School. MOLESCO network

Page 52: How to run SIESTA - Physics to run SIESTA Víctor M. García Suárez Gollum School. MOLESCO network 20-May-2015 Partially based on a talk by Javier Junquera

Fin