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

DOC: add xps to howto #438

Merged
merged 20 commits into from
Feb 29, 2024
Merged

DOC: add xps to howto #438

merged 20 commits into from
Feb 29, 2024

Conversation

superstar54
Copy link
Member

@superstar54 superstar54 commented Aug 16, 2023

This PR adds the doc for XPS calculation using the plugin_workchain branch of aiidalab-qe.

I also improved the XPS plugin by:

  • Added an upload button for the experimental data.
  • Add the offset correction into the workflow so that the user don't need to correct the binding energy manually.

@superstar54 superstar54 marked this pull request as draft August 16, 2023 22:41
@codecov
Copy link

codecov bot commented Aug 16, 2023

Codecov Report

Attention: Patch coverage is 8.57143% with 32 lines in your changes are missing coverage. Please review.

Project coverage is 75.79%. Comparing base (979f2e4) to head (c4a8241).

Files Patch % Lines
src/aiidalab_qe/plugins/xps/result.py 8.82% 31 Missing ⚠️
src/aiidalab_qe/plugins/xps/workchain.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #438      +/-   ##
==========================================
- Coverage   75.83%   75.79%   -0.05%     
==========================================
  Files          60       60              
  Lines        4295     4300       +5     
==========================================
+ Hits         3257     3259       +2     
- Misses       1038     1041       +3     
Flag Coverage Δ
python-3.10 75.79% <8.57%> (-0.05%) ⬇️
python-3.8 75.82% <8.57%> (-0.05%) ⬇️
python-3.9 75.82% <8.57%> (-0.05%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@superstar54 superstar54 marked this pull request as ready for review February 22, 2024 15:48
Copy link
Contributor

@PNOGillespie PNOGillespie left a comment

Choose a reason for hiding this comment

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

Hi @superstar54, good work putting together a simple documentation set.

I've added some suggested some minor changes to fix typos and grammar in some places.

The more substantive changes are:

  1. Step 2 is missing a picture of the XPS Settings tab.
  2. There are parts towards the end which talk about the offset energies and the spin-orbit splitting, but lacks a prior step which explains how to export the data (beyond reading the value from the Plotly widget)
  3. The real world example of ETFA doesn't seem to give much useful information for the user about the plugin (see the relevant comment for more information).

docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
Comment on lines 90 to 93
When comparing the calculated binding energies to the experimental data, please correct the energies by the given offset listed in the ``Offset Energies`` table.
Besides, the DFT calculated binding energies do not include spin-orbit splitting of the core level state.
We can include the spin-orbit splitting using its experimental value.
Take `f` orbit as a example, we need subtracting :math:`3/7` of the experimental spin-orbit splitting or adding :math:`4/7` of the DFT calculated value, to get the position of the :math:`4f_{7/2}` and :math:`4f_{5/2}` peaks, respectively.
Copy link
Contributor

Choose a reason for hiding this comment

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

This section here could be useful, but (unless I'm mistaken) there is no way to extract the exact binding energy values from AiiDALab-QE.

If there is a way to do this, then please update some part of the text with instructions on how to do so, otherwise this doesn't provide much utility and should be removed for simplicity.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for pointing out this. I add the detail text to tell user how to find the exact binding energies.

Comment on lines 99 to 112
A real world example
====================

Here is a XPS calculation for ETFA molecule, which is also referred to as the “ESCA molecule” in the literature. [1]

.. figure:: /_static/images/xps_etfa_dft.png
:align: center

One can compared the calculated chemical shift with the experimental data.

.. figure:: /_static/images/xps_etfa_exp.jpg
:align: center


Copy link
Contributor

Choose a reason for hiding this comment

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

This last example doesn't seem to provide much for the user's benefit, for a few reasons:

  1. The calculated and experimental spectra aren't plotted together for comparison.
  2. Without a set of instructions, or source for the structure, the user can't use this like some sort of complex "real-world" example as an extension of the documentation and so it doesn't really add much.

I would suggest either removing the section or replacing the example with one for Phenacetylene, which we have tested already and can provide figures/data for.

Copy link
Member Author

@superstar54 superstar54 Feb 26, 2024

Choose a reason for hiding this comment

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

Thanks for the suggestions. I added the ETFA molecule into the example so users can use it. also, add a tip to tell users how to run the calculation.
Currently, the app does not provide the functionality to add experimental data to the plot. But one can also compare the two plots together. I don't plot them manually because I don't want to give the user the impression that this can be done in the app directly.
Instead of giving an example that the calculated values match the experiment very well, the real example here shows the difference between calculated values and the experimental values. This is important that, the user knows our app is powerful, but there are still some limitations due to the underlying method.

superstar54 and others added 7 commits February 26, 2024 14:48
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
@superstar54
Copy link
Member Author

@PNOGillespie thanks for the review. I revised the page based on your suggestions.

Step 2 is missing a picture of the XPS Settings tab.

I added a picture.

There are parts towards the end which talk about the offset energies and the spin-orbit splitting, but lacks a prior step which explains how to export the data (beyond reading the value from the Plotly widget)

I added a detailed instruction.

The real world example of ETFA doesn't seem to give much useful information for the user about the plugin (see the relevant comment for more information).

I replied after your comment.

Please have a second review.

Copy link
Contributor

@PNOGillespie PNOGillespie left a comment

Choose a reason for hiding this comment

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

Hi @superstar54. Looks good for the most part, particularly in providing a contrast between ETFA and Phenylacetylene. Just a few proofreading changes to make, then I think this is good to go.

Since you have added a spectrum upload tool (which seems to work fine, from what i can see) I would suggest (in a different PR) one improvement, which would be to add a UI element to scale the intensities of the computed XPS traces so as to make it easier to compare the profile of (in particular) the total XPS to the experimental data.

Again, I would just suggest you open an improvements issue for that and address that at a later time.

docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
docs/source/howto/xps.rst Outdated Show resolved Hide resolved
superstar54 and others added 6 commits February 29, 2024 16:31
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
Co-authored-by: Peter Gillespie <55498719+PNOGillespie@users.noreply.github.com>
@superstar54
Copy link
Member Author

superstar54 commented Feb 29, 2024

Thanks @PNOGillespie . I made the changes and also created an issue as you suggested. #627

Copy link
Contributor

@PNOGillespie PNOGillespie left a comment

Choose a reason for hiding this comment

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

Good to go. Nice work @superstar54! Thanks also for adding the issue page.

@superstar54 superstar54 enabled auto-merge (squash) February 29, 2024 16:13
@superstar54 superstar54 merged commit 1157b88 into main Feb 29, 2024
17 checks passed
@superstar54 superstar54 deleted the doc/xps branch February 29, 2024 16:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants