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


Python Vasp.get_bandstructure方法代码示例

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


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

示例1: enumerate

# 需要导入模块: from vasp import Vasp [as 别名]
# 或者: from vasp.Vasp import get_bandstructure [as 别名]
from vasp import Vasp
from ase import Atom, Atoms
calcs = []
for i, a in enumerate([4.7, 5.38936, 6.0]):
    atoms = Atoms([Atom('Si', [0, 0, 0]),
                   Atom('Si', [0.25, 0.25, 0.25])])
    atoms.set_cell([[a/2., a/2., 0.0],
                    [0.0,  a/2., a/2.],
                    [a/2., 0.0, a/2.]], scale_atoms=True)
    calc = Vasp('bulk/Si-bs-{0}'.format(i),
                xc='PBE',
                lcharg=True,
                lwave=True,
                kpts=[4, 4, 4],
                atoms=atoms)
    print(calc.run())
    calcs += [calc]
Vasp.wait(abort=True)
for i, calc in enumerate(calcs):
    n, bands, p  = calc.get_bandstructure(kpts_path=[('L', [0.5,0.5,0.0]),
                                                     ('$\Gamma$', [0, 0, 0]),
                                                     ('$\Gamma$', [0, 0, 0]),
                                                     ('X', [0.5, 0.5, 0.5])],
                                          kpts_nintersections=10)
    if p is not None:
        png = 'images/Si-bs-{0}.png'.format(i)
        p.savefig(png)
开发者ID:beeruyue,项目名称:dft-book,代码行数:29,代码来源:script-159.py

示例2: fcc111

# 需要导入模块: from vasp import Vasp [as 别名]
# 或者: from vasp.Vasp import get_bandstructure [as 别名]
from ase.lattice.surface import fcc111
from vasp import Vasp
slab = fcc111('Al', size=(1, 1, 4), vacuum=10.0)
calc = Vasp('surfaces/Al-bandstructure',
            xc='PBE',
            encut=300,
            kpts=[6, 6, 6],
            lcharg=True,  # you need the charge density
            lwave=True,   # and wavecar for the restart
            atoms=slab)
n, bands, p = calc.get_bandstructure(kpts_path=[(r'$\Gamma$', [0, 0, 0]),
                                                ('$K1$', [0.5, 0.0, 0.0]),
                                                ('$K1$', [0.5, 0.0, 0.0]),
                                                ('$K2$', [0.5, 0.5, 0.0]),
                                                ('$K2$', [0.5, 0.5, 0.0]),
                                                (r'$\Gamma$', [0, 0, 0]),
                                                (r'$\Gamma$', [0, 0, 0]),
                                                ('$K3$', [0.0, 0.0, 1.0])],
                                     kpts_nintersections=10)
p.savefig('images/Al-slab-bandstructure.png')
开发者ID:beeruyue,项目名称:dft-book,代码行数:22,代码来源:script-165.py

示例3: Vasp

# 需要导入模块: from vasp import Vasp [as 别名]
# 或者: from vasp.Vasp import get_bandstructure [as 别名]
from vasp import Vasp
calc = Vasp('bulk/tio2/step3')
print calc.get_fermi_level()
calc.abort()
n, bands, p = calc.get_bandstructure(kpts_path=[('$\Gamma$', [0.0, 0.0, 0.0]),
                                                ('X', [0.5, 0.5, 0.0]),
                                                ('X', [0.5, 0.5, 0.0]),
                                                ('M', [0.0, 0.5, 0.5]),
                                                ('M', [0.0, 0.5, 0.5]),
                                                ('$\Gamma$', [0.0, 0.0, 0.0])])
p.savefig('images/tio2-bandstructure-dos.png')
开发者ID:beeruyue,项目名称:dft-book,代码行数:13,代码来源:script-158.py


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