本文整理汇总了Python中commopy.Cabinet.make_list_run方法的典型用法代码示例。如果您正苦于以下问题:Python Cabinet.make_list_run方法的具体用法?Python Cabinet.make_list_run怎么用?Python Cabinet.make_list_run使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类commopy.Cabinet
的用法示例。
在下文中一共展示了Cabinet.make_list_run方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: make_list
# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import make_list_run [as 别名]
def make_list(keys, run_file='run.sh'):
"""
current directory中のkeyで引っ掛かるpathを
list_run.txtに書き出す
"""
path_list = []
for key in keys:
path_list += glob.glob(key)
path_list = sorted(set(path_list))
Cabinet.make_list_run(path_list, run_file)
示例2: make_list
# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import make_list_run [as 别名]
def make_list(keys, is_file=False, run_file="run.sh"):
"""
current directory中のkeyで引っ掛かるpathを
list_run.txtに書き出す
"""
path_list = []
for key in keys:
path_list += glob.glob(key)
path_list = sorted(set(path_list))
if is_file:
path_list = [os.path.dirname(x) for x in path_list]
Cabinet.make_list_run(path_list, run_file)
示例3: for_FeB_witoutB
# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import make_list_run [as 别名]
def for_FeB_witoutB(): #pylint: disable=C0103
"""
for_FeBのBのサイトを0にして計算
"""
fname = os.path.join('.', 'extended_convex_hull_POSCARS')
poscars = uspex.POSCARS(fname)
poscars.restrict_fractions(0, 0.5)
poscars.restrict_fractions(1, 0.0)
poscars.remove_elements(1)
poscars.expand_poscars(['Fe'])
path_list = [x['ID'] for x in poscars.poscars]
Cabinet.make_list_run(path_list, 'run.sh')
示例4: for_FeB
# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import make_list_run [as 别名]
def for_FeB(): #pylint: disable=C0103
"""
FeBのUSPEXの計算結果(POSCARS)を展開する
Feが50-100percentの範囲
"""
fname = os.path.join('.', 'extended_convex_hull_POSCARS')
poscars = uspex.POSCARS(fname)
poscars.restrict_fractions(0, 0.5)
poscars.restrict_fractions(1, 0.0)
poscars.expand_poscars(['Fe', 'B'])
path_list = [x['ID'] for x in poscars.poscars]
Cabinet.make_list_run(path_list, 'run.sh')