Equation of state (EOS)

For the source code, see eos.

Example: Silicon

Prepare the inputs and visualize the WorkGraph

[1]:
from aiida import load_profile, orm
from ase.build import bulk
from workgraph_collections.qe.eos import EosWorkgraph

load_profile()

structure = orm.StructureData(ase=bulk("Si"))
code = orm.load_code("pw-7.4@localhost")
parameters = {
    "CONTROL": {
        "calculation": "scf",
    },
    "SYSTEM": {
        "ecutwfc": 30,
        "ecutrho": 240,
        "occupations": "smearing",
        "smearing": "gaussian",
        "degauss": 0.1,
    },
}
# Load the pseudopotential family.
pseudo_family = orm.load_group("SSSP/1.3/PBEsol/efficiency")
pseudos = pseudo_family.get_pseudos(structure=structure)
kpoints = orm.KpointsData()
kpoints.set_kpoints_mesh([3, 3, 3])
#
metadata = {
    "options": {
        "resources": {
            "num_machines": 1,
            "num_mpiprocs_per_machine": 1,
        },
    }
}

# ===============================================================================
wg = EosWorkgraph.build_graph(
    structure=structure,
    code=code,
    scales=[0.98, 0.99, 1.0, 1.01, 1.02],
    parameters=parameters,
    kpoints=kpoints,
    pseudos=pseudos,
    metadata=metadata,
)
wg.to_html()
[1]:

Run the workflow

[2]:
wg.run()
09/02/2025 01:10:17 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|continue_workgraph]: tasks ready to run: scale_structure
09/02/2025 01:10:17 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|update_task_state]: Task: scale_structure, type: CALCFUNCTION, finished.
09/02/2025 01:10:17 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|continue_workgraph]: tasks ready to run: all_scf
09/02/2025 01:10:19 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|on_wait]: Process status: Waiting for child processes: 175190
09/02/2025 01:10:21 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|continue_workgraph]: tasks ready to run: PwCalculation,PwCalculation1,PwCalculation2,PwCalculation3,PwCalculation4
09/02/2025 01:10:23 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|on_wait]: Process status: Waiting for child processes: 175191, 175192, 175193, 175194, 175195
09/02/2025 01:10:37 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|update_task_state]: Task: PwCalculation, type: CALCJOB, finished.
09/02/2025 01:10:39 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|continue_workgraph]: tasks ready to run:
09/02/2025 01:10:39 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|on_wait]: Process status: Waiting for child processes: 175192, 175193, 175194, 175195
09/02/2025 01:10:48 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|update_task_state]: Task: PwCalculation1, type: CALCJOB, finished.
09/02/2025 01:10:48 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|update_task_state]: Task: PwCalculation2, type: CALCJOB, finished.
09/02/2025 01:10:48 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|update_task_state]: Task: PwCalculation3, type: CALCJOB, finished.
09/02/2025 01:10:49 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|update_task_state]: Task: PwCalculation4, type: CALCJOB, finished.
09/02/2025 01:10:50 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|continue_workgraph]: tasks ready to run:
09/02/2025 01:10:51 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175190|WorkGraphEngine|finalize]: Finalize workgraph.
09/02/2025 01:10:51 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|update_task_state]: Task: all_scf, type: GRAPH, finished.
09/02/2025 01:10:52 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|continue_workgraph]: tasks ready to run: fit_eos
09/02/2025 01:10:52 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|update_task_state]: Task: fit_eos, type: CALCFUNCTION, finished.
09/02/2025 01:10:52 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|continue_workgraph]: tasks ready to run:
09/02/2025 01:10:52 PM <1293550> aiida.orm.nodes.process.workflow.workchain.WorkChainNode: [REPORT] [175182|WorkGraphEngine|finalize]: Finalize workgraph.