當前位置: 首頁>>代碼示例>>Python>>正文


Python Phonopy.get_dynamical_matrix方法代碼示例

本文整理匯總了Python中phonopy.Phonopy.get_dynamical_matrix方法的典型用法代碼示例。如果您正苦於以下問題:Python Phonopy.get_dynamical_matrix方法的具體用法?Python Phonopy.get_dynamical_matrix怎麽用?Python Phonopy.get_dynamical_matrix使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在phonopy.Phonopy的用法示例。


在下文中一共展示了Phonopy.get_dynamical_matrix方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: read_vasp

# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import get_dynamical_matrix [as 別名]
from phonopy.structure.symmetry import Symmetry
from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_FORCE_SETS, parse_BORN
from phonopy.structure.spglib import get_stabilized_reciprocal_mesh
from phonopy.structure.tetrahedron_method import TetrahedronMethod
from phonopy.phonon.tetrahedron_mesh import TetrahedronMesh

cell = read_vasp(sys.argv[1])
phonon = Phonopy(cell, [[2, 0, 0], [0, 2, 0], [0, 0, 2]], is_auto_displacements=False)
force_sets = parse_FORCE_SETS()
phonon.set_force_sets(force_sets)
phonon.set_post_process([[0, 0.5, 0.5], [0.5, 0, 0.5], [0.5, 0.5, 0]])
primitive = phonon.get_primitive()
born = parse_BORN(primitive)
phonon.set_nac_params(born)
symmetry = phonon.get_primitive_symmetry()
mesh = [20, 20, 20]
# phonon.set_mesh(mesh)
# phonon.set_total_DOS(sigma=0.1)
# phonon.plot_total_DOS().show()

rotations = symmetry.get_pointgroup_operations()
thm = TetrahedronMesh(phonon.get_dynamical_matrix(),
                      mesh,
                      rotations,
                      is_gamma_center=True)
                      
thm.run_dos()
for f, iw in zip(thm.get_frequency_points(), thm.get_integration_weights()):
    print f, iw
開發者ID:Johnson-Wang,項目名稱:phonopy,代碼行數:32,代碼來源:tetrahedron_method.py

示例2: get_band

# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import get_dynamical_matrix [as 別名]
print phonon.get_symmetry().get_international_table()
primitive = phonon.get_primitive()
reclat = np.linalg.inv(primitive.get_cell())
print reclat

ndiv = 100
band = get_band([0.0, 0.0, 0.0], [0.5, 0.5, 0.0], ndiv)
bands = [band]
phonon.set_band_structure(bands)

#
# Run1
#
band_index = 2
vg = GroupVelocity(phonon.get_dynamical_matrix(), phonon.get_primitive(), q_length=1e-5)
q_points = band

vg.set_q_points(q_points)
# vg.get_group_velocity() => narray[q, xyz, band]

direction = [0, 0, 1]
unit_n = np.array(direction, dtype=float) / np.linalg.norm(direction)
velo_001 = np.dot(vg.get_group_velocity()[:, band_index, :], unit_n)

direction = [0, 1, 1]
unit_n = np.array(direction, dtype=float) / np.linalg.norm(direction)
velo_011 = np.dot(vg.get_group_velocity()[:, band_index, :], unit_n)

band = phonon.get_band_structure()
distances = band[1][0]
開發者ID:Johnson-Wang,項目名稱:phonopy,代碼行數:32,代碼來源:MgO-group-velocity.py


注:本文中的phonopy.Phonopy.get_dynamical_matrix方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。