本文整理匯總了Python中phonopy.Phonopy.get_irreps方法的典型用法代碼示例。如果您正苦於以下問題:Python Phonopy.get_irreps方法的具體用法?Python Phonopy.get_irreps怎麽用?Python Phonopy.get_irreps使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phonopy.Phonopy
的用法示例。
在下文中一共展示了Phonopy.get_irreps方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: read_vasp
# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import get_irreps [as 別名]
from phonopy import Phonopy
from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_FORCE_SETS, parse_BORN
import numpy as np
cell = read_vasp("POSCAR")
# Initialize phonon. Supercell matrix has to have the shape of (3, 3)
phonon = Phonopy(cell, np.diag([3, 3, 2]))
symmetry = phonon.get_symmetry()
print "Space group:", symmetry.get_international_table()
force_sets = parse_FORCE_SETS()
phonon.set_displacement_dataset(force_sets)
phonon.produce_force_constants()
# Character table
phonon.set_irreps([1./3, 1./3, 0], 1e-4)
ct = phonon.get_irreps()
band_indices = ct.get_band_indices()
characters = np.rint(ct.get_characters()).real
for bi, cts in zip(band_indices, characters):
print np.array(bi) + 1, cts
# phonon.show_character_table()