# vaspvis
A highly flexible and customizable library for visualizing electronic structure data from VASP calculations.
[![Documentation Status](https://readthedocs.org/projects/vaspvis/badge/?version=latest)](https://vaspvis.readthedocs.io/en/latest/?badge=latest)
# Usage
This package was designed to give VASP users a flexible and easy to understand method
for generating a wide variaty of band structures and density of states plots. There are
three main modules in this package:
* `Band`
* `Dos`
* `standard`
The `Band` and `Dos` modules allow for the highest level of flexibility because the user
needs to pass in their own matplotlib axis, letting the user completely design the
external appearence of their plot. The `Band` and `Dos` modules will then parse the
VASP output data and append the it to the axis.
The `standard` module uses the `Band` and `Dos` modules internally and
was designed for those people who are not familiar with matplotlib
or don't need to completely customize their own figure. There are a total of 48 different
styles of plots to choose from in this module. It gives the user the capability to project
onto any orbital, any atom, or any element in their structure, as well as individual orbitals
on any atom or element. There are also options for spin polarized band structures and density
of states as well, letting the user make intricate plots with only a few lines of code.
# Installation
```bash
pip install vaspvis
```
# Loading Data
```python
from vaspvis import Band, Dos
# Non-HSE Calculation (plain band structure)
bs = Band(folder='path to vasp output folder')
# Non-HSE Calculation (projected band structure)
bs_projected = Band(folder='path to vasp output folder', projected=True)
# HSE Calculation (plain band structure)
bs_hse = Band(
folder='path to vasp output folder',
hse=True,
kpath='GXWLGK', # Path used in calculation
n=30, # Number of points between with high symmetry points
)
# HSE Calculation (projected band structure)
bs_hse = Band(
folder='path to vasp output folder',
projected=True,
hse=True,
kpath='GXWLGK', # Path used in calculation
n=30, # Number of points between with high symmetry points
)
# Density of states (projected or non-projected)
dos = Dos(folder='path to vasp output folder')
```
**Important Note:** This package parses the vasprun.xml, KPOINTS, and POSCAR files, be sure that
they are in the folder you load into vaspvis.
**Important Note:** For spin projected orbitals you must load the spin up and spin down chanels separately using the `spin = 'up'` or `spin = 'down'` options with loading data. Default is `spin = 'up'`.
# Examples
## Band Structures
### Plain Band Structure
```python
from vaspvis import standard
standard.band_plain(
folder=band_folder
)
```
<img src="./img/band_plain.png" width="600" height="450">
### Plain Band Structure HSE
> All other band structure can be plotted for HSE this is just an example on how to
load the structure using the standard module.
```python
from vaspvis import standard
standard.band_plain(
folder=band_folder_hse,
hse=True,
kpath='GXWLGK',
n=20,
)
```
<img src="./img/band_plain_hse.png" width="600" height="450">
### s, p, d Projected Band Structure
```python
from vaspvis import standard
standard.band_spd(
folder=band_folder
)
```
<img src="./img/band_spd.png" width="650" height="450">
### Orbital Projected Band Structure
```python
from vaspvis import standard
standard.band_orbitals(
folder=band_folder,
orbitals=[0, 1, 2, 3, 4, 5, 6, 7, 8],
)
```
<img src="./img/band_orbital.png" width="650" height="450">
### Atom-Orbtial Projected Band Structure
```python
from vaspvis import standard
standard.band_atom_orbitals(
folder=band_folder,
atom_orbital_pairs=[[0,1], [0,3], [1, 1], [1,7]]
)
```
<img src="./img/band_atom_orbitals.png" width="650" height="450">
### Atom Projected Band Structure
```python
from vaspvis import standard
standard.band_atoms(
folder=band_folder,
atoms=[0, 1],
)
```
<img src="./img/band_atoms.png" width="650" height="450">
### Element Projected Band Structure
```python
from vaspvis import standard
standard.band_elements(
folder=band_folder,
elements=['In', 'As'],
)
```
<img src="./img/band_elements.png" width="650" height="450">
### Element s, p, d Projected Band Structure
```python
from vaspvis import standard
standard.band_element_spd(
folder=band_folder,
elements=['As'],
)
```
<img src="./img/band_element_spd.png" width="650" height="450">
### Element Orbital Projected Band Structure
```python
from vaspvis import standard
standard.band_element_orbitals(
folder=band_folder,
element_orbital_pairs=[['As', 2], ['In', 3]],
)
```
<img src="./img/band_element_orbital.png" width="650" height="450">
## Density of Statess
### Plain Density of States
```python
from vaspvis import standard
standard.dos_plain(
folder=dos_folder,
energyaxis='x',
)
```
<img src="./img/dos_plain.png" width="600" height="450">
### s, p, d Projected Density of States
```python
from vaspvis import standard
standard.dos_spd(
folder=dos_folder,
energyaxis='x',
)
```
<img src="./img/dos_spd.png" width="650" height="450">
### Orbital Projected Density of States
```python
from vaspvis import standard
standard.dos_orbitals(
folder=dos_folder,
orbitals=[0, 1, 2, 3, 4, 5, 6, 7, 8],
energyaxis='x',
)
```
<img src="./img/dos_orbitals.png" width="650" height="450">
### Atom-Orbtial Projected Density of States
```python
from vaspvis import standard
standard.dos_atom_orbital(
folder=dos_folder,
atom_orbital_pairs=[[0,1], [0,3], [1, 1], [1,7]],
energyaxis='x',
)
```
<img src="./img/dos_atom_orbitals.png" width="650" height="450">
### Atom Projected Density of States
```python
from vaspvis import standard
standard.dos_atoms(
folder=dos_folder,
atoms=[0, 1],
energyaxis='x',
)
```
<img src="./img/dos_atoms.png" width="650" height="450">
### Element Projected Density of States
```python
from vaspvis import standard
standard.dos_elements(
folder=dos_folder,
elements=['In', 'As'],
energyaxis='x',
)
```
<img src="./img/dos_elements.png" width="650" height="450">
### Element s, p, d Projected Density of States
```python
from vaspvis import standard
standard.dos_element_spd(
folder=dos_folder,
elements=['As'],
energyaxis='x',
)
```
<img src="./img/dos_element_spd.png" width="650" height="450">
### Element Orbital Projected Density of States
```python
from vaspvis import standard
standard.dos_element_orbitals(
folder=dos_folder,
element_orbital_pairs=[['As', 2], ['In', 3]],
energyaxis='x',
)
```
<img src="./img/dos_element_orbitals.png" width="650" height="450">
## Band Structure / Density of Statess
### Plain Band Structure / Density of States
```python
from vaspvis import standard
standard.band_dos_plain(
band_folder=band_folder,
dos_folder=dos_folder,
)
```
<img src="./img/band_dos_plain.png" width="900" height="450">
### s, p, d Projected Band Structure / Density of States
```python
from vaspvis import standard
standard.band_dos_spd(
band_folder=band_folder,
dos_folder=dos_folder,
)
```
<img src="./img/band_dos_spd.png" width="950" height="450">
### Orbital Projected Band Structure / Density of States
```python
from vaspvis import standard
standard.band_dos_orbitals(
band_folder=band_folder,
dos_folder=dos_folder,
orbitals=[0, 1, 2, 3, 4, 5, 6, 7, 8],
)
```
<img src="./img/band_dos_orbitals.png" width="950" height="450">
### Atom-Orbtial Projected Band Structure / Density of States
```python
from vaspvis import standard
standard.band_dos_atom_orbital(
band_folder=band_folder,
dos_folder=dos_folder,
atom_orbital_pairs=[[0,1], [0,3], [1, 1], [1,7]]
)
```
<img src="./img/band_dos_atom_orbitals.png" width="950" height="450">
### Atom Projected Band Structure / Densi
没有合适的资源?快使用搜索试试~ 我知道了~
PyPI 官网下载 | vaspvis-0.1.11.tar.gz
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
5星 · 超过95%的资源 1 下载量 74 浏览量
2022-01-17
07:04:35
上传
评论
收藏 6.88MB GZ 举报
温馨提示
共40个文件
png:25个
py:6个
txt:4个
资源来自pypi官网。 资源全名:vaspvis-0.1.11.tar.gz
资源详情
资源评论
资源推荐
收起资源包目录
vaspvis-0.1.11.tar.gz (40个子文件)
vaspvis-0.1.11
MANIFEST.in 72B
PKG-INFO 12KB
img
dos_plain.png 100KB
band_plain.png 187KB
band_atom_orbitals.png 346KB
band_orbital.png 453KB
band_dos_atoms.png 404KB
dos_orbitals.png 176KB
band_dos_atom_orbitals.png 462KB
band_spd.png 381KB
band_plain_hse.png 181KB
band_dos_elements.png 404KB
band_element_spd.png 318KB
band_dos_element_orbitals.png 374KB
dos_atoms.png 158KB
dos_element_spd.png 138KB
band_dos_element_spd.png 438KB
dos_spd.png 163KB
band_dos_orbitals.png 610KB
dos_elements.png 158KB
band_elements.png 267KB
band_dos_plain.png 253KB
dos_element_orbitals.png 123KB
band_atoms.png 269KB
band_dos_spd.png 531KB
band_element_orbital.png 265KB
dos_atom_orbitals.png 135KB
vaspvis
band.py 40KB
__init__.py 87B
dos.py 47KB
standard.py 203KB
example.py 6KB
setup.cfg 38B
vaspvis.egg-info
PKG-INFO 12KB
requires.txt 39B
SOURCES.txt 854B
top_level.txt 8B
dependency_links.txt 1B
setup.py 627B
README.md 9KB
共 40 条
- 1
挣扎的蓝藻
- 粉丝: 13w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
评论1