本文整理汇总了Python中pymatgen.io.vaspio.vasp_input.Kpoints.automatic_gamma_density方法的典型用法代码示例。如果您正苦于以下问题:Python Kpoints.automatic_gamma_density方法的具体用法?Python Kpoints.automatic_gamma_density怎么用?Python Kpoints.automatic_gamma_density使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pymatgen.io.vaspio.vasp_input.Kpoints
的用法示例。
在下文中一共展示了Kpoints.automatic_gamma_density方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_kpoints
# 需要导入模块: from pymatgen.io.vaspio.vasp_input import Kpoints [as 别名]
# 或者: from pymatgen.io.vaspio.vasp_input.Kpoints import automatic_gamma_density [as 别名]
def get_kpoints(self, structure):
"""
Writes out a KPOINTS file using the automated gamma grid method.
VASP crashes GW calculations on none gamma centered meshes.
"""
if self.sort_structure:
structure = structure.get_sorted_structure()
dens = int(self.kpoints_settings['grid_density'])
if dens == 1:
return Kpoints.gamma_automatic()
else:
return Kpoints.automatic_gamma_density(structure, dens)
示例2: get_kpoints
# 需要导入模块: from pymatgen.io.vaspio.vasp_input import Kpoints [as 别名]
# 或者: from pymatgen.io.vaspio.vasp_input.Kpoints import automatic_gamma_density [as 别名]
def get_kpoints(self, structure):
"""
Get a KPOINTS file for NonSCF calculation. kpoints are
Gamma-centered mesh grid.
Args:
structure (Structure/IStructure): structure to get Kpoints
"""
kppa = self.kpoints_settings["kpoints_density"]
kpoints = Kpoints.automatic_gamma_density(structure, kppa)
return kpoints