Installation

Prerequisites

  1. Python3

  2. TRIQS 3.x and TRIQS/DFTTools 3.x.

    They must be installed prior to installing all other programs. The current version of DCore supports TRIQS 3.x. Please make sure that the triqs and triqs_dft_tools modules are loadable in your Python environment. You may use MateriAppsInstaller, a collection of install scripts, to install prerequisites (TRIQS).

  3. You will also need at least one impurity solver.

    For example, the following programs are supported:

    We recommend to use the Hubbard-I solver for tests because this is fast. See Impurity solvers for a complete list of supported impurity solvers and their user manuals.

Installation

You can install the latest version of DCore using pip command as follows.

$ pip3 install dcore -U

Here, -U stands for ‘’Upgrade’’. The installed packages are upgraded to the latest version, if you already have packages installed. Further, if you do not have root privileges, you need to add --user option as

$ pip3 install dcore -U --user

Then, the packages are installed into .local directory in your home directory. Make sure that $HOME/.local/bin is included in PATH environment variable.

Installation (only for developers)

You can download the source files in two ways.

  • [Release version]

    Go to the release page and download the latest tar or zip file. You can unpack, for example, the tar file by

    $ tar zxvf v3.x.x.tar.gz
    
  • [Develop version]

    Newly implemented features are available in the source code in GitHub repository. You can clone the repository by

    $ git clone https://github.com/issp-center-dev/DCore.git dcore.src
    

    The master branch basically corresponds to the latest released package, and the develop branch includes new features. Note that develop branches may not be well tested and contains some bugs.

    Please execute the following command in the source directory to install DCore.

    $ pip3 install .
    

    If you do not have root privileges, please try

    $ pip3 install . --user
    

    If both of them did not work, you could build a binary package and install it as follows

    $ rm -rf dist
    $ python3 setup.py bdist_wheel
    $ pip3 install dist/dcore-*.whl
    

    One can run unit tests using the installed DCore by executing the following commands.

    Executables such as dcore_pre may be installed into $HOME/.local/bin/dcore if you install DCore with the “–user” option. Please add this directory to your PATH environment if needed.

    You can build documentations as follows.

    $ pip3 install sphinx wild_sphinx_theme matplotlib
    $ python3 -m dcore.option_tables doc/reference
    $ sphinx-build -b html doc html
    

    Non-MPI tests can be run as follows.

    $ pip3 install pytest
    $ pytest tests/non-mpi/*/*.py
    

    MPI tests can be run as follows.

    $ pytest tests/mpi/*/*.py
    

    MPI tests invoke MPI parallelized impourity solvers. If your system MPI command is not “mpirun”, please provide the name of the correct one to DCore at runtime in an input file. The default value is “mpirun -np #” (# is replaced by the number of processors). For instance, if the MPI command of your system is “mpijob”, please set the environment variable “DCORE_MPIRUN_COMMAND” as folows.

    $ export DCORE_MPIRUN_COMMAND="mpijob -np #"
    

    Note that it is not allowed to run MPI programs interactively on some system. In this case, please run MPI tests as a parallel job with one process.