本文整理汇总了Python中pymatgen.io.vaspio.vasp_input.Kpoints.automatic_linemode方法的典型用法代码示例。如果您正苦于以下问题:Python Kpoints.automatic_linemode方法的具体用法?Python Kpoints.automatic_linemode怎么用?Python Kpoints.automatic_linemode使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymatgen.io.vaspio.vasp_input.Kpoints
的用法示例。
在下文中一共展示了Kpoints.automatic_linemode方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: print
# 需要导入模块: from pymatgen.io.vaspio.vasp_input import Kpoints [as 别名]
# 或者: from pymatgen.io.vaspio.vasp_input.Kpoints import automatic_linemode [as 别名]
# read structure
if os.path.exists(fstruct):
struct = mg.read_structure(fstruct)
else:
print("File %s does not exist" % fstruct)
exit(1)
# symmetry information
struct_sym = SymmetryFinder(struct)
print("lattice type : {0}".format(struct_sym.get_lattice_type()))
print("space group : {0} ({1})".format(struct_sym.get_spacegroup_symbol(),
struct_sym.get_spacegroup_number()))
# Compute first brillouin zone
ibz = HighSymmKpath(struct)
ibz.get_kpath_plot(savefig="path.png")
print("ibz type : {0}".format(ibz.name))
# print specific kpoints in the first brillouin zone
for key, val in ibz.kpath["kpoints"].items():
print("%8s %s" % (key, str(val)))
# suggested path for the band structure
print("paths in first brillouin zone :")
for path in ibz.kpath["path"]:
print(path)
# write the KPOINTS file
Kpoints.automatic_linemode(ndiv, ibz).write_file("KPOINTS")