X-ray photoelectron spectroscopy (XPS)

For the source code, see xps.

Visualizing the WorkGraph Builder

[1]:
from workgraph_collections.ase.espresso.xps import xps_workgraph
from aiida import load_profile
load_profile()

task = xps_workgraph.task()
task.to_html()
[1]:

Visualizing the WorkGraph

[4]:
from workgraph_collections.ase.espresso.xps import xps_workgraph
from aiida import load_profile
load_profile()

wg = xps_workgraph(element_list=["C"])
wg.to_html()
[4]:

Example: ETFA molecule

Prepare the inputs and submit the workflow

[10]:
from ase.io import read
from aiida import load_profile
from workgraph_collections.ase.espresso.xps import xps_workgraph

load_profile()

# create input structure
atoms = read("../datas/ETFA.xyz")
atoms.center(vacuum=5.0)
input_data = {
        "CONTROL": {
            "calculation": "scf",
        },
        "SYSTEM": {
            "ecutwfc": 50,
            "ecutrho": 400,
            "occupations": "fixed",
        },
    }
kpts = (1, 1, 1)
# Pseudos from https://github.com/superstar54/xps-data/tree/main/pseudo_demo/pseudo_demo_pbe
pseudopotentials = {
    "C": "C.pbe-n-kjgipaw_psl.1.0.0.UPF",
    "H": "H.pbe-kjpaw_psl.1.0.0.UPF",
    "O": "O.pbe-n-kjpaw_psl.0.1.UPF",
    "F": "F.pbe-n-rrkjus_psl.1.0.0.UPF",
}
core_hole_pseudos = {
    "C_1s": "C.star1s.pbe-n-kjgipaw_psl.1.0.0.UPF",
    "O_1s": "O.star1s.pbe-n-kjpaw_psl.0.1.UPF",
}
#
metadata = {
    "options": {
        'prepend_text' : """eval "$(conda shell.posix hook)"
        conda activate aiida
        export OMP_NUM_THREADS=1
        """,
    }
}
scf_inputs = {
    "command": "mpirun -np 4 pw.x",
    "computer": "localhost",
    "metadata": metadata,
    "input_data": input_data,
    "kpts": kpts,
    "pseudopotentials": pseudopotentials,
    "pseudo_dir": "/home/wang_x3/datas/pseudos/xps/pbe",
    "core_hole_pseudos": core_hole_pseudos,
    "is_molecule": True,
}
# corrections from https://github.com/superstar54/xps-data/blob/main/pseudo_demo/pseudo_demo_pbe/datas.py
corrections = {
        "C": 345.99 - 6.2,
        "O": 676.47 - 8.25,
        }
# ===============================================================================
wg = xps_workgraph(
    atoms=atoms,
    atoms_list=[(0, "1s"), (1, "1s"), (2, "1s"), (3, "1s")],
    scf_inputs=scf_inputs,
    corrections=corrections,
    metadata=metadata,
)
wg.name = "ASE-espresso-XPS-ETFA"
wg.submit(wait=True, timeout=300)
WorkGraph process created, PK: 55672
[10]:
<WorkChainNode: uuid: f0d39e37-6cf4-4724-93cc-822225b2c338 (pk: 55672) (aiida_workgraph.engine.workgraph.WorkGraphEngine)>