本文整理匯總了Python中phonopy.Phonopy.dataset方法的典型用法代碼示例。如果您正苦於以下問題:Python Phonopy.dataset方法的具體用法?Python Phonopy.dataset怎麽用?Python Phonopy.dataset使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類phonopy.Phonopy
的用法示例。
在下文中一共展示了Phonopy.dataset方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: _get_phonon
# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import dataset [as 別名]
def _get_phonon(self):
cell = read_vasp(os.path.join(data_dir, "..", "POSCAR_NaCl"))
phonon = Phonopy(cell,
np.diag([2, 2, 2]),
primitive_matrix=[[0, 0.5, 0.5],
[0.5, 0, 0.5],
[0.5, 0.5, 0]])
filename = os.path.join(data_dir, "..", "FORCE_SETS_NaCl")
force_sets = parse_FORCE_SETS(filename=filename)
phonon.dataset = force_sets
phonon.produce_force_constants()
filename_born = os.path.join(data_dir, "..", "BORN_NaCl")
nac_params = parse_BORN(phonon.get_primitive(), filename=filename_born)
phonon.nac_params = nac_params
return phonon
示例2: _get_phonon
# 需要導入模塊: from phonopy import Phonopy [as 別名]
# 或者: from phonopy.Phonopy import dataset [as 別名]
def _get_phonon(self, cell):
phonon = Phonopy(cell, np.diag([1, 1, 1]))
force_sets = parse_FORCE_SETS(
filename=os.path.join(data_dir, "FORCE_SETS"))
phonon.dataset = force_sets
phonon.produce_force_constants()
supercell = phonon.get_supercell()
born_elems = {'Na': [[1.08703, 0, 0],
[0, 1.08703, 0],
[0, 0, 1.08703]],
'Cl': [[-1.08672, 0, 0],
[0, -1.08672, 0],
[0, 0, -1.08672]]}
born = [born_elems[s]
for s in supercell.get_chemical_symbols()]
epsilon = [[2.43533967, 0, 0],
[0, 2.43533967, 0],
[0, 0, 2.43533967]]
factors = 14.400
phonon.set_nac_params({'born': born,
'factor': factors,
'dielectric': epsilon})
return phonon