Skip to content

Commit

Permalink
fix conversion from pmg phonon bs
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetretto committed Sep 11, 2023
1 parent cc34246 commit 97c167f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions abipy/dfpt/phonons.py
Original file line number Diff line number Diff line change
Expand Up @@ -2387,7 +2387,7 @@ def from_pmg_bs(cls, pmg_bs: PhononBandStructureSymmLine, structure=None) -> Pho
phfreqs.extend(pmg_bs.bands.T[start_index:b["end_index"] + 1])
if pmg_bs.has_eigendisplacements:
e = pmg_bs.eigendisplacements[:, start_index:b["end_index"] + 1]
e = np.transpose(e, [0, 1, 2, 3])
e = np.transpose(e, [1, 0, 2, 3])
e = np.reshape(e, e.shape[:-2] + (-1,))
phdispl_cart.extend(e)

Expand All @@ -2400,7 +2400,6 @@ def from_pmg_bs(cls, pmg_bs: PhononBandStructureSymmLine, structure=None) -> Pho
if not phdispl_cart:
phdispl_cart = np.zeros((len(phfreqs), n_modes, n_modes))
else:
#print(phdispl_cart)
phdispl_cart = np.array(phdispl_cart)

na = None
Expand Down

0 comments on commit 97c167f

Please sign in to comment.