irreducible-representations / irrep

GNU General Public License v3.0
61 stars 32 forks source link

Error message suggests shiftUC and refUC #64

Closed gersonjferreira closed 4 months ago

gersonjferreira commented 1 year ago

Related to issue #63

if kname is informed, but kpoint does not match the ones on the tables, it could be because the correct k point is related to the informed one by a spacegroup operation.

The new code searches for possible refUC and shiftUC to fix this discrepancy and presents the alternatives as a report added to the RuntimeError.

For instance, for graphene the tables contain the K point, but the DFT could be using K'. The original code can transform between equivalent K points, but it can't transform from K to K'. In this PR, we add a suggestion of refUC and shiftUC that applies this kind of transformation.

Similarly, still in graphene, there are three inequivalent M points. Or in rock-salt materials, there are four inequivalent L points. And so on. These points are inequivalent, because they are not related by a reciprocal vector translation. But they are related by a spacegroup operation. So we loop over the space group operations to search for refUC and shiftUC candidates to inform the user.