Skip to main content

CI/CD Status Coverage Status Docs status PyPI version

aiida-dftbplus

Run DFTB+ from AiiDA: the plugin writes dftb_in.hsd, submits the job, brings every output file back and stores the input parameters as queryable database attributes.

One calculation in, one calculation out — no workflows, no error recovery.

Install

pip install aiida-dftbplus
verdi quicksetup          # if you do not have a profile yet

DFTB+ itself comes separately (e.g. conda install -c conda-forge dftbplus). Register it once:

verdi code create core.code.installed \
    --label dftb+ --computer localhost \
    --default-calc-job-plugin dftbplus \
    --filepath-executable $(which dftb+)

Run something

verdi daemon start
cd examples
./example_01.py --code dftb+@localhost --skf-dir /path/to/skf/

Describe the input

Write the HSD as a nested dictionary — every setting stays queryable:

from aiida import engine, orm
from aiida.plugins import CalculationFactory, DataFactory

DftbParameters = DataFactory("dftbplus")

parameters = DftbParameters({
    "Geometry": {"GenFormat": {"_raw": open("geometry.gen").read()}},
    "Hamiltonian": {"DFTB": {
        "SCC": True,
        "MaxSCCIterations": 100,
        "SCCTolerance": 1e-5,
        "_raw_1": 'SlaterKosterFiles = Type2FileNames {\n'
                  '  Prefix = "/opt/skf/mio-1-1/"\n'
                  '  Separator = "-"\n  Suffix = ".skf"\n}',
    }},
    "Analysis": {"CalculateForces": True},
})

engine.submit(CalculationFactory("dftbplus"), code=code, parameters=parameters)

Anything the dictionary form does not cover goes through verbatim under a _raw* key, so nothing in DFTB+ is out of reach. Dictionaries are validated before submission — print(DftbParameters.schema.schema) lists the blocks.

Already have a file? Hand it over instead:

inputs["dftb_input"] = DataFactory("core.singlefile")(file="dftb_in.hsd")

Exactly one of parameters or dftb_input is required.

Slater-Koster files

Two options, and the choice matters for speed:

  • use_remote_skf_path=True — the files already sit on the machine, keep the absolute path in the HSD and upload nothing. Best for a full parameter set.

  • skf_files (a FolderData) — ship the files with the job, but only the pairs the run reads. A full set is copied into every working directory and turns a one-second job into a several-minute one; a two-element material needs four files:

    skf_files = orm.FolderData()
    for name in (f"{a}-{b}.skf" for a in ["O", "S"] for b in ["O", "S"]):
        skf_files.put_object_from_file(str(skf_dir / name), name)
    

Get the results

verdi process list -a
verdi calcjob res <PK>        # parsed scalars: energies, Fermi level, forces
verdi calcjob outputls <PK>   # every retrieved file
verdi process report <PK>     # why it failed, if it did

output_parameters carries total_energy_H, total_energy_eV, fermi_energy_eV, scc_converged, n_scc_iterations, forces_eV_Ang and max_force_eV_Ang. Failures come back as exit codes: 300 output missing, 310 DFTB+ error, 320 SCC not converged, 330 geometry not converged.

Inspect the stored input nodes with the bundled verdi commands:

verdi data dftbplus list
verdi data dftbplus hsd <PK>    # render the node as the dftb_in.hsd it produces

Documentation

Full documentation — getting started, tutorials, how-to guides, architecture and API reference — at aiida-dftbplus.readthedocs.io.

Start here:

Build it locally with pip install -e . --group docs && make -C docs.

License

MIT — see LICENSE.

Contact

sitouamu510@gmail.com

Metadata

Release files for aiida-dftbplus 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiida-dftbplus 0.1.2
File Size Uploaded
aiida_dftbplus-0.1.2.tar.gz 195.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiida-dftbplus 0.1.2
File Interpreter ABI Platform
aiida_dftbplus-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 219.0 kB

Release files / aiida_dftbplus-0.1.2.tar.gz

Download URL aiida_dftbplus-0.1.2.tar.gz
Size 195.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ad20fbb13c3783c6136af2b31416459139e9fce35002adda9377d944353e50ea
BLAKE2b-256 checksum
How to use checksums
c223a2f8beaaef817f2b443a93d7f419fd687d227135190cb14878f03c05773b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release files / aiida_dftbplus-0.1.2-py3-none-any.whl

Download URL aiida_dftbplus-0.1.2-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a67c98fa53f421de10387d135b1142a7e709ca921a8a287fd74550bdd6f7772
BLAKE2b-256 checksum
How to use checksums
3eecbc703dc368d8caa808b725cfd5bc41419e63b0f078c1696852c23f65df8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 15, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page