本文整理汇总了Python中MAST.ingredients.chopingredient.ChopIngredient.get_my_phonon_params方法的典型用法代码示例。如果您正苦于以下问题:Python ChopIngredient.get_my_phonon_params方法的具体用法?Python ChopIngredient.get_my_phonon_params怎么用?Python ChopIngredient.get_my_phonon_params使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MAST.ingredients.chopingredient.ChopIngredient
的用法示例。
在下文中一共展示了ChopIngredient.get_my_phonon_params方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_get_my_phonon_params
# 需要导入模块: from MAST.ingredients.chopingredient import ChopIngredient [as 别名]
# 或者: from MAST.ingredients.chopingredient.ChopIngredient import get_my_phonon_params [as 别名]
def test_get_my_phonon_params(self):
ingdir="writedir/single_phonon_label1"
topmetad = MASTFile("files/top_metadata_single_phonon")
topmetad.data.append("origin_dir = %s/files\n" % testdir) #give origin directory
topmetad.to_file("writedir/metadata.txt")
metad = MASTFile("files/metadata_single_phonon")
metad.to_file("%s/metadata.txt" % ingdir)
kdict=dict()
kdict['mast_kpoints']=[3,3,3,"G"]
kdict['mast_xc']='pbe'
kdict['mast_program']='vasp'
kdict['mast_phonon_settings']=dict()
kdict['mast_phonon_settings']['phonon_center_site']="0.33 0.25 0.0"
kdict['mast_phonon_settings']['phonon_center_radius']="1"
kdict['mast_phonon_settings']['threshold']="0.075"
my_structure=pymatgen.io.vaspio.Poscar.from_file("files/perfect_structure").structure
mywi = ChopIngredient(name=ingdir,program_keys=kdict,structure=my_structure)
[mysite, myrad, mythresh] = mywi.get_my_phonon_params()
self.assertEqual(mysite,"0.33 0.25 0.0")
self.assertEqual(myrad,"1")
self.assertEqual(mythresh,"0.075")