User Guide
User Manual:
Open the PDF directly: View PDF
.
Page Count: 14
- Installation
- Inputs and outputs
- config.in
- integer :: ed_solver
- integer :: num_val_orbs
- integer :: num_core_orbs
- integer :: neval
- integer :: nvector
- integer :: ncv
- integer :: num_gs
- integer :: maxiter
- integer :: min_ndim
- integer :: nkryl
- integer :: linsys_max
- logical :: idump
- real(kind=8) :: linsys_tol
- real(kind=8) :: eigval_tol
- real(kind=8) :: omega_in
- real(kind=8) :: gamma_in
- fock_x.in (x=i,n,f)
- hopping_x.in (x=i,n)
- coulomb_x.in (x=i,n)
- transop_xas.in & transop_rixs_x.in (x=i,f)
- eigvals.dat
- denmat.dat
- eigvec.i
- xas_poles.i & rixs_poles.i
- config.in
- Conventions used in the code
User’s guide of EDRIXS code
Yilin Wang
December 13, 2018
Contents
1 Installation 3
1.1 GetEDRIXS ........................... 3
1.2 Requirement of tools and libraries . . . . . . . . . . . . . . . . 3
1.3 Tips for compiling Arpack library . . . . . . . . . . . . . . . . 3
1.4 Compile the fortran source code . . . . . . . . . . . . . . . . . 4
1.5 Compile the documentation of Python API . . . . . . . . . . 4
2 Inputs and outputs 5
2.1 config.in.............................. 5
2.1.1 integer :: ed_solver . . . . . . . . . . . . . . . . . . . . 5
2.1.2 integer :: num_val_orbs . . . . . . . . . . . . . . . . . 5
2.1.3 integer :: num_core_orbs . . . . . . . . . . . . . . . . 6
2.1.4 integer :: neval . . . . . . . . . . . . . . . . . . . . . . 6
2.1.5 integer :: nvector . . . . . . . . . . . . . . . . . . . . . 6
2.1.6 integer::ncv ....................... 6
2.1.7 integer :: num_gs . . . . . . . . . . . . . . . . . . . . 6
2.1.8 integer :: maxiter . . . . . . . . . . . . . . . . . . . . . 6
2.1.9 integer :: min_ndim . . . . . . . . . . . . . . . . . . . 7
2.1.10 integer :: nkryl . . . . . . . . . . . . . . . . . . . . . . 7
2.1.11 integer :: linsys_max . . . . . . . . . . . . . . . . . . . 7
2.1.12 logical :: idump . . . . . . . . . . . . . . . . . . . . . . 7
2.1.13 real(kind=8) :: linsys_tol . . . . . . . . . . . . . . . . 7
2.1.14 real(kind=8) :: eigval_tol . . . . . . . . . . . . . . . . 7
2.1.15 real(kind=8) :: omega_in . . . . . . . . . . . . . . . . 8
2.1.16 real(kind=8) :: gamma_in . . . . . . . . . . . . . . . . 8
2.2 fock_x.in (x=i,n,f) . . . . . . . . . . . . . . . . . . . . . . . . 8
2.3 hopping_x.in (x=i,n) . . . . . . . . . . . . . . . . . . . . . . . 8
2.4 coulomb_x.in (x=i,n) . . . . . . . . . . . . . . . . . . . . . . 9
2.5 transop_xas.in & transop_rixs_x.in (x=i,f) . . . . . . . . . . 9
2.6 eigvals.dat............................. 10
2.7 denmat.dat ............................ 10
2.8 eigvec.i.............................. 11
2.9 xas_poles.i& rixs_poles.i.................... 11
1
Chapter 1
Installation
1.1 Get EDRIXS
Type the following command in a terminal to get the latest version of
EDRIXS code,
$ cd ${EDRIXS_DIR}
$ git clone https://github.com/shenmidelin/edrixs.git
1.2 Requirement of tools and libraries
We only test the code using Intel’s fortran compiler (ifort), so we strongly rec-
ommend it. A MPI library such as OpenMPI or MPICH3 is needed. For la-
pack library, we recommend Intel’s MKL. For Arpack library, we recommend
arpack-ng (https://github.com/opencollab/arpack-ng). Python3, Numpy,
Scipy, Sympy, Matplotlib, Sphinx and Numpydoc are required. We recom-
mend to install the latest Anacona package (https://www.anaconda.com/)
for the Python3 enviroment and the libraries.
1.3 Tips for compiling Arpack library
Get the latest version of arpack-ng by typing,
$ git clone https://github.com/opencollab/arpack-ng.git
Compile it by typing,
$ sh bootstrap
$ ./configure --prefix=${ARPACK_DIR} --enable-mpi \
> --with-blas="-L${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_rt" \
3
CHAPTER 1. INSTALLATION 4
> --with-lapack="-L${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_rt" \
> FC=ifort F77=ifort MPIFC=mpif90 MPIF77=mpif90
$ make
$ make install
You may need to install autotools: autoconf, automake, libtool.
1.4 Compile the fortran source code
Go to the fortran source directory and edit the make.sys file to set the Fotran
compiler and Lapack and Arpack libraries.
$ cd edrixs/src/fortran
$ vim make.sys
F90 = mpif90 or F90 = mpiifort
LIBS = -L${MKLROOT}/lib/intel64 -lmkl_core -lmkl_sequential -lmkl_rt \\
${ARPACK_DIR}/lib/libparapck.a ${ARPACK_DIR}/lib/libarpack.a
where, MKLROOT is the root directory of MKL library and
ARPACK_DIR is the root directory of the Arpack libraries. Then, type
$ make
$ make install
to compile and install the executable files (.x) to edrixs/bin directory.
After that, please add the following two lines in .bashrc or .bash_profile,
export PATH=${EDRIXS_DIR}/edrixs/bin:$PATH
export PYTHONPATH=${EDRIXS_DIR}/edrixs/src/python:$PYTHONPATH
1.5 Compile the documentation of Python API
$ cd edrixs/docs
$ mkdir build
$ sphinx-build -b html source build
$ make html
Open the file
${EDRIXS_DIR}/edrixs/docs/build/index.html
in a browser to read the Python API documentation.
Chapter 2
Inputs and outputs
2.1 config.in
2.1.1 integer :: ed_solver
For ed.x
Default: 1
The type of ED solver:
ed_solver = 0, full diagonalization, all the eigenvalues can be obtained, for
small size problem n < 1000.
ed_solver = 1, standard Lanczos algorithm without re-orthogonalization,
for roughly finding one ground state.
ed_solver = 2, use parallel Arpack library, for finding a few lowest excited
states.
2.1.2 integer :: num_val_orbs
For ed.x, xas.x and rixs.x
Default : 2
Number of valence orbitals (including spin).
5
CHAPTER 2. INPUTS AND OUTPUTS 6
2.1.3 integer :: num_core_orbs
For xas.x and rixs.x
Default : 2
Number of deep core orbitals (including spin).
2.1.4 integer :: neval
For ed.x
Default : 1
Number of eigenvalues are obtained.
2.1.5 integer :: nvector
For ed.x
Default : 1
Number of eigenvectors are obtained.
2.1.6 integer :: ncv
For ed.x
Default : neval + 2
Used by ed_solver = 2, control the converged speed, ncv≥neval +2.
2.1.7 integer :: num_gs
For xas.x and rixs.x
Default : 1
Number of ground states are used in XAS or RIXS calculations.
2.1.8 integer :: maxiter
For ed.x
Default : 500
Maximum Lanczos iterations.
CHAPTER 2. INPUTS AND OUTPUTS 7
2.1.9 integer :: min_ndim
For ed.x
Default : 1000
If the dimension of the Hamitlonian is smaller than min_ndim, ed_solver
will be automatically set to be 0, Lapack will be used.
2.1.10 integer :: nkryl
For xas.x and rixs.x
Default : 500
Maximum iterations of building Krylov subspace.
2.1.11 integer :: linsys_max
For rixs.x
Default : 500
Maximum iterations for solving the linear equations by using MINRES.
2.1.12 logical :: idump
For ed.x
Default : .false.
Whether to write out the eigenvectors to file eigvec.xxx.
2.1.13 real(kind=8) :: linsys_tol
For rixs.x
Default : 1E-8
Tolerance for solving the linear equations.
2.1.14 real(kind=8) :: eigval_tol
For ed.x
Default : 1E-8
Tolerance for finding eigenvalues.

CHAPTER 2. INPUTS AND OUTPUTS 8
2.1.15 real(kind=8) :: omega_in
For rixs.x
Default : 0.0
The energy of incident x-ray at which the RIXS spectrum is measured.
2.1.16 real(kind=8) :: gamma_in
For rixs.x
Default : 0.1
The broadening factor of the core-hole life-time (eV).
2.2 fock_x.in (x=i,n,f)
Input for ed.x, xas.x and rixs.x
Use decimal numbers to represent the Fock basis. The following is an
example,
220
511
767
895
959
991
. . .
The number “220” in the first line is the total number of Fock basis, and
the decimal numbers in the following lines are the Fock basis. Please note
that these numbers should be in an ascending order.
2.3 hopping_x.in (x=i,n)
Input for ed.x, xas.x and rixs.x
The nonzeros elments of the two-fermion terms tα,β in Hamiltonians ˆ
Hi
and ˆ
Hnor any other operators ˆ
O. The following is an example,

CHAPTER 2. INPUTS AND OUTPUTS 9
112
1 1 0.175000000000 0.000000000000
1 3 −0.021213203436 −0.021213203436
1 4 −0 .2 47 48 73 73 41 5 0 . 0 0 0 0 0 0 0 0 0 0 0 0
1 5 −0 .0 00 00 00 00 00 0 0 . 0 3 0 0 0 0 0 0 0 0 0 0
1 7 −0 .0 00 00 00 00 00 0 0 . 1 4 6 9 6 9 3 8 4 4 6 4
1 8 −0.073484692232 −0.073484692541
1 9 −0 .1 03 92 30 48 38 1 0 . 1 0 3 9 2 3 0 4 8 3 8 1
1 10 0.000000000219 −0.103923048600
1 11 −0.029393876893 −0.000000000000
1 12 0.014696938508 −0.014696938446
. . .
The number in the first line is the number of the nonzeros of tα,β , the
following lines are the nonzero elements. The first column is the first index
αand the second column is the second index β. The third and fourth
columns are the real and imaginary parts of the element tα,β .
2.4 coulomb_x.in (x=i,n)
Input for ed.x, xas.x and rixs.x
The nonzeros elments of the four-fermion terms Uα,β,γ,δ in Hamiltonians ˆ
Hi
and ˆ
Hnor any other operators ˆ
O. The following is an example,
152
1 1 1 1 0.850000000000 0.000000000000
1 2 2 1 0.850000000000 0.000000000000
1 3 1 3 0.150000000000 0.000000000000
1 3 3 1 0.700000000000 0.000000000000
1 4 2 3 0.150000000000 0.000000000000
1 4 4 1 0.700000000000 0.000000000000
1 5 1 5 0.300000000000 0.000000000000
1 5 3 3 −0 .1 50 00 00 00 00 0 0 . 0 0 0 0 0 0 0 0 0 0 0 0
1 5 5 1 0.850000000000 0.000000000000
1 6 2 5 0.300000000000 0.000000000000
. . .
The number in the first line is the number of the nonzeros of Uα,β,γ,δ , the
following lines are the nonzero elements. The first to the fourth columns
are the indices α, β, γ, δ, respectively. The last two columns are the real
and imaginary parts of the element Uα,β,γ,δ.
2.5 transop_xas.in & transop_rixs_x.in (x=i,f)
Input for xas.x and rixs.x

CHAPTER 2. INPUTS AND OUTPUTS 10
The nonzeros elments of the transition operators Dα,β in XAS and RIXS
calculations. The following is an example,
24
1 15 0.080393652075 0.488641941854
1 17 0.000000000000 0.097631072228
2 16 0.080393652075 0.488641941854
2 18 0.000000000000 0.097631072228
3 13 0.080393652075 −0.488641941854
3 17 −0.080393652075 −0.488641941854
4 14 0.080393652075 −0.488641941854
4 18 −0.080393652075 −0.488641941854
. . .
The number in the first line is the number of the nonzeros Dα,β . The
following lines are the nonzero elements. The first column is the first index
αand the second column is the second index β. The third and fourth
columns are the real and imaginary parts of the element Dα,β .
2.6 eigvals.dat
Output from ed.x
The eigenvalues obtained from ED solver. The following is an example,
1−64.3102435734
2−64.3102435734
3−64.3102435734
4−64.3102435734
5−63.5680930356
6−63.5680930355
7−63.5680930355
8−63.3445562508
9−63.3445562508
10 −63.3445562508
. . .
The first column is the index, and the second column is the eigenvalues
(eV).
2.7 denmat.dat
Output from ed.x
The density matrix DΓi
ˆ
f†
αˆ
fβ
ΓiEobtained from ED solver. The following
is an example,

CHAPTER 2. INPUTS AND OUTPUTS 11
1 1 1 0 . 3 9 7 0 5 1 4 6 9 0 −0.0000000000
1 1 2 0 . 0 4 9 2 6 5 0 4 9 2 −0.0110465040
1 1 3 0.1641162863 0.0280312207
1 1 4 −0. 04 28 64 87 54 0 . 0 0 0 0 0 0 0 0 0 0
1 1 5 −0. 10 46 73 39 22 0 . 0 0 8 2 8 4 0 2 0 4
1 1 6 −0.0047905834 −0.0076967959
1 1 7 −0. 22 27 17 01 68 0 . 0 0 0 0 0 0 0 0 0 0
1 1 8 0 . 0 1 6 3 0 5 2 3 6 0 −0.0036560575
1 1 9 0.0615741278 0.0100115957
1 1 10 −0. 01 36 55 14 80 0 . 0 0 0 0 0 0 0 0 0 0
. . .
The first column are the indices of the eigenstates |Γii. The second and
third column are the orbital indices α, β, respectively. The last two column
are the real and imaginary parts of the elments of the densiy matrix.
2.8 eigvec.i
Output from ed.x, binary file
The wavefunction of each eigenvector obtatined from ED solver, used later
by xas.x and rixs.x.
2.9 xas_poles.i& rixs_poles.i
Output from xas.x and rixs.x
Parameters α, β of the tridiagonal matrix generated by Lanczos process,
α1β2
β2α2β3
β3α3
...
......βn
βnαn
The following is an example,
# number_of_pole s : 500
#enegry: -64.3102435734
#normalization: 0.6460959156
1−6 9. 65 22 94 97 84 2 . 3 2 2 2 8 4 7 5 8 8
2−6 3. 87 52 91 81 65 2 . 9 6 7 6 8 2 3 6 0 7
3−5 8. 11 38 92 67 13 5 . 9 8 8 2 3 1 1 0 2 4
4−5 4. 75 29 81 07 16 8 . 2 6 6 1 2 6 9 8 7 6
5−5 8. 07 94 04 13 99 1 0 . 2 5 1 1 8 7 1 1 3 3

CHAPTER 2. INPUTS AND OUTPUTS 12
6−5 0. 55 89 16 17 15 1 0 . 0 2 0 7 0 7 0 3 8 2
7−4 8. 84 12 48 21 41 1 0 . 8 0 5 8 1 2 3 4 4 5
8−4 5. 67 61 68 28 31 1 2 . 7 8 8 2 3 6 9 9 4 8
9−3 7. 40 86 27 47 42 1 5 . 3 8 6 4 5 4 6 1 1 7
. . .
The first line is the total number of α, β. The second line is the energy of
the ground state. The third line is a normalization factor. The following
lines are α, β, where, the first column are incides, the second and third
column are α, β, respectively.

Chapter 3
Conventions used in the code
3.1 orbital orders
All the valence orbitals should be put in front of all the core orbitals. For
example, for single atom 2p→5dtransition,
1−10
z }| {
1101001100
11−16
z }| {
111011 (3.1.1)
where, 1-10 are 5dvalence orbitals and 11-16 are 2pcore orbitals; for
two-site 2p→5dtransition, 1-20 are 5dvalence orbitals and 21-32 are 2p
core orbitals.
When building Fock basis, only valence orbitals are considered. xas.x
and rixs.x will take care of the core orbitals internally.
13