# Installation

In case you don't have a working Julia installation yet, first download the Julia binaries and follow the Julia installation instructions. At least Julia 1.6 is required for DFTK.

Afterwards you can install DFTK like any other package in Julia. For example run in your Julia REPL terminal:

import Pkg

which will install the latest DFTK release. Alternatively (if you like to be fully up to date) install the master branch:

import Pkg

DFTK is continuously tested on Debian, Ubuntu, mac OS and Windows and should work on these operating systems out of the box.

That's it. With this you are all set to run the code in the Tutorial or the examples directory.

DFTK version compatibility

We follow the usual semantic versioning conventions of Julia. Therefore all DFTK versions with the same minor (e.g. all 0.6.x) should be API compatible, while different minors (e.g. 0.7.y) might have breaking changes. These will also be announced in the release notes.

While not strictly speaking required to use DFTK it is usually convenient to install a couple of standard packages from the AtomsBase ecosystem, such as AtomsIO.jl or ASEconvert.jl. You can install these two packages using

import Pkg

While AtomsIO allows you to read (and write) a large range of standard file formats for atomistic structures, ASEconvert integrates DFTK with a number of convenience features of the ASE, the atomistic simulation environment. See Creating and modelling metallic supercells for an example where ASE is used within a DFTK workflow.

Python dependencies in Julia

There are two main packages to use python dependencies from Julia, namely PythonCall and PyCall. These packages can be used side by side, but some care is needed. Since the AtomsBase ecosystem (thus AtomsIO and ASEconvert) is build based on PythonCall, be sure to follow these guidelines when using them in combination with PyCall-based packages (such as PyPlot).

## Developer setup

If you want to start developing DFTK Julia has the option to automatically keep track of the changes of the sources during development. This means, for example, that Revise will automatically be aware of the changes you make to the DFTK sources and automatically reload your changes inside an active Julia session. To achieve such a setup you have two recommended options:

1. Add a development version of DFTK to the global Julia environment:

import Pkg
Pkg.develop("DFTK")

This clones DFTK to the path ~/.julia/dev/DFTK" (on Linux). Note that with this method you cannot install both the stable and the development version of DFTK into your global environment.

2. Clone DFTK into a location of your choice

$git clone https://github.com/JuliaMolSim/DFTK.jl /some/path/ Whenever you want to use exactly this development version of DFTK in a Julia environment (e.g. the global one) add it as a develop package: import Pkg Pkg.develop("/some/path/") To run a script or start a Julia REPL using exactly this source tree as the DFTK version, use the --project flag of Julia, see this documentation for details. For example to start a Julia REPL with this version of DFTK use$ julia --project=/some/path/

The advantage of this method is that you can easily have multiple clones of DFTK with potentially different modifications made.