phonopy/test/phonon/test_irreps.py

1220 lines
58 KiB
Python

"""Tests for irreducible representation calculations."""
from __future__ import annotations
import os
from io import StringIO
import numpy as np
import phonopy
from phonopy import Phonopy
from phonopy.interface.vasp import read_vasp
data_dir = os.path.dirname(os.path.abspath(__file__))
chars_P2 = """ 1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0."""
chars_Pc = """ 1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1. 0.
1. 0. -1. 0.
1. 0. 1. 0.
1. 0. -1.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1. 0. -0. 0. -1. 0.
3. 0. 1. 0. -1. 0. 1. 0. -1. 0. -1. 0. -1. 0. -1. 0. 0. 0. -1. 0. 0. 0. 1. 0. 0. 0. -1. 0. -0. 0. 1. 0. 0. 0. 1. 0. -0. 0. -1. 0. 0. 0. -1. 0. 0. 0. 1. 0.
3. 0. -1. 0. -1. 0. -1. 0. -1. 0. 1. 0. -1. 0. 1. 0. 0. 0. 1. 0. -0. 0. -1. 0. -0. 0. 1. 0. 0. 0. -1. 0. 0. 0. -1. 0. 0. 0. 1. 0. -0. 0. 1. 0. -0. 0. -1. 0.
1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0. 1. 0.
3. 0. -1. 0. -1. 0. -1. 0. -1. 0. 1. 0. -1. 0. 1. 0. -0. 0. 1. 0. 0. 0. -1. 0. 0. 0. 1. 0. -0. 0. -1. 0. -0. 0. -1. 0. -0. 0. 1. 0. 0. 0. 1. 0. 0. 0. -1. 0."""
def test_pt03_P2():
"""Test of pt03_P2."""
data = _load_data(chars_P2)
phonon = _get_phonon("P2", [3, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [[0, 0, 0.5]] # V
assert set(phonon.irreps.rotation_symbols) == set(["E", "C2"])
_check_char_sum(phonon, qpoints)
def test_pt04_Pc():
"""Test of pt04_Pc."""
data = _load_data(chars_Pc)
phonon = _get_phonon("Pc", [2, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [[0, 0.5, 0]] # GA
assert set(phonon.irreps.rotation_symbols) == set(["E", "sgh"])
_check_char_sum(phonon, qpoints)
def test_pt06_P222_1():
"""Test of pt06_P222_1."""
data = _load_data(chars_P222_1)
phonon = _get_phonon("P222_1", [2, 2, 1], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0, 0],
[0, 0.5, 0],
[0, 0, 0.5],
[0.5, 0.5, 0],
[0.5, 0, 0.5],
[0, 0.5, 0.5],
[0.5, 0.5, 0.5],
] # X, Y, Z, S, U, T, R
assert set(phonon.irreps.rotation_symbols) == set(["E", "C2", "C2x", "C2y"])
_check_char_sum(phonon, qpoints)
def test_pt07_Amm2():
"""Test of pt07_Amm2."""
data = _load_data(chars_Amm2)
phonon = _get_phonon("Amm2", [3, 2, 2], [[1, 0, 0], [0, 0.5, -0.5], [0, 0.5, 0.5]])
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, -0.5],
[0.5, 0, -0.5],
[0.5, 0, 0],
[0, 0.25, -0.25],
[0.5, 0.25, -0.25],
]
assert set(phonon.irreps.rotation_symbols) == set(["E", "C2", "sgvyz", "sgvxz"])
_check_char_sum(phonon, qpoints)
def test_pt09_P4_1():
"""Test of pt09_P4_1."""
data = _load_data(chars_P4_1)
phonon = _get_phonon("P4_1", [2, 2, 1], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [[0, 0, 0.5]]
assert set(phonon.irreps.rotation_symbols) == set(["E", "C4", "C2", "C4"])
_check_char_sum(phonon, qpoints)
def test_pt10_Pbar4():
"""Test of pt10_Pbar4."""
data = _load_data(chars_Pbar4)
phonon = _get_phonon("P-4", [1, 1, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[0.5, 0.5, 0],
[0.5, 0.5, 0.5],
] # Z, M, A
assert set(phonon.irreps.rotation_symbols) == set(["E", "S4", "C2", "S4"])
_check_char_sum(phonon, qpoints)
def test_pt11_I4_1a():
"""Test of pt11_I4_1a."""
data = _load_data(chars_I4_1a)
phonon = _get_phonon(
"I4_1a", [2, 2, 1], np.array([[-1, 1, 1], [1, -1, 1], [1, 1, -1]]) * 0.5
)
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, -0.5],
[0, 0, 0.5],
[0.25, 0.25, 0.25],
[0, 0.5, 0],
] # M, X, P, N
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C4", "C2", "C4", "i", "S4", "sgh", "S4"]
)
_check_char_sum(phonon, qpoints)
def test_pt13_P4mm():
"""Test of pt13_P4mm."""
data = _load_data(chars_P4mm)
phonon = _get_phonon("P4mm", [3, 3, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[0.5, 0.5, 0.5],
[0, 0.5, 0.5],
] # LD, V, W
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C4", "C2", "C4", "sgv", "sgd", "sgv", "sgd"]
)
_check_char_sum(phonon, qpoints)
def test_pt14_Pbar42_1m():
"""Test of pt14_Pbar42_1m."""
data = _load_data(chars_Pbar42_1m)
phonon = _get_phonon("P-42_1m", [2, 2, 3], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, 0.5],
[0, 0, 0.5],
[0.5, 0.5, 0],
[0, 0.5, 0],
[0, 0.5, 0.5],
] # A, Z, M, X, R
assert set(phonon.irreps.rotation_symbols) == set(
["E", "S4", "C2z", "S4", "C2'", "sgd", "C2'", "sgd"]
)
_check_char_sum(phonon, qpoints)
def test_pt19_P3m1():
"""Test of pt19_P3m1."""
data = _load_data(chars_P3m1)
phonon = _get_phonon("P3m1", [4, 4, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 1 / 2],
] # DT, P
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C3", "C3", "sgv", "sgv", "sgv"]
)
_check_char_sum(phonon, qpoints)
def test_pt19_P31m():
"""Test of pt19_P31m."""
data = _load_data(chars_P31m)
phonon = _get_phonon("P31m", [1, 1, 3], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
# _show_chars(chars)
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 1 / 2],
] # DT, P
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C3", "C3", "sgv", "sgv", "sgv"]
)
_check_char_sum(phonon, qpoints)
def test_pt20_Pbar3m1():
"""Test of pt20_Pbar3m1."""
data = _load_data(chars_Pbar3m1)
phonon = _get_phonon("P-3m1", [3, 3, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 0],
[1.0 / 3, 1.0 / 3, 0.5],
[0.5, 0, 0],
[0.5, 0, 0.5],
] # A, K, H, M, L
assert set(phonon.irreps.rotation_symbols) == set(
["E", "i", "C3", "S6", "C3", "S6", "C2'", "sgd", "C2'", "sgd", "C2'", "sgd"]
)
_check_char_sum(phonon, qpoints)
def test_pt21_P6():
"""Test of pt21_P6."""
data = _load_data(chars_P6)
phonon = _get_phonon("P6", [2, 2, 1], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 0.5],
] # DT, H
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C6", "C3", "C2", "C3", "C6"]
)
_check_char_sum(phonon, qpoints)
def test_pt22_Pbar6():
"""Test of pt22_Pbar6."""
data = _load_data(chars_Pbar6)
phonon = _get_phonon("P-6", [1, 1, 3], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[2.0 / 3, -1.0 / 3, 0],
[2.0 / 3, -1.0 / 3, 0.5],
[1.0 / 3, 1.0 / 3, 0],
[1.0 / 3, 1.0 / 3, 0.5],
] # A, KA, HA, K, H
assert set(phonon.irreps.rotation_symbols) == set(
["E", "S3", "C3", "sgh", "C3", "S3"]
)
_check_char_sum(phonon, qpoints)
def test_pt24_P6_222():
"""Test of pt24_P6_222."""
data = _load_data(chars_P6_222)
phonon = _get_phonon("P6_222", [2, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 0],
[1.0 / 3, 1.0 / 3, 0.5],
[0.5, 0, 0],
[0.5, 0, 0.5],
] # A, K, H, M, L
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C6", "C3", "C2", "C3", "C6", "C2''", "C2'", "C2''", "C2'", "C2''", "C2'"]
)
_check_char_sum(phonon, qpoints)
def test_pt26_Pbar6m2():
"""Test of pt26_Pbar6m2."""
data = _load_data(chars_Pbar6m2)
phonon = _get_phonon("P-6m2", [2, 2, 3], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0, 0, 0.5],
[1.0 / 3, 1.0 / 3, 0],
[1.0 / 3, 1.0 / 3, 0.5],
] # A, K, H
assert set(phonon.irreps.rotation_symbols) == set(
["E", "S3", "C3", "sgh", "C3", "S3", "C'2", "sgv", "C'2", "sgv", "C'2", "sgv"]
)
_check_char_sum(phonon, qpoints)
def test_pt28_P2_13():
"""Test of pt28_P2_13."""
data = _load_data(chars_P2_13)
phonon = _get_phonon("P2_13", [2, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, 0.5],
[0.5, 0.5, 0],
[0, 0.5, 0],
] # R, M, X
assert set(phonon.irreps.rotation_symbols) == set(
["E", "C2", "C2", "C2", "C3", "C3", "C3", "C3", "C3", "C3", "C3", "C3"]
)
_check_char_sum(phonon, qpoints)
def test_pt29_Pabar3():
"""Test of pt29_Pabar3."""
data = _load_data(chars_Pabar3)
phonon = _get_phonon("Pa-3", [2, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, 0.5],
[0.5, 0.5, 0],
[0, 0.5, 0],
] # R, M, X
assert set(phonon.irreps.rotation_symbols) == set(
[
"E",
"i",
"C2",
"sgh",
"C2",
"sgh",
"C2",
"sgh",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
"C3",
"S6",
]
)
_check_char_sum(phonon, qpoints)
def test_pt30_P4_332():
"""Test of pt30_P4_332."""
data = _load_data(chars_P4_332)
phonon = _get_phonon("P4_332", [1, 1, 1], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, 0.5],
[0.5, 0.5, 0],
[0, 0.5, 0],
] # R, M, X
assert set(phonon.irreps.rotation_symbols) == set(
[
"E",
"C4",
"C2",
"C4",
"C2",
"C2'",
"C2",
"C2'",
"C3",
"C2'",
"C3",
"C4",
"C3",
"C2'",
"C3",
"C4",
"C3",
"C4",
"C3",
"C2'",
"C3",
"C2'",
"C3",
"C4",
]
)
_check_char_sum(phonon, qpoints)
def test_pt31_Pbar43m():
"""Test of pt31_Pbar43m."""
data = _load_data(chars_Pbar43m)
phonon = _get_phonon("P-43m", [2, 2, 2], np.eye(3))
phonon.set_irreps([0, 0, 0])
chars = phonon.irreps.characters
np.testing.assert_allclose(chars, data, atol=1e-5)
qpoints = [
[0.5, 0.5, 0.5],
[0.5, 0.5, 0],
[0, 0.5, 0],
] # R, M, X
assert set(phonon.irreps.rotation_symbols) == set(
[
"E",
"S4",
"C2",
"S4",
"C2",
"sgd",
"C2",
"sgd",
"C3",
"sgd",
"C3",
"S4",
"C3",
"sgd",
"C3",
"S4",
"C3",
"S4",
"C3",
"sgd",
"C3",
"sgd",
"C3",
"S4",
]
)
_check_char_sum(phonon, qpoints)
def _get_phonon(spgtype, dim, pmat):
cell = read_vasp(os.path.join(data_dir, "POSCAR_%s" % spgtype))
filename = os.path.join(data_dir, "FORCE_SETS_%s" % spgtype)
phonon = phonopy.load(
unitcell=cell,
supercell_matrix=np.diag(dim),
primitive_matrix=pmat,
force_sets_filename=filename,
symmetrize_fc=False,
)
print(phonon.symmetry.pointgroup_symbol)
return phonon
def _show_chars(chars):
for line in chars:
line_str = str(line.view(dtype="double").round(decimals=1))
print(line_str.replace("[", "").replace("]", ""))
def _load_data(data_str):
data = np.loadtxt(StringIO(data_str))
data = data.view(dtype="c%d" % (data.itemsize * 2))
return data
def _check_char_sum(phonon: Phonopy, qpoints: list):
print("space-group number:", phonon.symmetry.dataset.number)
for q in qpoints:
phonon.set_irreps(q)
print(phonon.irreps.qpoint, end="")
order = len(phonon.irreps.conventional_rotations)
char_sums = []
for i, (irreps, chars) in enumerate(
zip(phonon.irreps.irreps, phonon.irreps.characters)
):
char_sum = 0
for irrep, char in zip(irreps, chars):
_char = np.trace(irrep)
np.testing.assert_almost_equal(_char, char)
char_sum += char.conj() * char
char_sum = abs(char_sum)
dim = int(np.rint(char_sum / order))
assert abs(char_sum - dim * order) < 1e-5
# print(i + 1, char_sum, order)
assert dim in [1, 2, 4]
if dim == 1: # maybe physically irreducible (dim > 1)
char_sums.append(char_sum)
if char_sums: # Can be empty due to physically irreducible irreps.
np.testing.assert_allclose(char_sums, order, atol=1e-5)
if len(char_sums) < len(phonon.irreps.irreps):
print(" ** Physically irreps may exist. **")
else:
print()