aiida-hubbard 0.5.0
AiiDA plugin for the first-principles calculation of Hubbard parameters.
Requires Python: >=3.9
Keywords: aiida, workflows

# `aiida-hubbard`

AiiDA plugin for the first-principles calculation of Hubbard parameters.

This is also the official AiiDA plugin for the [HP](https://www.sciencedirect.com/science/article/pii/S0010465522001746) code of [Quantum ESPRESSO](https://www.quantum-espresso.org/).


|    | |
|-----|----------------------------------------------------------------------------|
| Reference | [![DOI](https://img.shields.io/badge/DOI-10.1038/s41524025016854-purple.svg)](https://doi.org/10.1038/s41524-025-01685-4) |
|Latest release| [![PyPI version](https://badge.fury.io/py/aiida-hubbard.svg)](https://badge.fury.io/py/aiida-hubbard)[![PyPI pyversions](https://img.shields.io/pypi/pyversions/aiida-hubbard.svg)](https://pypi.python.org/pypi/aiida-hubbard) |
|Getting help| [![Docs status](https://readthedocs.org/projects/aiida-hubbard/badge)](http://aiida-hubbard.readthedocs.io/) [![Discourse status](https://img.shields.io/discourse/status?server=https%3A%2F%2Faiida.discourse.group%2F)](https://aiida.discourse.group/)
|Build status| [![Build Status](https://github.com/aiidateam/aiida-hubbard/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/aiidateam/aiida-hubbard/actions) [![Coverage Status](https://codecov.io/gh/aiidateam/aiida-hubbard/branch/master/graph/badge.svg)](https://codecov.io/gh/aiidateam/aiida-hubbard) |
|Activity| [![PyPI-downloads](https://img.shields.io/pypi/dm/aiida-hubbard.svg?style=flat)](https://pypistats.org/packages/aiida-hubbard) [![Commit Activity](https://img.shields.io/github/commit-activity/m/aiidateam/aiida-hubbard.svg)](https://github.com/aiidateam/aiida-hubbard/pulse)
|Community|  [![Discourse](https://img.shields.io/discourse/topics?server=https%3A%2F%2Faiida.discourse.group%2F&logo=discourse)](https://aiida.discourse.group/)

## Compatibility matrix

The matrix below assumes the user always install the latest patch release of the specified minor version, which is recommended.

| Plugin | AiiDA | Python | Quantum ESPRESSO |
|-|-|-|-|
| `v0.3.0 <= v0.4.0` | ![Compatibility for v4.0][AiiDA v4.0-pydantic3] |  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/aiida-hubbard.svg)](https://pypi.python.org/pypi/aiida-hubbard) | ![Quantum ESPRESSO compatibility][QE v7.2-7.4] |
| `v0.1.0 <= v0.2.0` | ![Compatibility for v4.0][AiiDA v4.0-pydantic2] |  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/aiida-hubbard.svg)](https://pypi.python.org/pypi/aiida-hubbard) | ![Quantum ESPRESSO compatibility][QE v7.2-7.4] |

## Installation
To install using pip, simply execute:

    pip install aiida-hubbard

or when installing from source:

    git clone https://github.com/aiidateam/aiida-hubbard
    pip install aiida-hubbard

## Pseudopotentials
Pseudopotentials are installed and managed through the [`aiida-pseudo` plugin](https://pypi.org/project/aiida-pseudo/).
The easiest way to install pseudopotentials, is to install a version of the [SSSP](https://www.materialscloud.org/discover/sssp/table/efficiency) through the CLI of `aiida-pseudo`.
Simply run

    aiida-pseudo install sssp

to install the default SSSP version.
List the installed pseudopotential families with the command `aiida-pseudo list`.
You can then use the name of any family in the command line using the `-F` flag.

## Development

### Running tests
To run the tests, simply clone and install the package locally with the [tests] optional dependencies:

```shell
git clone https://github.com/aiidateam/aiida-hubbard .
cd aiida-hubbard
pip install -e .[tests]  # install extra dependencies for test
pytest -sv tests # run tests
pytest -sv examples # run examples
```

You can also use `tox` to run the test set. Here you can also use the `-e` option to specify the Python version for the test run. Example:
```shell
pip install tox
tox -e py39 -- tests/calculations/hp/test_hp.py
```

### Pre-commit
To contribute to this repository, please enable pre-commit so the code in commits are conform to the standards.
Simply install the repository with the `pre-commit` extra dependencies:
```shell
cd aiida-hubbard
pip install -e .[pre-commit]
pre-commit install
```


[AiiDA v4.0-pydantic3]: https://img.shields.io/badge/AiiDA-~=2.3,!=2.6-007ec6.svg?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACMAAAAhCAYAAABTERJSAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAFhgAABYYBG6Yz4AAAABl0RV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