Skip to content

Commit

Permalink
Patch over self.rank so that msgpck does not get crazy with numpy.int…
Browse files Browse the repository at this point in the history
…32 (it needs int types)
  • Loading branch information
JosePizarro3 committed May 30, 2024
1 parent f10801b commit d041712
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/nomad_simulations/properties/band_structure.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(
) -> None:
super().__init__(m_def, m_context, **kwargs)
# ! `n_bands` need to be set up during initialization of the class
self.rank = [self.n_bands]
self.rank = [int(self.n_bands)]

def normalize(self, archive, logger) -> None:
super().normalize(archive, logger)
Expand Down
2 changes: 1 addition & 1 deletion src/nomad_simulations/properties/fermi_surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(
) -> None:
super().__init__(m_def, m_context, **kwargs)
# ! `n_bands` need to be set up during initialization of the class
self.rank = [self.n_bands]
self.rank = [int(self.n_bands)]
self.name = self.m_def.name

def normalize(self, archive, logger) -> None:
Expand Down
4 changes: 2 additions & 2 deletions src/nomad_simulations/properties/hopping_matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
) -> None:
super().__init__(m_def, m_context, **kwargs)
# ! n_orbitals need to be set up during initialization of the class
self.rank = [self.n_orbitals, self.n_orbitals]
self.rank = [int(self.n_orbitals), int(self.n_orbitals)]
self.name = self.m_def.name

# TODO add normalization to extract DOS, band structure, etc, properties from `HoppingMatrix`
Expand Down Expand Up @@ -97,7 +97,7 @@ def __init__(
) -> None:
super().__init__(m_def, m_context, **kwargs)
# ! `n_orbitals` need to be set up during initialization of the class
self.rank = [self.n_orbitals]
self.rank = [int(self.n_orbitals)]
self.name = self.m_def.name

def normalize(self, archive, logger) -> None:
Expand Down

0 comments on commit d041712

Please sign in to comment.