Skip to content

Commit

Permalink
Definitely, git is trash sometimes. I hate when rebasing and it gets …
Browse files Browse the repository at this point in the history
…completely crazy....... I had to squash all the shit into one single commit. It was that, or just killing myself.
  • Loading branch information
JosePizarro3 committed May 28, 2024
1 parent 4f5d516 commit 90edd52
Show file tree
Hide file tree
Showing 14 changed files with 922 additions and 64 deletions.
24 changes: 0 additions & 24 deletions .vscode/settings.json

This file was deleted.

6 changes: 4 additions & 2 deletions src/nomad_simulations/numerical_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

import numpy as np
import pint
import itertools
from itertools import accumulate, tee, chain
from structlog.stdlib import BoundLogger
from typing import Optional, List, Tuple, Union
from typing import Optional, List, Tuple, Union, Dict
from ase.dft.kpoints import monkhorst_pack, get_monkhorst_pack_size_and_offset

from nomad.units import ureg
Expand Down Expand Up @@ -339,6 +339,7 @@ class KMesh(Mesh):
high_symmetry_points = {
'Gamma': [0, 0, 0],
'X': [0.5, 0, 0],
'Y': [0, 0.5, 0],
...
]
""",
Expand Down Expand Up @@ -678,6 +679,7 @@ def resolve_points(
'The `reciprocal_lattice_vectors` are not passed as an input.'
)
return None

# Check if `points_norm` is a list and convert it to a numpy array
if isinstance(points_norm, list):
points_norm = np.array(points_norm)
Expand Down
13 changes: 13 additions & 0 deletions src/nomad_simulations/outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
HoppingMatrix,
ElectronicBandGap,
ElectronicDensityOfStates,
ElectronicEigenvalues,
FermiSurface,
ElectronicBandStructure,
AbsorptionSpectrum,
XASSpectrum,
Permittivity,
Expand Down Expand Up @@ -75,12 +78,22 @@ class Outputs(ArchiveSection):

hopping_matrices = SubSection(sub_section=HoppingMatrix.m_def, repeats=True)

electronic_eigenvalues = SubSection(
sub_section=ElectronicEigenvalues.m_def, repeats=True
)

electronic_band_gaps = SubSection(sub_section=ElectronicBandGap.m_def, repeats=True)

electronic_dos = SubSection(
sub_section=ElectronicDensityOfStates.m_def, repeats=True
)

fermi_surfaces = SubSection(sub_section=FermiSurface.m_def, repeats=True)

electronic_band_structures = SubSection(
sub_section=ElectronicBandStructure.m_def, repeats=True
)

permittivities = SubSection(sub_section=Permittivity.m_def, repeats=True)

absorption_spectra = SubSection(sub_section=AbsorptionSpectrum.m_def, repeats=True)
Expand Down
9 changes: 9 additions & 0 deletions src/nomad_simulations/physical_property.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,20 @@ def __init__(
self, m_def: Section = None, m_context: Context = None, **kwargs
) -> None:
super().__init__(m_def, m_context, **kwargs)

# Checking if IRI is defined
if self.iri is None:
logger.warning(
'The used property is not defined in the FAIRmat taxonomy (https://fairmat-nfdi.github.io/fairmat-taxonomy/). You can contribute there if you want to extend the list of available materials properties.'
)

# Checking if the quantities `n_` are defined, as this are used to calculate `rank`
for quantity, _ in self.m_def.all_quantities.items():
if quantity.startswith('n_') and getattr(self, quantity) is None:
raise ValueError(
f'`{quantity}` is not defined during initialization of the class.'
)

def __setattr__(self, name: str, val: Any) -> None:
# For the special case of `value`, its `shape` needs to be defined from `_full_shape`
if name == 'value':
Expand Down
2 changes: 2 additions & 0 deletions src/nomad_simulations/properties/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,5 @@
)
from .hopping_matrix import HoppingMatrix, CrystalFieldSplitting
from .permittivity import Permittivity
from .fermi_surface import FermiSurface
from .band_structure import ElectronicEigenvalues, ElectronicBandStructure
Loading

0 comments on commit 90edd52

Please sign in to comment.