Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Feature: XAS Plugin #580

Merged
merged 13 commits into from
Jan 29, 2024
Merged
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,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
Comment on lines +6 to +11
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to slow down the progress, is that possible to integrate this to aiida-pseudo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, I will say for this that the solution being used here is not necessarily intended as a permanent solution to providing pseudopotentials for these types of calculations. In principle, integrating some sort of family in aiida-pseudo for core-hole pseudopotentials is the ideal long-term objective here - since then the procedure for assigning pseudos obviously follows that of other plugins.

The two issues I see with integrating the current library with aiida-pseudo are:

  1. Some sort of new Class or other new feature will need to be made for aiida-pseudo in order to work with these types of pseudopotentials: for instance to ensure the correct core wavefunction data file is matched to the correct GIPAW pseudo, also that the core-hole and GIPAW pseudos are matched correctly.
  2. The current library is a stub which covers only some elements, therefore potentially not enough to make it worth pursuing with just what's there at the moment.

I would be interested in your thoughts on this in any case @unkcpz.

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
Loading