Skip to content

Commit

Permalink
Add Feature: XAS Plugin (#580)
Browse files Browse the repository at this point in the history
Adds a plugin to calculate XANES spectra using the XspectraCrystalWorkChain of AiiDA-QE. The Setting panel allows users to simply select which element to calculate XAS for, as well as tuning the supercell size to be used in the calculation. This panel also provides the option to change the type of core-hole approximation between FCH (removing the excited electron with tot_charge = 1) and XCH (allowing the excited electron to occupy the conduction band. The result will display both the complete powder XAS for the input structure and the contributions from each symmetrically non-equivalent site. 


---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Xing Wang <xingwang1991@gmail.com>
  • Loading branch information
3 people committed Jan 29, 2024
1 parent 8ad9d9c commit 1950c34
Show file tree
Hide file tree
Showing 7 changed files with 1,082 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ aiidalab_qe.properties =
bands = aiidalab_qe.plugins.bands:bands
pdos = aiidalab_qe.plugins.pdos:pdos
electronic_structure = aiidalab_qe.plugins.electronic_structure:electronic_structure
xas = aiidalab_qe.plugins.xas:xas

[aiidalab]
title = Quantum ESPRESSO
Expand Down
31 changes: 31 additions & 0 deletions src/aiidalab_qe/plugins/xas/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
from importlib import resources

import yaml
from aiidalab_widgets_base import ComputationalResourcesWidget

from aiidalab_qe.common.panel import OutlinePanel
from aiidalab_qe.plugins import xas as xas_folder

from .result import Result
from .setting import Setting
from .workchain import workchain_and_builder

PSEUDO_TOC = yaml.safe_load(resources.read_text(xas_folder, "pseudo_toc.yaml"))


class XasOutline(OutlinePanel):
title = "X-ray absorption spectroscopy (XAS)"
help = """"""


xs_code = ComputationalResourcesWidget(
description="xspectra.x", default_calc_job_plugin="quantumespresso.xspectra"
)

xas = {
"outline": XasOutline,
"code": {"xspectra": xs_code},
"setting": Setting,
"result": Result,
"workchain": workchain_and_builder,
}
26 changes: 26 additions & 0 deletions src/aiidalab_qe/plugins/xas/pseudo_toc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
xas_xch_elements: [C, Li]
pseudos:
pbe:
gipaw_pseudos:
C: C.pbe-n-kjgipaw_psl.1.0.0.UPF
Cu: Cu.pbe-n-van_gipaw.UPF
F: F.pbe-gipaw_kj_no_hole.UPF
Li: Li.pbe-s-rrkjus-gipaw.UPF
O: O.pbe-n-kjpaw_gipaw.UPF
Si: Si.pbe-van_gipaw.UPF
core_wavefunction_data:
C: C.pbe-n-kjgipaw_psl.1.0.0.dat
Cu: Cu.pbe-n-van_gipaw.dat
F: F.pbe-gipaw_kj_no_hole.dat
Li: Li.pbe-s-rrkjus-gipaw.dat
O: O.pbe-n-kjpaw_gipaw.dat
Si: Si.pbe-van_gipaw.dat
core_hole_pseudos:
1s:
C: C.star1s.pbe-n-kjgipaw_psl.1.0.0.UPF
Cu: Cu.star1s-pbe-n-van_gipaw.UPF
F: F.star1s-pbe-gipaw_kj.UPF
Li: Li.star1s-pbe-s-rrkjus-gipaw-test_2.UPF
O: O.star1s.pbe-n-kjpaw_gipaw.UPF
Si: Si.star1s-pbe-van_gipaw.UPF
Loading

0 comments on commit 1950c34

Please sign in to comment.