Rok Zitko's home page
"NRG Ljubljana" is a general-purpose flexible framework for performing large scale numerical renormalization group (NRG) calculations for
quantum impurity problems. It is highly extensible
without sacrificing numerical efficiency. The package is freely
available under the General Public licence (GPL).
Framework "NRG Ljubljana" is a set of interrelated computer
codes for performing numerical renormalization group
(NRG) calculations for quantum impurity
problems, described by models such as the Kondo exchange
model or the Anderson single impurity model, and their
multi-impurity and multi-channel generalizations. It
also contains a number of tools for analyzing results (thermodynamic
properties, such as magnetic and charge susceptibility, entropy and
heat capacity; expectation values of arbitrary operators; spectral
functions). It is user friendly, in the sense that it is easy to set
up new types of problems (Hamiltonians, perturbation terms, etc.) and
the output is formatted and annotated for easy interpretation, parsing
To achieve a high degree of flexibility without sacrificing numerical
efficiency, "NRG Ljubljana" is composed of a hierarchy of modules:
high level modules are written in a mixture of functional and
procedural Mathematica code,
while the low level numerically intensive parts are programmed in the
object oriented approach in the C++ language. The foundation of the
framework is a Mathematica package for performing calculations with
non-commutative second quantization operators, SNEG. Next layer is a Mathematica program which
defines the Hamiltonian, the basis of states, and the physical
operators of interest: with the help of SNEG,
Hamiltonian and operators can be defined using the familiar
second-quantization expressions. This program performs the
diagonalization of the initial Hamiltonian and prepares the input for
the NRG iteration proper.
"NRG Ljubljana" - open source numerical renormalization group code
For efficiency, NRG iteration is performed by a separate C++
program: for a typical problem, most of the time (90%) is spent in the
LAPACK dsyev and dsyevr routines which solve eigenvalue problems. There is
very little housekeeping overhead due to the tasks required by the NRG
iteration; "NRG Ljubljana" is thus suitable for performing large
scale NRG calculations on computer
I advocate open access to knowledge in science.
The "Ljubljana NRG" framework is thus licenced under the General public licence (GPL).
You are entitled to run the program, for any desired purpose, study
how the program works and modify it, redistribute copies and improve
You are encouraged (but not required) to advertise "NRG Ljubljana". If the
framework is used in producing published scientific results, you might,
acknowledge its use in the ensuing paper/poster/presentation.
- 19.6.2013: Slides and examples from tutorials in SISSA
- 13.6.2013: Binary distributions are now available for
- 5.6.2013: Bug-fix release (version 2.3.20).
- 17.1.2013: Bug-fix release (version 2.3.19).
- 5.11.2012: Updated version 2.3.16.
- 12.9.2011: Examples and tutorials page (see below).
- 4.8.2011: Bug-fix release (version 2.2.3).
- 25.3.2011: Public release
of the code (version 2.2.0) adding MPI parallelization, portability
improvements, calculation of temperature-dependent conductance,
code optimizations, some new tools (adaptable broadening, thermodynamic
and spectral data merging/smoothing), some bug fixes and many
- 4.11.2009: Public release of the code
(version 2.0.6) adding a number of major new features.
- 20.3.2009: Discretization equation solver 'adapt' and tridiagonalisation
code 'nrgchain' for calculating the coefficients for optimized Wilson chains
are now available.
Download the current
version (2.3.20) of "NRG Ljubljana"
The package should work unmodified on any modern Linux distribution and,
with some tweaking, on any Unix or Unix-like operating system with a good
standards-compliant C++ compiler. (Mac OS X is fine.)
The following libraries are required to compile the C++ part of
the NRG code:
In addition, Wolfram Research Mathematica must be installed
for running the Mathematica part of the NRG code. Mathematica is only
required for the initialization of the problem (basis construction,
diagonalisation of the initial Hamiltonian, transformations of the operator
matrices, etc.) which is relatively fast. When "NRG Ljubljana" is used on a
cluster, it is therefore sufficient to have Mathematica
installed on a single computer (for example on the cluster host
computer), while the numerically demanding (C++) part of the program
can be ran on the cluster nodes.
There is now an experimental precompiled binary distribution of NRG
version (tested to work on RHEL 6.3 and derivatives)
version (tested to work on RHEL 5.6 and derivatives)
Mac OS X
You need to extract the archive in $HOME/nrgljubljana, where $HOME is
the path to your home directory, then run the script "setpaths.sh" to
setup the correct paths. Alternatively, extract the archive in some
other directory and appropriately modify the hardcoded paths in
bin/nrginit and share/nrgljubljana/nrginit.m scripts.
Documentation and examples
Here's the current version of a reference manual:
from May 30, 2013).
An old version (2007) of the manual
is also availble. It is quite outdated, but provides some potentially
useful background information, which has not been integrated into
the new reference manual yet.
Also, check out the examples and tutorials.
A Mathematica implementation of the NRG method is also available.
It illustrates the main ideas of the algorithm on the single-impurity
Anderson model using simple Mathematica notebook interface. It
calculates the thermodynamic quantities and the expectation values of
arbitrary local operators.
NEW: NRG tutorials at SISSA, June 2013:
slides (ppt, pdf), tutorials
(cca. 50 MB), solutions to some
exercices (cca. 8 MB).
Last modified: 12. 8. 2014
Request more information
Rok Zitko's home page