Skip to content

Commit

Permalink
ensure realification of PGIrreps and SiteIrreps produce correct M…
Browse files Browse the repository at this point in the history
…ulliken labels
  • Loading branch information
thchr committed Sep 13, 2024
1 parent 0b2b2d7 commit 565003e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 6 deletions.
41 changes: 38 additions & 3 deletions src/irreps_reality.jl
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,15 @@ function realify(irs::AbstractVector{T}) where T<:AbstractIrrep
push!(skiplist, idx_partner)

ir_partner = irs[idx_partner]
blockmatrices = _blockdiag2x2.(ir.matrices, ir_partner.matrices)
newlab = label(ir)*label(ir_partner)

blockmatrices = _blockdiag2x2.(ir.matrices, ir_partner.matrices)
if T <: PGIrrep || T <: SiteIrrep
# if `irs` were a SiteIrrep or PGIrrep w/ Mulliken labels, we may have to
# manually abbreviate the composite label
newlab = _abbreviated_mulliken_corep_label(label(ir), label(ir_partner))
else
newlab = label(ir)*label(ir_partner)
end

elseif r == PSEUDOREAL
# NB: this case doesn't actually ever arise for crystallographic point groups...
blockmatrices = _blockdiag2x2.(ir.matrices)
Expand Down Expand Up @@ -359,6 +365,35 @@ function _blockdiag2x2(A::AbstractMatrix{T}) where T
return B
end

# ---------------------------------------------------------------------------------------- #
function _abbreviated_mulliken_corep_label(lab1, lab2)
# the Mulliken label of a corep is not always the concatenation of the Mulliken labels
# of the associated irrep labels, because the corep label is sometimes abbreviated
# relative to the concatenated form; this only occurs for COMPLEX labels where the
# abbreviation will remove repeated pre-superscript labels; we fix it below in a
# slightly dull way by just checking the abbreviation-exceptions manually listed in
# `MULLIKEN_LABEL_REALITY_EXCEPTIONS` and abbreviating accordingly; if not an exception
# it is still the concatenation of irrep-labels
MULLIKEN_LABEL_REALITY_EXCEPTIONS = (
("²E", "¹E") => "E",
("²Eg", "¹Eg") => "Eg",
("²Eᵤ", "¹Eᵤ") => "Eᵤ",
("²E₁", "¹E₁") => "E₁",
("²E₂", "¹E₂") => "E₂",
("²E′", "¹E′") => "E′",
("²E′′", "¹E′′") => "E′′",
("²E₁g", "¹E₁g") => "E₁g",
("²E₁ᵤ", "¹E₁ᵤ") => "E₁ᵤ",
("²E₂g", "¹E₂g") => "E₂g",
("²E₂ᵤ", "¹E₂ᵤ") => "E₂ᵤ")
for (lab1′lab2′, abbreviated_lab1′lab2′) in MULLIKEN_LABEL_REALITY_EXCEPTIONS
if (lab1, lab2) == lab1′lab2′ || (lab2, lab1) == lab1′lab2′
return abbreviated_lab1′lab2′
end
end
return lab1*lab2
end
# ---------------------------------------------------------------------------------------- #
@doc raw"""
calc_reality(lgir::LGIrrep,
sgops::AbstractVector{SymOperation{D}},
Expand Down
7 changes: 4 additions & 3 deletions test/notation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,12 @@ using Crystalline, Test
pgirs_mulliken = pgirreps("6", Val(D); mulliken=true)
@test label.(pgirs_mulliken) == mulliken.(pgirs)

# FIXME: we currently don't do nontrivial reductions of Mulliken labels during
# "realification"...
# we do some reductions of Mulliken labels during "realification"; check that
# this works the same across `label.(realify(pgirreps(..; mulliken=true)))`
# and `mulliken.(realify(pgirreps(..)))`
pgirs′ = realify(pgirs)
pgirs_mulliken′ = realify(pgirs_mulliken)
@test_broken label.(pgirs_mulliken′) == mulliken.(pgirs′)
@test label.(pgirs_mulliken′) == mulliken.(pgirs′)
end
# 1D
@test label.(pgirreps("m", Val(1); mulliken=true)) == mulliken.(pgirreps("m", Val(1))) == ["A′", "A′′"]
Expand Down

0 comments on commit 565003e

Please sign in to comment.