2013-09-01 17:56:17 +02:00
.. highlight :: bash
2018-06-04 21:56:47 +02:00
.. _install:
2021-09-17 20:24:22 +02:00
Installation
***** ***** **
2018-06-04 21:56:47 +02:00
2018-09-20 06:32:33 +02:00
Packaged Versions of DFTTools
2018-06-04 21:56:47 +02:00
=============================
2020-03-23 22:00:36 +01:00
.. _ubuntu_debian:
Ubuntu Debian packages
----------------------
2018-06-04 21:56:47 +02:00
2021-09-30 18:17:50 +02:00
We provide a Debian package for the Ubuntu LTS Versions 18.04 (bionic) and 20.04 (focal), which can be installed by following the steps outlined :ref: `here <triqslibs:ubuntu_debian>` , and the subsequent command::
2018-06-04 21:56:47 +02:00
2019-04-26 20:25:58 +02:00
sudo apt-get install -y triqs_dft_tools
2018-06-04 21:56:47 +02:00
2020-03-23 22:00:36 +01:00
.. _anaconda:
Anaconda (experimental)
-----------------------
We provide Linux and OSX packages for the `Anaconda <https://www.anaconda.com/> `_ distribution. The packages are provided through the `conda-forge <https://conda-forge.org/> `_ repositories. After `installing conda <https://docs.conda.io/en/latest/miniconda.html> `_ you can install DFTTools with::
conda install -c conda-forge triqs_dft_tools
See also `github.com/conda-forge/triqs_dft_tools-feedstock <https://github.com/conda-forge/triqs_dft_tools-feedstock/> `_ .
.. _docker:
Docker
------
A Docker image including the latest version of DFTTools is available `here <https://hub.docker.com/r/flatironinstitute/triqs> `_ . For more information, please see the page on :ref: `TRIQS Docker <triqslibs:triqs_docker>` .
2013-09-01 17:56:17 +02:00
2018-09-20 06:32:33 +02:00
Compiling DFTTools from source
2018-06-04 21:56:47 +02:00
==============================
2015-03-12 00:01:12 +01:00
2015-02-06 10:24:58 +01:00
Prerequisites
-------------
2013-09-01 17:56:17 +02:00
2021-09-30 18:17:50 +02:00
#. The :ref: `TRIQS <triqslibs:welcome>` library, see :ref: `TRIQS installation instruction <triqslibs:triqs_install>` .
2020-06-10 17:45:53 +02:00
In the following, we assume that TRIQS is installed in the directory `` path_to_triqs `` .
2021-09-30 18:17:50 +02:00
#. Likely, you will also need at least one impurity solver, e.g. the `CTHYB solver <https://triqs.github.io/cthyb/latest/> `_ .
2013-09-01 17:56:17 +02:00
2020-06-10 17:45:53 +02:00
Installation steps
2013-09-01 17:56:17 +02:00
------------------
2020-06-10 17:45:53 +02:00
#. 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
2019-05-17 00:20:18 +02:00
#. Create and move to a new directory where you will compile the code::
2020-06-10 17:45:53 +02:00
2018-06-04 22:40:50 +02:00
$ mkdir dft_tools.build && cd dft_tools.build
2020-06-10 17:45:53 +02:00
2019-05-17 00:20:18 +02:00
#. Ensure that your shell contains the TRIQS environment variables by sourcing the `` triqsvars.sh `` file from your TRIQS installation::
2018-06-04 22:40:50 +02:00
2020-09-23 18:10:27 +02:00
$ source path_to_triqs/share/triqs/triqsvars.sh
2020-06-10 17:45:53 +02:00
2019-05-17 00:20:18 +02:00
#. In the build directory call cmake, including any additional custom CMake options, see below::
2019-05-06 14:28:29 +02:00
2019-05-17 00:20:18 +02:00
$ cmake ../dft_tools.src
2020-06-10 17:45:53 +02:00
#. Compile the code, run the tests and install the application::
$ make
$ make test
$ make install
2013-09-01 17:56:17 +02:00
2015-03-12 00:01:12 +01:00
2020-09-28 20:48:06 +02:00
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.
2015-08-11 16:54:29 +02:00
Installation steps for the use with WIEN2K version 14.2 and older
2015-08-19 12:11:23 +02:00
-----------------------------------------------------------------
2015-02-06 10:24:58 +01:00
2015-08-11 16:54:29 +02:00
.. 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
:program: `run_triqs` and :program: `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::
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
path_to_TRIQS_install_directory/share/triqs/Wien2k_SRC_files/SRC_templates
These files are:
* :file: `case.cf_f_mm2` and :file: `case.cf_p_cubic` containing matrices for
the complex->cubic transformation of the local angular basis
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
* :file: `case.indmftpr` is a template for the input file needed by the
:program: `dmftproj` program. This program constructs a set of localized
orbitals representing correlated states.
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
These files then have to be copied manually to
:file: `path_to_Wien2k/SRC_templates` , where :file: `path_to_Wien2k` is the path
to the Wien2K main directory.
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
When building the Wien2k extension module, the :program: `dmftproj` is
compiled and installed it into :file: `path_to_triqs/bin` .
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
In addition, :file: `path_to_Wien2k/SRC_templates` also contains
:program: `run_triqs` and :program: `runsp_triqs` scripts for running Wien2k+DMFT
fully self-consistent calculations. These files should be copied to
:file: `path_to_Wien2k` , and set as executables by running::
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
$ chmod +x run*_triqs
2014-09-22 19:21:10 +02:00
2018-09-20 06:32:33 +02:00
You will also need to insert manually a correct call of :file: `python` into
2015-08-11 16:54:29 +02:00
these scripts using an appropriate for your system MPI wrapper (mpirun,
2018-09-20 06:32:33 +02:00
mpprun, etc.), if needed.
2013-09-01 17:56:17 +02:00
2015-08-11 16:54:29 +02:00
Finally, you will have to change the calls to :program: `python_with_DMFT` to
2018-09-20 06:32:33 +02:00
your :program: `python` installation in the Wien2k :file: `path_to_Wien2k/run*` files.
2013-09-01 17:56:17 +02:00
2013-09-01 17:56:17 +02:00
2020-06-10 17:45:53 +02:00
Version compatibility
2018-03-13 13:23:52 +01:00
---------------------
2020-06-10 17:45:53 +02:00
Keep in mind that the version of `` dft_tools `` must be compatible with your TRIQS library version,
see :ref: `TRIQS website <triqslibs:versions>` .
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.
2018-03-13 13:23:52 +01:00
Custom CMake options
--------------------
2020-06-10 17:45:53 +02:00
The compilation of `` dft_tools `` can be configured using CMake-options::
cmake ../dft_tools.src -DOPTION1=value1 -DOPTION2=value2 ...
+-----------------------------------------------------------------+-----------------------------------------------+
| Options | Syntax |
+=================================================================+===============================================+
2020-10-06 00:19:20 +02:00
| Specify an installation path other than path_to_triqs | -DCMAKE_INSTALL_PREFIX=path_to_dft_tools |
2020-06-10 17:45:53 +02:00
+-----------------------------------------------------------------+-----------------------------------------------+
| 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 | -DTEST_COVERAGE=ON |
| (run `` make coverage `` to show the results; requires the | |
| python `` coverage `` package) | |
+-----------------------------------------------------------------+-----------------------------------------------+