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

Add ElectronicEigenvalues and ElectronicBandStructure properties #63

Merged
merged 15 commits into from
Jun 3, 2024

Conversation

JosePizarro3
Copy link
Collaborator

@JosePizarro3 JosePizarro3 commented May 13, 2024

This pr contains the definition for the former ElectronicBandStructure with the new schema (PhysicalProperties and Variables), as well as the new property ElectronicEigenvalues. During development, I also wanted to define FermiSurface, but this makes more sense in a separate pr (#78).

Some important changes with respect to the old schema and normalization:

  • Now, there is a value_contributions whose objective is to group all the former stuff that was in BandEnergies as value_<name-of-the-contribution>
  • Now there is not a concept of segments. I rather changed for storing KLinePath(Variables).points as a flat list of points
  • I completely restructured the old add_band_gap normalization. Now, we have extract_band_gap and, mainly, resolve_homo_lumo_eigenvalues to handle this.
  • The old get_special_points function is re-defined under numerical_settings.py:KMesh. This was a very buggy function, specially when the path is not defined for points related by symmetry (e.g., 'X' is both [0.5, 0, 0] and [-0.5, 0, 0]. Now we aim people to define the strings related with the high symmetry points OR manually define the path.

One question is whether reciprocal_cell will be still here in this schema or we can resolve it in another way. This quantity is only interesting for the front end.

@JosePizarro3 JosePizarro3 linked an issue May 13, 2024 that may be closed by this pull request
@JosePizarro3 JosePizarro3 force-pushed the 52-add-electroniceigenvalues-physical-property branch from 0f4b8a5 to 51f4b49 Compare May 15, 2024 12:31
@coveralls
Copy link

coveralls commented May 15, 2024

Pull Request Test Coverage Report for Build 9347862591

Details

  • 139 of 140 (99.29%) changed or added relevant lines in 8 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 98.681%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tests/conftest.py 20 21 95.24%
Totals Coverage Status
Change from base Build 9269679463: 0.07%
Covered Lines: 898
Relevant Lines: 910

💛 - Coveralls

@JosePizarro3 JosePizarro3 force-pushed the 52-add-electroniceigenvalues-physical-property branch from 73f47af to f6c74aa Compare May 16, 2024 08:49
@JosePizarro3 JosePizarro3 self-assigned this May 16, 2024
@JosePizarro3 JosePizarro3 changed the title Add ElectronicEigenvalues, ElectronicBandStructure, FermiSurface properties Add ElectronicEigenvalues and ElectronicBandStructure properties May 16, 2024
@JosePizarro3 JosePizarro3 force-pushed the 52-add-electroniceigenvalues-physical-property branch 2 times, most recently from 9e4ce18 to 16171c5 Compare May 27, 2024 14:22
Added KLinePath and KMesh variables with refs to the NumericalSettings sections
…completely crazy....... I had to squash all the shit into one single commit. It was that, or just killing myself.
@JosePizarro3 JosePizarro3 force-pushed the 52-add-electroniceigenvalues-physical-property branch from 16171c5 to 90edd52 Compare May 28, 2024 14:26
@JosePizarro3
Copy link
Collaborator Author

Hey @ladinesa this is the pr I told you about.

The focus should be the changes in the new module, src/nomad_simulations/properties/band_structure.py. I still have some todos, but I moved them to separated issues (#77 #78 #79).

Thanks!

@JosePizarro3 JosePizarro3 requested a review from ladinesa May 30, 2024 11:33
@JosePizarro3 JosePizarro3 requested a review from ndaelman-hu May 30, 2024 13:05
@ladinesa
Copy link
Collaborator

Looks all fine to me except for some minor improvements. Do I check also the tests?

@JosePizarro3
Copy link
Collaborator Author

Looks all fine to me except for some minor improvements. Do I check also the tests?

Thanks! I think the tests are just there to help understand the code, so up to you. Coverage is 99% (whatever that means 😅), so I guess I did a good job.

src/nomad_simulations/numerical_settings.py Outdated Show resolved Hide resolved
.vscode/settings.json Outdated Show resolved Hide resolved
src/nomad_simulations/numerical_settings.py Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
src/nomad_simulations/properties/band_structure.py Outdated Show resolved Hide resolved
@JosePizarro3 JosePizarro3 force-pushed the 52-add-electroniceigenvalues-physical-property branch from f8fdb29 to 976adf5 Compare June 3, 2024 09:10
@JosePizarro3
Copy link
Collaborator Author

JosePizarro3 commented Jun 3, 2024

Ok, this pr is ready. I added also a validator for comparing a quantity with respect to value in any PhysicalProperty, to ensure consistence in all the cases where we don't want to consider a quantity a physical property, but to be actually under an existing one.

Thanks for the review @ladinesa @ndaelman-hu ! 🥳

@JosePizarro3 JosePizarro3 merged commit 51e9401 into develop Jun 3, 2024
4 checks passed
@JosePizarro3 JosePizarro3 deleted the 52-add-electroniceigenvalues-physical-property branch June 3, 2024 14:44
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.

Add ElectronicEigenvalues and ElectronicBandStructure properties
4 participants