计算能带自动产生k_布里渊区及能带路径的可视化

VASPKIT新版本提供布里渊区和能带路径的可视化功能,通过Voronoi图算法自动生成。用户可以在完成POSCAR文件准备后,利用VASPKIT生成KPATH.in和HIGH_SYMMETRY_POINTS文件,再通过python3 visualize_BZ.py脚本绘制出可视化图,支持Cu体相和二维graphene体系。
摘要由CSDN通过智能技术生成

先前本公众号已经介绍"五种方法生成能带结构计算的高对称点",使用里面的方法即可获取相应晶体对应的布里渊区图。在VASPKIT 1.20新版本中即将实现布里渊区及能带路径的可视化。相应的脚本文件(见文末代码)已经开放内测,感兴趣的可以到VASPKIT FAQs QQ 群331895604群文件下载。相比其它软件,VASPKIT可以更加方便实现自动标记对应能带计算的k点路径。

晶体结构的第一布里渊区可通过调用Voronoi图算法实现,特别感谢中科大郑奇靖老师提供了关于实现算法的建议。接下来我们演示如何调用VASPKIT结合python脚本实现布里渊区及能带路径的可视化:

第一步:我们以Cu和graphene为例,准备好POSCAR文件,注意一定是原胞结构(primtive cell)。然后分别运行vaspkit -303 (Cu 体相)和vaspkit -302 (二维体系graphene)生成包含推荐能带路径的KPATH.in文件和高对称点HIGH_SYMMETRY_POINTS文件;

===================== Structural Options ======================== 01) VASP Input Files Generator 02) Elastic-Properties 03) K-Path Generator 04) Structure Editor 05) Catalysis-ElectroChem Kit 06) Symmetry Search ===================== Electronic Options ======================== 11) Density-of-States 21) DFT Band-Structure 23) 3D Band-Structure 25) Hybrid-DFT Band-Structure 26) Fermi-Surface 28) Band-Structure Unfolding =========== Charge & Potential & Wavefunction Options =========== 31) Charge & Spin Density 42) Potential-Related 51) Wave-Function Analysis ====================== Misc Utilities =========================== 71) Optical-Properties 72) Molecular-Dynamics Kit 73) VASP2other Interface 91) Semiconductor Calculator 92) 2D-Materials Kit 0) Quit------------>>302 +-------------------------- Warm Tips --------------------------+ See An Example in vaspkit/examples/seek_kpath/graphene_2D. More details are given in arXiv:1806.04285 (2018) and refs. This feature is still experimental & check PRIMCELL.vasp file. +---------------------------------------------------------------+-->> (01) Reading Structural Parameters from POSCAR File... +-------------------------- Summary ----------------------------+ The vacuum slab is supposed to be along z axis Prototype: AB2 Total Atoms in Input Cell: 3 Lattice Constants in Input Cell: 3.190 3.190 12.000 Lattice Angles in Input Cell: 90.000 90.000 120.000 Total Atoms in Primitive Cell: 3 Lattice Constants in Primitive Cell: 3.190 3.190 12.000 Lattice Angles in Primitive Cell: 90.000 90.000 120.0002D Bravais Lattice: Hexagonal Point Group: 26 [ D3h ] International: P-6m2 Symmetry Operations: 12 Suggested K-Path: (shown in the next line) [ GAMMA-M-K-GAMMA ] +---------------------------------------------------------------+-->> (02) Written PRIMCELL.vasp file.-->> (03) Written HIGH_SYMMETRY_POINTS File for Reference.-->> (04) Written KPATH.in File for Band-Structure Calculation. +----------------------------WARNING----------------------------+ | Do NOT forget to copy PRIMCELL.vasp to POSCAR unless you know | | what you are doing. Otherwise you might get wrong results! | +---------------------------------------------------------------+`

第二步,终端运行python3 visualize_BZ.py (代码见下面)得到下图:

1e24588c032df288175a773de1abc3f2.png

import numpy as np, numpy.linalg as nplfrom scipy.spatial import Voronoifrom itertools import productfrom matplotlib.patches import FancyArrowPatchfrom mpl_toolkits.mplot3d import proj3dimport matplotlib as mplmpl.rcParams['font.size'] = 12.

def read_poscar(poscar, species=None): poscar = open(poscar,'r') title = poscar.readline.strip scale = float(poscar.readline.strip) s = float(scale) lattice_vectors = [[ float(v) for v in poscar.readline().split() ], [ float(v) for v in poscar.readline().split() ], [ float(v) for v in poscar.readline().split() ]] lattice_vectors = np.array(lattice_vectors) reciprocal_lattice_vectors= np.linalg.inv(lattice_vectors).T reciprocal_lattice_vectors=reciprocal_lattice_vectors*np.pi*2return reciprocal_lattice_vectors

def read_high_symmetry_points: f = open("HIGH_SYMMETRY_POINTS

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值