Skip to content

Feature/kkr bdg workflow#176

Open
MRHemmati wants to merge 5 commits into
developfrom
feature/kkr-bdg-workflow
Open

Feature/kkr bdg workflow#176
MRHemmati wants to merge 5 commits into
developfrom
feature/kkr-bdg-workflow

Conversation

@MRHemmati

Copy link
Copy Markdown
Contributor

What this PR adds

aiida_kkr/workflows/kkr_bdg_wc.py (new file)

Implements kkr_bdg_wc, an AiiDA WorkChain that automates the full
Bogoliubov-de Gennes (BdG) calculation pipeline for host (bulk) materials
on top of the KKRhost code. It orchestrates four sequential steps:

  1. Normal-state KKR SCF — standard self-consistency using kkr_scf_wc
    (skipped if remote_data_normal is provided).
  2. Semi-circle contour restart — switches the energy contour to a
    semi-circle around the Fermi level for better resolution of the gap
    (skipped if remote_data_semi_circle is provided).
  3. BdG initialisation (one-shot) — single iteration with the BdG-enabled
    KKRhost code to generate the initial anomalous density.
  4. BdG SCF — full self-consistent convergence of the anomalous
    (pairing) potential to obtain the superconducting gap Δ.

Parameter updates between steps are handled through tracked @calcfunctions
(update_params_semi_circle, update_params_bdg) to preserve full AiiDA
provenance. Both normal and BdG codes can be supplied independently, and all
four steps expose dedicated exit_codes (301–304) for error handling.


aiida_kkr/workflows/__init__.py (modified)

Added the new workflow to the package exports:

from .kkr_bdg_wc import kkr_bdg_wc

pyproject.toml (modified)

Registered the workflow as an AiiDA entry point so it is discoverable
via WorkflowFactory('kkr.kkr_bdg_wc'):

[project.entry-points."aiida.workflows"]
"kkr.kkr_bdg_wc" = "aiida_kkr.workflows.kkr_bdg_wc:kkr_bdg_wc"

How to test

from aiida.plugins import WorkflowFactory
kkr_bdg_wc = WorkflowFactory('kkr.kkr_bdg_wc')
print(kkr_bdg_wc.get_builder())   # should print the spec without errors

See examples/Test_kkr_bdg_wc.ipynb for a full submission example with bulk Nb.

@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@mergify

mergify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant