当前位置: 首页>>代码示例>>Python>>正文


Python Cabinet.reserve_file方法代码示例

本文整理汇总了Python中commopy.Cabinet.reserve_file方法的典型用法代码示例。如果您正苦于以下问题:Python Cabinet.reserve_file方法的具体用法?Python Cabinet.reserve_file怎么用?Python Cabinet.reserve_file使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在commopy.Cabinet的用法示例。


在下文中一共展示了Cabinet.reserve_file方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: write_poscar

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
 def write_poscar(self, poscar='POSCAR'):
     """
     write_poscar(path)
     Make a 'POSCAR' file at 'path'
     """
     Cabinet.reserve_file(poscar)
     Cabinet.write_file(poscar, str(self))
开发者ID:hackberry-tree,项目名称:00_workSpace,代码行数:9,代码来源:vaspy.py

示例2: std

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
def std(src='POSCAR'):
    """
    conventional standard cell に変換
    """
    srcpos = Poscar.from_file(src)
    finder = SpacegroupAnalyzer(srcpos.structure)
    std_str = finder.get_conventional_standard_structure()
    dstpos = Poscar(std_str)
    dst = 'POSCAR_std'
    Cabinet.reserve_file(dst)
    dstpos.write_file(dst)
开发者ID:hackberie,项目名称:00_workSpace,代码行数:13,代码来源:vasp_poscar.py

示例3: prim

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
def prim(src):
    """
    primitive cell に変換
    """
    srcpos = Poscar.from_file(src)
    finder = SpacegroupAnalyzer(srcpos.structure)
    prim_str = finder.get_primitive_standard_structure()
    dstpos = Poscar(prim_str)
    dst = 'POSCAR_prim'
    Cabinet.reserve_file(dst)
    dstpos.write_file(dst)
开发者ID:hackberie,项目名称:00_workSpace,代码行数:13,代码来源:vasp_poscar.py

示例4: standard

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
def standard(src="POSCAR"):
    """
    standardに変換
    """
    srcpos = Poscar.from_file(src)
    finder = SpacegroupAnalyzer(srcpos.structure)
    std = finder.get_conventional_standard_structure()
    dstpos = Poscar(std)
    dst = "POSCAR_std"
    Cabinet.reserve_file(dst)
    dstpos.write_file(dst)
开发者ID:hackberry-tree,项目名称:00_workSpace,代码行数:13,代码来源:vasp_poscar.py

示例5: primitive

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
def primitive(src="POSCAR"):
    """
    primitiveに変換
    """
    srcpos = Poscar.from_file(src)
    finder = SpacegroupAnalyzer(srcpos.structure)
    prim = finder.get_primitive_standard_structure()
    dstpos = Poscar(prim)
    dst = "POSCAR_prim"
    Cabinet.reserve_file(dst)
    dstpos.write_file(dst)
开发者ID:hackberry-tree,项目名称:00_workSpace,代码行数:13,代码来源:vasp_poscar.py

示例6: refined

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
def refined(src="POSCAR"):
    """
    refined poscar を 作成する
    """
    srcpos = Poscar.from_file(src)
    finder = SpacegroupAnalyzer(srcpos.structure, symprec=5e-1, angle_tolerance=8)
    std = finder.get_refined_structure()
    dstpos = Poscar(std)
    dst = "POSCAR_refined"
    Cabinet.reserve_file(dst)
    dstpos.write_file(dst)
开发者ID:hackberry-tree,项目名称:00_workSpace,代码行数:13,代码来源:vasp_poscar.py

示例7: prep_one

# 需要导入模块: from commopy import Cabinet [as 别名]
# 或者: from commopy.Cabinet import reserve_file [as 别名]
 def prep_one(cls, cif_file, dst_dir):
     """
     The dst_dir is current directory,
     this method search POSCAR and reserve it.
     If not, it will search whethre dst_dir already exist or not.
     If it already exist, this module will do nothing.
     If not, new directory make and prepare POSCAR file.
     """
     if dst_dir == '.':
         Cabinet.reserve_file('POSCAR')
     elif glob.glob(dst_dir):
         line = ("\'{0}\' directory is already exist.\n"
                 "Do Nothing...\n".format(dst_dir.split('/')[-1]))
         print(line)
         return
     else:
         Bash.mkdir(dst_dir)
     cls.conv2poscar(cif_file, dst_dir)
     shutil.copy(cif_file, dst_dir)
开发者ID:buriedwood,项目名称:00_workSpace,代码行数:21,代码来源:cifpy.py


注:本文中的commopy.Cabinet.reserve_file方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。