Installation

Packaged Versions of DFTTools

Ubuntu Debian packages

We provide a Debian package for the Ubuntu LTS Version 22.04 (jammy), which can be installed by following the steps outlined here, and the subsequent command:

sudo apt-get install -y triqs_dft_tools

Anaconda (experimental)

We provide Linux and OSX packages for the Anaconda distribution. The packages are provided through the conda-forge repositories. After installing conda you can install DFTTools with:

conda install -c conda-forge triqs_dft_tools

See also github.com/conda-forge/triqs_dft_tools-feedstock.

Docker

A Docker image including the latest version of DFTTools is available here. For more information, please see the page on TRIQS Docker.

Compiling DFTTools from source

Prerequisites

  1. The TRIQS library, see TRIQS installation instruction. In the following, we assume that TRIQS is installed in the directory path_to_triqs.

  2. Likely, you will also need at least one impurity solver, e.g. the CTHYB solver.

Installation steps

  1. Download the source code of the latest stable version by cloning the TRIQS/dft_tools repository from GitHub:

    $ git clone https://github.com/TRIQS/dft_tools dft_tools.src
    
  2. Create and move to a new directory where you will compile the code:

    $ mkdir dft_tools.build && cd dft_tools.build
    
  3. Ensure that your shell contains the TRIQS environment variables by sourcing the triqsvars.sh file from your TRIQS installation:

    $ source path_to_triqs/share/triqs/triqsvars.sh
    
  4. In the build directory call cmake, including any additional custom CMake options, see below:

    $ cmake ../dft_tools.src
    
  5. Compile the code, run the tests and install the application:

    $ make
    $ make test
    $ make install
    

Important note for FCSC DFT+DMFT calculations

To use dft_tools together with any of the supported DFT codes (Wien2k, Vasp, or Elk) in a full charge self-consistent manner, please make sure to compile both triqs and the designated DFT code with the same compiler / library setup for best compatibility. For example, if Vasp is compiled with the intel compiler suite, it will not be possible to use it together with a GNU compiled triqs and vice versa during a FCSC calculation, as both codes need to run at the same time. Hence, it is highly advisable to not use the intel compilers (linking againt intel mkl libraries is of course fine) to compile any of the interfaced DFT codes.

Installation steps for the use with WIEN2K version 14.2 and older

Warning

The following steps are only necessary if you use a Wien2k version 14.2 and older. For newer versions (15.1 onwards), these things have been included already in the Wien2k package. There are no run_triqs and runsp_triqs scripts any more, since their functionality has been included in the Wien2k run scripts.

You need to take this last step manually since the Wien2k installation is not standard on all machines. After the above installation several files will be installed into:

path_to_TRIQS_install_directory/share/triqs/Wien2k_SRC_files/SRC_templates

These files are:

  • case.cf_f_mm2 and case.cf_p_cubic containing matrices for the complex->cubic transformation of the local angular basis

  • case.indmftpr is a template for the input file needed by the dmftproj program. This program constructs a set of localized orbitals representing correlated states.

These files then have to be copied manually to path_to_Wien2k/SRC_templates, where path_to_Wien2k is the path to the Wien2K main directory.

When building the Wien2k extension module, the dmftproj is compiled and installed it into path_to_triqs/bin.

In addition, path_to_Wien2k/SRC_templates also contains run_triqs and runsp_triqs scripts for running Wien2k+DMFT fully self-consistent calculations. These files should be copied to path_to_Wien2k, and set as executables by running:

$ chmod +x run*_triqs

You will also need to insert manually a correct call of python into these scripts using an appropriate for your system MPI wrapper (mpirun, mpprun, etc.), if needed.

Finally, you will have to change the calls to python_with_DMFT to your python installation in the Wien2k path_to_Wien2k/run* files.

Version compatibility

Keep in mind that the version of dft_tools must be compatible with your TRIQS library version, see TRIQS website. In particular the Major and Minor Version numbers have to be the same. To use a particular version, go into the directory with the sources, and look at all available versions:

$ cd dft_tools.src && git tag

Checkout the version of the code that you want:

$ git checkout 2.1.0

and follow steps 2 to 4 above to compile the code.

Custom CMake options

The compilation of dft_tools can be configured using CMake-options:

cmake ../dft_tools.src -DOPTION1=value1 -DOPTION2=value2 ...

Options

Syntax

Specify an installation path other than path_to_triqs

-DCMAKE_INSTALL_PREFIX=path_to_dft_tools

Build in Debugging Mode

-DCMAKE_BUILD_TYPE=Debug

Disable testing (not recommended)

-DBuild_Tests=OFF

Build the documentation

-DBuild_Documentation=ON

Check test coverage when testing (run make coverage to show the results; requires the python coverage package)

-DTEST_COVERAGE=ON