DFTK-based calculator for ASE
DFTK is a small library of Julia algorithms for experimentation with plane-wave-based density-functional theory (PWDFT) methods. Its performance is on the same order of magnitude as established packages in the field. See dftk.org and the DFTK documentation for more details.
- Install Julia e.g. by downloading the binary. The use of at least Julia 1.4 is required. It is highly recommended you install Julia before installing asedftk.
- Install asedftk from PyPi:
This automatically installs the PyJulia package, which allows Julia and Python codes to interoperate with each other.
pip install asedftk
- Install the Julia dependencies of asedftk:
python3 -c "import asedftk; asedftk.install()"
- That's it, you're all set. But please note:
Due to some limitations
in some Linux distros like Debian or Ubuntu
you might need to run your Python scripts
python-jlwrapper if you want to use asedftk in them. I.e. if you have written a calculation script
script.pyyou might need to start it as
python-jl script.pyin order to be able to use asedftk.
asedftk.DFTK is basically a class wrapping around DFTK and making it an
Just use it like any other calculator class. For example:
from asedftk import DFTK from ase.build import bulk atoms = bulk("Si") atoms.calc = DFTK() print(atoms.get_potential_energy())
More details can be found in the asedftk documentation.