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


Python Phonopy.plot_band_structure方法代碼示例

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


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

示例1: range

# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import plot_band_structure [as 別名]
bands.append(band)

q_start = np.array([0, 0, 0])
q_end = np.array([1./3, 1./3, 1./2])
band = []
for i in range(51):
    band.append(q_start + ( q_end - q_start ) / 50 * i)
bands.append(band)

#*********************
# Matplotlib required
#*********************
print "\nPhonon dispersion:"
phonon.set_band_structure(bands,
                          is_eigenvectors=True)
phonon.plot_band_structure(["X", "$\Gamma$", "L"]).show()

bands = phonon.get_band_structure()
distances = bands[1]
frequencies = bands[2]
qpoints = bands[0]

for (qs_at_segments,
     dists_at_segments,
     freqs_at_segments) in zip(qpoints, distances, frequencies):

    for q, d, f in zip(qs_at_segments,
                       dists_at_segments,
                       freqs_at_segments):
        print "# %f %f %f" % tuple(q)
        print d, ("%f " * len(f)) % tuple(f)
開發者ID:arbegla,項目名稱:phonopy,代碼行數:33,代碼來源:Al2O3.py

示例2: append_band

# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import plot_band_structure [as 別名]
# nac_params = {'born': born,
#               'factor': factors,
#               'dielectric': epsilon}
phonon.set_nac_params(nac_params)

# BAND = 0.0 0.0 0.0  0.5 0.0 0.0  0.5 0.5 0.0  0.0 0.0 0.0  0.5 0.5 0.5
bands = []
append_band(bands, [0.0, 0.0, 0.0], [0.5, 0.0, 0.0])
append_band(bands, [0.5, 0.0, 0.0], [0.5, 0.5, 0.0])
append_band(bands, [0.5, 0.5, 0.0], [0.0, 0.0, 0.0])
append_band(bands, [0.0, 0.0, 0.0], [0.5, 0.5, 0.5])
phonon.set_band_structure(bands)
q_points, distances, frequencies, eigvecs = phonon.get_band_structure()
for q, d, freq in zip(q_points, distances, frequencies):
    print q, d, freq
phonon.plot_band_structure().show()

# Mesh sampling 20x20x20
phonon.set_mesh([20, 20, 20])
phonon.set_thermal_properties(t_step=10,
                              t_max=1000,
                              t_min=0)

# DOS
phonon.set_total_DOS(sigma=0.1)
for omega, dos in np.array(phonon.get_total_DOS()).T:
    print "%15.7f%15.7f" % (omega, dos)
phonon.plot_total_DOS().show()

# Thermal properties
for t, free_energy, entropy, cv in np.array(phonon.get_thermal_properties()).T:
開發者ID:,項目名稱:,代碼行數:33,代碼來源:

示例3: range

# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import plot_band_structure [as 別名]
bands.append(band)

q_start = np.array([0, 0, 0])
q_end = np.array([1./3, 1./3, 1./2])
band = []
for i in range(51):
    band.append(q_start + ( q_end - q_start ) / 50 * i)
bands.append(band)

#*********************
# Matplotlib required
#*********************
print "\nPhonon dispersion:"
phonon.set_band_structure(bands,
                          is_eigenvectors=True)
band_plot = phonon.plot_band_structure(["X", "$\Gamma$", "L"])
band_plot.show()

bands = phonon.get_band_structure()
distances = bands[1]
frequencies = bands[2]
qpoints = bands[0]

for (qs_at_segments,
     dists_at_segments,
     freqs_at_segments) in zip(qpoints, distances, frequencies):

    for q, d, f in zip(qs_at_segments,
                       dists_at_segments,
                       freqs_at_segments):
        print "# %f %f %f" % tuple(q)
開發者ID:Johnson-Wang,項目名稱:phonopy,代碼行數:33,代碼來源:Al2O3.py


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