This repository contains a python package to compute the multipole moments from a local density matrix (e.g., from density-functional theory or dynamical mean-field theory) and files for performing multipole-constrained calculations:
example.ipynb
: examples on how to use the code and benchmark against VASP for Cr2O3 (data in foldertests/Cr2O3_benchmark_vasp/
)multipyles/
: the python package, containingmultipyles.py
: all the functions for calculating multipoles and postprocessing the resultsread_from_dft.py
: functions to read either density matrices to feed into the program or calculated multipoles from different DFT codes for comparisonhelper.py
andmultipole_eqs.py
: helper functions needed inmultipoles.py
tests/
: the test suite for pytestconstrained_dft_vasp/
: the files needed to perform multipole-constrained DFT calculations. Please look at the README there for more information.
If you add the directory this README is in to the sys.path
, you can import the python code with
from multipyles import multipyles, read_from_dft
It currently works for all density matrices with the same orbital moment
This code is based on Bultmark et al. (2009).
Currently, there are implementations for reading the density matrix from VASP and less well tested ones for abinit and Elk. However, every local density matrix can be used by reading it in as a numpy array. From these matrices, the multipoles can be straightforwardly calculated.
Alternatively, the multipoles computed by Elk and VASP (unpublished VASP modification by our group) can directly be read. This allows for direct comparison between this implementation and the respective DFT implementation.
For the computed/read multipoles, the code can then calculate exchange and Hartree energies.
Please use the doi linked in the README.md on the main branch.
Brief summary of the important steps for this code with explicit summations:
multipyles.helper.spherical_to_cubic
returns the matrix M to transform
the complex spherical harmonics
where
Time-reversal symmetrization based on Pauli matrices:
where
Then rewrite matrix in spin components:
Formulas for multipoles (
Copyright (c) 2022-2023 ETH Zurich, Maximilian E. Merkel; Materials Theory Group, D-MATL
This project is licensed under the MIT License - see LICENSE.txt for details.