Observed since 21 Oct, 10:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
aiida-dftbplus
AiiDA plugin for DFTB+ calculations
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.
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+)
verdi daemon start
cd examples
./example_01.py --code dftb+@localhost --skf-dir /path/to/skf/
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.
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)
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
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.
MIT — see LICENSE.
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
aiida-coreEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | aiida-core<3,>=2.5 | runtime |
voluptuousEnvironment{
"extras": "",
"marker": null,
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | voluptuous | runtime |
pre-commitEnvironment{
"extras": "",
"marker": "extra == \"pre-commit\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pre-commit~=3.5; extra == "pre-commit" | runtime |
coverageEnvironment{
"extras": "",
"marker": "extra == \"tests\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | coverage>=7; extra == "tests" | runtime |
ipdbEnvironment{
"extras": "",
"marker": "extra == \"tests\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | ipdb; extra == "tests" | runtime |
pgtestEnvironment{
"extras": "",
"marker": "extra == \"tests\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pgtest>=1.3.1,~=1.3; extra == "tests" | runtime |
pytest-covEnvironment{
"extras": "",
"marker": "extra == \"tests\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pytest-cov>=4.1; extra == "tests" | runtime |
pytestEnvironment{
"extras": "",
"marker": "extra == \"tests\"",
"requires_python": ">=3.9",
"evaluation": "NOT_EVALUATED"
} | pytest>=7; extra == "tests" | runtime |
bdist_wheel · 22.74 KB · Python py3
sdist · 191.08 KB · Python source
Observed since 21 Oct, 10:57 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:b4a4bfad22eee0f6658b8caec719ece52274dfa0206f1398bbc24bd8eb9cd962