Skip to content

Commit

Permalink
explaining comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedabdelkawy committed Nov 14, 2023
1 parent 7c06301 commit df2385f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pyiron_atomistics/sphinx/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -2284,10 +2284,10 @@ def n_steps(self):

def _parse_band(self, term):
arr = np.loadtxt(re.findall(term, self.log_main, re.MULTILINE))
shape = (-1, len(self.k_points), 1, arr.shape[-1])
shape = (-1, len(self.k_points), 1, arr.shape[-1]) # 1 -> one spin channel for consistency and for the transpose to work
if self.spin_enabled:
shape = (-1, len(self.k_points), 2, shape[-1])
return arr.reshape(shape).transpose(0,2,1,3)
shape = (-1, len(self.k_points), 2, shape[-1]) #eigen values order in sphinx log: shape = (n_ionic_steps, n_kpoints, n_spin_channnels, n_bands)
return arr.reshape(shape).transpose(0,2,1,3) # the transpose to be consistent with other parsers and for get_density_of_states() to work

def get_band_energy(self):
return self._parse_band("final eig \[eV\]:(.*)$")
Expand Down

0 comments on commit df2385f

Please sign in to comment.