def _symmetrize_reducible_collision_matrix(self):
        import anharmonic._phono3py as phono3c
        phono3c.symmetrize_collision_matrix(self._collision_matrix)
        
        # Average matrix elements belonging to degenerate bands
        col_mat = self._collision_matrix
        for i, gp in enumerate(self._ir_grid_points):
            freqs = self._frequencies[gp]
            deg_sets = degenerate_sets(freqs)
            for dset in deg_sets:
                bi_set = []
                for j in range(len(freqs)):
                    if j in dset:
                        bi_set.append(j)
                sum_col = (col_mat[:, :, i, bi_set, :, :].sum(axis=2) /
                           len(bi_set))
                for j in bi_set:
                    col_mat[:, :, i, j, :, :] = sum_col

        for i, gp in enumerate(self._ir_grid_points):
            freqs = self._frequencies[gp]
            deg_sets = degenerate_sets(freqs)
            for dset in deg_sets:
                bi_set = []
                for j in range(len(freqs)):
                    if j in dset:
                        bi_set.append(j)
                sum_col = (col_mat[:, :, :, :, i, bi_set].sum(axis=4) /
                           len(bi_set))
                for j in bi_set:
                    col_mat[:, :, :, :, i, j] = sum_col
Beispiel #2
0
    def _symmetrize_reducible_collision_matrix(self):
        import anharmonic._phono3py as phono3c
        phono3c.symmetrize_collision_matrix(self._collision_matrix)
        
        # Average matrix elements belonging to degenerate bands
        col_mat = self._collision_matrix
        for i, gp in enumerate(self._ir_grid_points):
            freqs = self._frequencies[gp]
            deg_sets = degenerate_sets(freqs)
            for dset in deg_sets:
                bi_set = []
                for j in range(len(freqs)):
                    if j in dset:
                        bi_set.append(j)
                sum_col = (col_mat[:, :, i, bi_set, :, :].sum(axis=2) /
                           len(bi_set))
                for j in bi_set:
                    col_mat[:, :, i, j, :, :] = sum_col

        for i, gp in enumerate(self._ir_grid_points):
            freqs = self._frequencies[gp]
            deg_sets = degenerate_sets(freqs)
            for dset in deg_sets:
                bi_set = []
                for j in range(len(freqs)):
                    if j in dset:
                        bi_set.append(j)
                sum_col = (col_mat[:, :, :, :, i, bi_set].sum(axis=4) /
                           len(bi_set))
                for j in bi_set:
                    col_mat[:, :, :, :, i, j] = sum_col