aiida_alc_ins.workflows.dispersion¶
A WorkChain composing Euphonic steps into a dispersion workflow.
Steps (after force constants are resolved by running
ForceConstantsWorkChain
as a sub-workflow – read in-process from a CASTEP file by the
read_castep_force_constants calcfunction, or taken from a supplied node):
extract the crystal structure -> StructureData (calcfunction)
generate a seekpath q-point path -> KpointsData (calcfunction)
interpolate phonon modes on that path -> QpointPhononModesData (PythonJob)
compose a band structure -> BandsData (calcfunction)
The calcfunction steps run in-process (they need a loaded AiiDA profile to
build nodes and are cheap), while the compute-heavy interpolate step runs as a
PythonJob that could target a remote machine. Building the band path
parent-side lets it return a native KpointsData directly – no custom carrier
type needed. BandsData plugs into AiiDA’s plotting, e.g.
results['band_structure'].show_mpl().
The file-staging PythonJob pattern that the read used to demonstrate is retained
by aiida_alc_ins.pythonjobs.prepare_read_force_constants_inputs(),
exercised by tests/test_remote_ssh.py.
WorkChain reference: https://aiida.readthedocs.io/projects/aiida-core/en/stable/topics/workflows/write.html
Functions¶
|
Extract a |
|
Build a seekpath high-symmetry q-point path as a native |
|
Compose a BandsData from phonon modes + the labelled q-point path. |
Module Contents¶
- aiida_alc_ins.workflows.dispersion.extract_structure(data: aiida_alc_ins.data.mixins.SupportsToStructure) aiida.orm.StructureData[source]¶
Extract a
StructureDatafrom any node implementingto_structure().Generic on purpose: it works for
ForceConstantsData,QpointPhononModesData, or any future node exposingto_structure()(theSupportsToStructureprotocol). It is just a calcfunction wrapper so the method call becomes a provenance link between the input node and theStructureDataon the workflow graph. AiiDA infersvalid_type=(Data,)from the protocol annotation; theto_structure()call does the rest.
- aiida_alc_ins.workflows.dispersion.generate_band_path(structure: aiida.orm.StructureData, q_spacing: aiida.orm.Float) aiida.orm.KpointsData[source]¶
Build a seekpath high-symmetry q-point path as a native
KpointsData.Depends only on the crystal structure (seekpath needs nothing else). A parent-side
calcfunction(not a PythonJob): path-building is cheap and needs a loaded profile to construct theKpointsDatanode, which a remote PythonJob subprocess could not do.
- aiida_alc_ins.workflows.dispersion.assemble_bands(modes: aiida_alc_ins.data.QpointPhononModesData, qpoints: aiida.orm.KpointsData) aiida.orm.BandsData[source]¶
Compose a BandsData from phonon modes + the labelled q-point path.
A
calcfunction(so the BandsData is provenance-linked) that just delegates to the Data node’s own converter;qpointssupplies the high-symmetry labels that Euphonic modes do not carry.