-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Expose getting orbital params from name #251
base: main
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #251 +/- ##
=======================================
Coverage 85.10% 85.11%
=======================================
Files 131 131
Lines 20818 20817 -1
=======================================
+ Hits 17717 17718 +1
+ Misses 3101 3099 -2
Continue to review full report at Codecov.
|
Thanks for this. What exactly is it you want? 👍 aorb = AtomicOrbital(name)
aorb.n
aorb.l
aorb.m
aorb.Z
aorb.P If what you want is to select orbitals based on criteria, wouldn't it make sense to extend the |
Additionally there are some problems with this logic, you will force a passed name to superseede explicit arguments: But don't do anything yet, I think we should first clear out what you want to achieve. |
Basically I have information stored for each orbital in a Then, I have a pandas
I use the n, l, m, Z and name inputs to select an orbital and thanks to pandas this is very simple. With this, I get the indices of the orbitals that I use to query the data from the dataarray. Then, the things that I want:
All in all, I want an orbital selector basically, so implementing it with categories sisl-wide can be nice. Also it will probably be better than my implementation, which currently stores the information as many times as the orbital is present in the geometry. More generally, I think it would be cool to have a class to store orbital resolved data that you can query easily (e.g.
Doesn't this happen already with the current implementation? Anyway, it could easily be solved. |
I like this idea of One thing that really requires some careful thought is how it should be implemented. Here are some thoughts:
I see a couple of possibilities here.
Any ideas would be very nice! |
I exposed the convertion from orbital name to
n, l, m, Z, P
as an static method. This can be very convenient for the visualization module (and maybe other cases) and does not disturb the functionality ofAtomicOrbital
(it passes all tests and does not add extra computation). It also adds some possibilities like providing part of the parameters as a string and the rest as kwargs:Also, I think there was some 3-fold repeated code regarding the setup of spherical orbital, so I condensed it all in one go. It passes all tests so I guess it is correct.
Can this go in so that the visualization module can act magically? :)