-
Notifications
You must be signed in to change notification settings - Fork 87
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
Angular Channel Code for PairStateInteraction class #186
base: draft_v3.8.0
Are you sure you want to change the base?
Angular Channel Code for PairStateInteraction class #186
Conversation
Added angular channel code to PairStateInteraction class and added singleAtomState, compositeState functions to __init__ file to access them for example Jupyter notebook on angular channel code.
Example upyter notebook for angular channel code.
8cde825
to
9583e0d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks overall very nice. Thank you for your contribution @KarenWadenpfuhl !
Don't worry for now about formatting issue in CI/CD (I will fix formatting once it is merged to draft branch, before moving to main).
In addition to few questions above, the main remaining thing is to decide what to do with precalculated data.
I suggest that we create a folder ~/.arc-data/C6_LJ_channels_cache
. Since neither GitHub nor PyPI is used for distribution and storage of large data sets, I suggest that we store all the datasets in Zenodo. Then your code upon execution could check if in ~/.arc-data/C6_LJ_channels_cache/
you have the correct file or not. If a file is not found, it would write in the terminal option to the user: it would automatically download from Zenodo fixed dataset or run pre-calculation based on the latest values of atom data (using a rich progress bar, it will automatically indicate estimated time also). After that it would proceed.
I can help you add that logic and download, once you create the Zenodo dataset and point me precisely where the check and download should happen.
Regarding data files on Zenodo, to get compact files we should use something binary instead of .txt
. Numpy binary .npy
is one choice.
From a scientific long term reuse and compactness point of view, probably the best choice would be battle tested, age-old standard HDF5 (see here and here), that you can easily manipulate from Python using hd5py and where you can also write all metadata etc. What do you prefer? I am happy to help with data wrangling.
arc/calculations_atom_pairstate.py
Outdated
# so wrote a new one that enforces the selection rules as stated here for LS coupling: | ||
# https://en.wikipedia.org/wiki/Selection_rule | ||
# also, have a second look at _isCoupled fct but I think it returns states that are | ||
# forbidden for dipole allowed only, even when setting interactionsUpTo=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have example for when you observe incorrect behavior? I reviewed again the code and I think conditions are identical.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, @nikolasibalic, the functions output the same behaviour. When I started working on this, I wasn't sure how the quadrupole selection rules were implemented in your function and wrote my own plus added this comment. I then figured that the output was indeed the same but forgot to delete my comment. Apologies for making you go over the function again, I think it is correct.
Fixed small issues.
Added code to compute angular channel values for C6 interaction to PairStateInteraction class. Also provides an example Jupyter notebook on how to use the angular channels.