-
Notifications
You must be signed in to change notification settings - Fork 1
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 ElectronicDOS and XASSpectra properties #54
Conversation
ElectronicDOS
and XASSpectra
properties
ElectronicDOS
and XASSpectra
propertiesb7f7d57
to
33a1871
Compare
Pull Request Test Coverage Report for Build 8875188200Details
💛 - Coveralls |
163e0cc
to
f8a8426
Compare
f8a8426
to
6eb1b5f
Compare
e265c43
to
9c3c6ed
Compare
Added iri to quantity in PhysicalProperty
Fix __setattr__ in PhysicalProperty
Added raise ValueError in PhysicalProperty when value is None
Added SpectralProfile, ElectronicSpectralProfile Added basic ElectronicDensityOfStates
Added ElectronicDOS and XASSpectra
Added SpectralProfile, ElectronicDensityOfStates, XASSpectra in spectral_profile.py Check iri assignement in __init__ in PhysicalProperty Fixed ElectronicBandGap
…fStates Added initial test modules
1b00e42
to
df913b0
Compare
Thanks @JosePizarro3, I did see this. I will eventually use this as a basis and combine with the other energies that I had written down |
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.
Here's a 1st set of feedback. Revising the tests comes later.
# TODO (cont'd) and `entity_ref` is set) | ||
|
||
|
||
class ElectronicDensityOfStates(DOSProfile): |
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.
Given the complexity of the normalizers in this class, I think it is best to develop an electronic structure post-analysis suite, similar to MatID for symmetries. There already exist PyProcar
and ASH
, but they're fairly limited and code specific.
@JFRudzinski where would this fit into our planning? Note that a proper package would be worthy of a publication!
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.
I think it is best to develop an electronic structure post-analysis suite, similar to MatID for symmetries.
Yeah it might be, but we need the whole picture first. IMO, we could publish this repo as it is, and later think of some post-processing analysis tools which could be generalized. As of now, it is true that I am trying to keep as much as possible from the former normalization, but improving the schema.
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.
Okay, the standalone module is more an idea for down the line (@JFRudzinski would also like your feedback) and a way to get an easy paper. I'm not suggesting this for now! Still, it feels a bit out of place compared to the simpler, and more to-the-point checks that make up most of the other normalizers.
What is relevant at the moment, though, is stress testing these algos. We have numerous cases in our repo, where the band structure or DOS extraction fail, and it's painful to see. This has always been a very tricky issue.
Since this PR focuses on migrating and extending the schema, I implore you to open a new issue where we tackle this aspect. In the meantime, I'll think up more test cases.
@ndaelman-hu thanks for the comments Would you mind checking again? I can also discuss the details on implementation is something is unclear. |
Okay, will take a look somewhere this evening. |
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.
Almost there. Mostly small stuff, and a bit of reshuffling of where code belongs.
I still need to take a look at larger tests in test_spectral_profile
, but I'll do that after a break.
# TODO (cont'd) and `entity_ref` is set) | ||
|
||
|
||
class ElectronicDensityOfStates(DOSProfile): |
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.
Okay, the standalone module is more an idea for down the line (@JFRudzinski would also like your feedback) and a way to get an easy paper. I'm not suggesting this for now! Still, it feels a bit out of place compared to the simpler, and more to-the-point checks that make up most of the other normalizers.
What is relevant at the moment, though, is stress testing these algos. We have numerous cases in our repo, where the band structure or DOS extraction fail, and it's painful to see. This has always been a very tricky issue.
Since this PR focuses on migrating and extending the schema, I implore you to open a new issue where we tackle this aspect. In the meantime, I'll think up more test cases.
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.
So, I brought up some additional edge cases to test for.
The failing tests are what worry me most, though. Since it is all related to the pDOS, it could be tackled in a separate issue, but that has to be high on the priority list.
Regarding DOS in general, it really doesn't merit a fundamentally different treatment from other spectra. I think we can have a single class where name
is used to specify the profile type.
Ok, tricky error in the conftest for fixing the testing for pDOS: I need to create a full |
Ok, finished. @ndaelman-hu do you mind checking before going on holidays? Thanks! |
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.
All good, thank you very much!!
self.m_cache['lowest_occupied_energy'] = lowest_occupied_energy | ||
|
||
# Set thresholds for the energies and values | ||
energy_threshold = config.normalize.band_structure_energy_tolerance |
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.
My IDE is telling me that config
has no member normalize
. Are you using a different branch then develop
for your base nomad
installation?
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.
I am using a branch where I added this repo as a submodule. I saw the config and models/config + check locally and I can use the normalize no problem.
Thanks @ndaelman-hu ! I am merging this and continue working on #52 |
@ndaelman-hu
@JFRudzinski @Bernadette-Mohr only for you: I added
properties/energies.py
and a couple of properties,FermiLevel
andChemicalPotential
. You can disregard the rest of the message.I just finished this initial version. Mainly, you have to check
properties/spectral_profile.py
andproperties/energies.py
. I added some tests, but I have the issue that I would need some other sections in order to properly test the functionalities inElectronicDensityOfStates
, namely, I needElectronicEigenvalues
containing the info of thehighest_occupied_energy
andlowest_occupied_energy
.Besides these, I changed
OrbitalsState
andAtomsState
to inherit fromEntity
. Do you mind giving your thoughts in here? I wanted to give anentity_ref
that can be used to reference if a property is atomic or orbitally resolved, e.g., the projected DOS (but there might be others).