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

Feature/ Tags editor to define Kinds in StructureData #410

Merged
merged 12 commits into from
Jul 5, 2023

Conversation

AndresOrtegaGuerrero
Copy link
Member

This PR implements an Editor for the QE App, to enable the user to define extra kinds within a structure. For example if you have a system compose with Fe atoms, you can define Fe1, and Fe2 based on a selection. This editor is intended to facilitated spin polarisation calculations with #409

Screenshot 2023-06-01 at 13 24 14

@codecov
Copy link

codecov bot commented Jun 1, 2023

Codecov Report

Patch coverage: 16.12% and project coverage change: -1.72 ⚠️

Comparison is base (354c81a) 54.29% compared to head (b360a29) 52.58%.

❗ Current head b360a29 differs from pull request most recent head 5d9bcdf. Consider uploading reports for the commit 5d9bcdf to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #410      +/-   ##
==========================================
- Coverage   54.29%   52.58%   -1.72%     
==========================================
  Files          17       17              
  Lines        1978     2069      +91     
==========================================
+ Hits         1074     1088      +14     
- Misses        904      981      +77     
Flag Coverage Δ
python-3.10 52.58% <16.12%> (-1.72%) ⬇️
python-3.8 52.63% <16.12%> (-1.72%) ⬇️
python-3.9 52.63% <16.12%> (-1.72%) ⬇️

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

Impacted Files Coverage Δ
aiidalab_qe/app/widgets.py 35.04% <16.12%> (-6.89%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@AndresOrtegaGuerrero AndresOrtegaGuerrero requested review from superstar54 and removed request for yakutovicha June 1, 2023 12:25
@unkcpz
Copy link
Member

unkcpz commented Jun 19, 2023

@superstar54, can you give this one a review? Thanks!

@unkcpz unkcpz removed their request for review June 19, 2023 16:18
Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

@AndresOrtegaGuerrero Thanks for adding this. It would be very useful for advanced calculation.
Could you add a section to show all tags of all atoms? In this case, the user can make sure the tag is updated successfully.

aiidalab_qe/app/widgets.py Outdated Show resolved Hide resolved
selection = string_range_to_list(self.atom_selection.value)
new_structure = deepcopy(self.structure)
new_tags = new_structure.get_tags()
new_tags[selection] = 0
Copy link
Member

Choose a reason for hiding this comment

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

When clearing tags, you set the tag value to 0. It is more like reset , so maybe change clear to reset.

@AndresOrtegaGuerrero
Copy link
Member Author

@AndresOrtegaGuerrero Thanks for adding this. It would be very useful for advanced calculation. Could you add a section to show all tags of all atoms? In this case, the user can make sure the tag is updated successfully.

@superstar54 How would you suggest to do the visualisation (Is something i have been wondering) ? Because the system can have a good amount of atoms.

@superstar54
Copy link
Member

Because the system can have a good amount of atoms.

One option would be only to show the tags of the selected atoms.

@AndresOrtegaGuerrero
Copy link
Member Author

@superstar54 I just adapted the changes you suggested , let me know.

@superstar54
Copy link
Member

Thanks! I see the tags of selected atoms. Not it shows in one line, e.g.:

Id: 5 O4 ; Id: 1 Si ; Id: 2 Si2 ; Id: 3 O2

Better to make a table like this:

Index element tag
5 O 4
1 Si
2 Si 2
3 O 2

Copy link
Member

@superstar54 superstar54 left a comment

Choose a reason for hiding this comment

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

Perfect! Thanks!

@AndresOrtegaGuerrero AndresOrtegaGuerrero merged commit 9ed0a5f into main Jul 5, 2023
12 checks passed
@AndresOrtegaGuerrero AndresOrtegaGuerrero deleted the feature/tags_editor branch July 5, 2023 12:08
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.

None yet

3 participants