Wannier & vASP Postprocessing module

Overview

WASPP module

Wannier90 & vASP Postprocessing module with functionalities I needed during my PhD.

Being updated Version: 0.5

Main functions:

Wannier90 - VASP interface preparation and evaluation.

  1. plot_pdos

For plotting pDOS select LORBIT = 11 in INCAR file

Main function for plotting the partial density of states, for desired atoms and orbitals at all the different Wyckoff positions. Usage is straightforward:

  • file = "vasprun.xml" of your VASP run.
  • _atoms = Atoms whose pDOS you wanna plot as a list of strings e.g. ["P","I","O","Rn","Al"].
  • _orbitals = Orbitals whose pDOS you wanna know from _atoms as a list of strings. They can be "big" orbitals (s,p,d,f) or "small" (px,py,pz,dxy,...), e.g ["s","px","d"].
  • e_window = Range of energies of interest.

If _atoms and _orbitals are None, the function will plot every atom and big orbital at every different Wyckoff position. For a better visualization each kind of big orbital is displayed with a different linestyle.

For example (Ta6Se24I2):

wap.plot_dos("vasprun.xml",e_window = (-7.5,4))

Returns:

TaSeI pDOS

The first tag in the legend is the atom, the second is the Wyckoff position and the third the orbital.

  1. band_counter

Counts the numebr of bands in a energy window in the whole FBZ. It gives a good clue of how to choose the energy window. Usage is as following:

wap.band_counter(file = "vasprun.xml", emin = 0.0, emax = 0.0)
  • file = "vasprun.xml" of your VASP run.
  • emin and emax are the lower and upper part of the energy window given in reference to Fermi energy.

For example:

wap.band_counter(file = "vasprun.xml", emin = -7.0, emax = 4.0)

Returns:

Efermi = 3.01610496.
Total bands = 544.
The number of bands between -7.00 eV (-3.98 eV) and 4.00 eV (7.02 eV) is 368.

Which is, the Fermi energy in eV, the total number of bands of the vasp run and the number of bands in the energy window (with real energies in parenthesis for wannier90.win)

  1. plot_wannierbands

Function for plotting wannier bands from .dat and .gnu files.

Usage:

wap.plot_wannierbands(file_dat = "wannier90_band.dat", gnu = "wannier90_band.gnu",efermi = 0.0, e_window = None, fig_size = (15,8),savename = "wannierbands.png")
  • file_dat: *_band.dat output file from a wannier90.x run.
  • file_dat: *_band.gnu output file from a wannier90.x run.
  • efermi: Fermi energy.
  • e_window = Energy window for the plot

It generates a "wannierbands.png" file.

4 . plot_vaspbands

Function for plotting VASP bands from a non self-consistent calculation in a KPATH. Usage:

wap.plot_vaspbands(outcar = "OUTCAR", kpoints = "KPOINTS")

  • outcar: OUTCAR file from VASP run.
  • kpoints: KPOINTS file from nsc VASP run (linemode expected).
  1. plot_comparison

Function for comparing VASP and Wannier90 bandstructures combining the previous functions and tags. Usage:

wap.plot_comparison(outcar = "OUTCAR", kpoints = "KPOINTS",file_dat = "wannier90_band.dat", gnu = "wannier90_band.gnu",efermi = 0.0, fig_size = (12,8), e_window = (-4,4),savename = "comparison.png"):
  • outcar: OUTCAR file from VASP run.
  • kpoints: KPOINTS file from nsc VASP run (linemode expected).
  • file_dat: *_band.dat output file from a wannier90.x run.
  • file_dat: *_band.gnu output file from a wannier90.x run.
  • efermi: Fermi energy.
  • e_window = Energy window for the plot

Example: RhSi

wap.plot_comparison(outcar = "OUTCAR", kpoints = "KPOINTS",file_dat = "wannier90_band.dat", gnu = "plottt/wannier90_band.gnu",efermi = 0.0, fig_size = (12,8), e_window = (-4,4),savename = "comparison.png") 

RhSi VASP vs Wannier90

  1. wann_kpoints

Function for generating kpath string for seedname.win using a KPOINT file from a nsc VASP calculation. Usage is as follows:

wann_kpoints(file = "KPOINTS")

Where KPOINTS is like:

Cubic
20   ! 20 grids
Line-mode
reciprocal
   0.000   0.000   0.000   ! GAMMA
   0.000   0.500   0.000   ! X
   0.000   0.500   0.000   ! X
   0.500   0.500   0.000   ! M
   0.500   0.500   0.000   ! M
   0.000   0.000   0.000   ! GAMMA
   0.000   0.000   0.000   ! GAMMA
   0.500   0.500   0.500   ! R
   0.500   0.500   0.500   ! R
   0.000   0.500   0.000   ! X
   0.500   0.500   0.000   ! M
   0.500   0.500   0.500   ! R

And it generates a WKPTS.txt file as:

G 0.000 0.000 0.000 X 0.000 0.500 0.000 
X 0.000 0.500 0.000 M 0.500 0.500 0.000 
M 0.500 0.500 0.000 G 0.000 0.000 0.000 
G 0.000 0.000 0.000 R 0.500 0.500 0.500 
R 0.500 0.500 0.500 X 0.000 0.500 0.000 
M 0.500 0.500 0.000 R 0.500 0.500 0.500 
  1. plot_custom_vaspbands

Similar to plot_vaspbands but more customizable. Usage is as follows:

wap.plot_custom_vaspbands(outcar = "OUTCAR",kpoints = "KPOINTS",
                          figsize = (10,7.5),ewindow = (-3,3),
                          dpi = 500,linewidth = 0.5,
                          kp_i=None,kp_f=None,
                          title=None,fname=None)

Where:

  • kp_i & kp_f is the number of the fist and last KPOINT in the path that you want to plot. E.g. in the KPOINTS file from above example kp_i = 2 would correspond to M.
  • title and fname are the title to be printed in the figure and the path to the figure when saved.

MBJ and PBE potentials bandstructure comparison.

compare_MBJ

Function for comparing PBE nscc and MBJ scc functional bandstructures using pymatgen treatment of vasprun.

wap.compare_MBJ(vasprun_pbe = "vasprun1.xml",
            vasprun_mbj = "vasprun2.xml",
            kpoint_file = "KPOINTS",
            e_window = (-4,4),
            fig_title = None,
            fig_name = "comparison.png")

Usage:

  • vasprun_pbe: vasprun file for PBE nsc run.
  • vasprun_mbj: vasprun file for MBJ scc run.
  • kpoint_file: kpoint file for nsc (linemode expected).

For example:

wap.compare(vasprun_pbe = "vasprun81_rel.xml",
            vasprun_mbj = "vasprun81.xml",
            kpoint_file = "KPOINTS",
            e_window = (-2,2),
            fig_title = "SG81",
            fig_name = "comparison81.png")

Returns:

VASP PBE vs MBJ potetntial

More functionalities are present in the code and many more are coming, stay tuned & take a look at WASPP05.py. (^³^)~♪

Package Requeriments:

  • numpy
  • matplotlib
  • scipy
  • itertools
  • re
  • pymatgen
Owner
Irián Sánchez Ramírez
PhD student @ DIPC
Irián Sánchez Ramírez
Open Source Management System for Botanic Garden Collections.

BotGard 3.0 Open Source Management System for Botanic Garden Collections built and maintained by netzkolchose.de in cooperation with the Botanical Gar

netzkolchose.de 1 Dec 15, 2021
C++ Environment InitiatorVisual Studio Code C / C++ Environment Initiator

Visual Studio Code C / C++ Environment Initiator Latest Version : v 1.0.1(2021/11/08) .exe link here About : Visual Studio Code에서 C/C++환경을 MinGW GCC/G

Junho Yoon 2 Dec 19, 2021
Show my read on kindle this year

Show my kindle status on GitHub

yihong 26 Jun 20, 2022
A Python simple Dice Simulator just for fun

Dice Simulator 🎲 A Simple Python Dice Simulator 🧩 🎮 💭 Description: That program make your RPG session more easy and simple. Roll the dice never be

Lauro Brant 17 May 14, 2022
A repository containing an introduction to Panel made to be support videos and talks.

👍 Awesome Panel - Introduction to Panel THIS REPO IS WORK IN PROGRESS. PRE-ALPHA Panel is a very powerful framework for exploratory data analysis and

Marc Skov Madsen 51 Nov 17, 2022
Runtime profiler for Streamlit, powered by pyinstrument

streamlit-profiler 🏄🏼 Runtime profiler for Streamlit, powered by pyinstrument. streamlit-profiler is a Streamlit component that helps you find out w

Johannes Rieke 23 Nov 30, 2022
Paimon is a pixie (or script) who was made for anyone from {EPITECH} who are struggling with the Coding Style.

Paimon Paimon is a pixie (or script) who was made for anyone from {EPITECH} who are struggling with the Coding Style. Her goal is to assist you in you

Lyy 2 Oct 17, 2021
Karte der Allgemeinverfügungen zu Schulschließungen oder eingeschränktem Regelbetrieb in Sachsen

SNSZ Karte Datenquelle: Allgemeinverfügungen zu Schulschließungen oder eingeschränktem Regelbetrieb in Sachsen Sächsisches Staatsministerium für Kultu

Jannis Leidel 3 Sep 26, 2022
Сервис служит прокси между cервисом регистрации ошибок платформы и системой сбора ошибок Sentry

Sentry Reg Service Сервис служит прокси между Cервисом регистрации ошибок платформы и системой сбора ошибок Sentry. Как развернуть Sentry onpremise. С

Ingvar Vilkman 13 May 24, 2022
This repository contains each day of Advent of Code 2021 that I've done.

Advent of Code - 2021 I will use this repository as my Advent of Code1 (AoC) repo for the 2021 challenge. I'm changing how I am tackling the problems

Brett Chapin 2 Jan 12, 2022
script to analyze EQ decay using python

pyq_decay script to analyze EQ decay using python PyQ Decay ver 1.0 A pythonic script to analyze EQ aftershock decay using method of Omori (1894), Mog

1 Nov 04, 2021
Python flexible slugify function

Python flexible slugify function

Dmitry Voronin 471 Dec 20, 2022
Sample python script for monitoring Rocketchat database and get statistics of users.

rocketchat-DB-monitoring Sample python script for monitoring Rocketchat database and get statistics of users. 1. Update python: yum check-update && yu

Mojtaba Taleghani 1 Apr 12, 2022
Buffer overflow example for python

Buffer overflow example for python

Mehmet 1 Jan 04, 2022
Experiments with Tox plugin system

The project is an attempt to add to the tox some missing out of the box functionality. Basically it is just an extension for the tool that will be loa

Volodymyr Vitvitskyi 30 Nov 26, 2022
Learn Python tips, tools, and techniques in around 5 minutes each.

Python shorts Learn Python tips, tools, and techniques in around 5 minutes each. Watch on YouTube Subscribe on YouTube to keep up with all the videos.

Michael Kennedy 28 Jan 01, 2023
Simple python bot, that notifies about new manga chapters through Telegram.

Simple python bot, that notifies about new manga chapters through Telegram.

Dmitry Kopturov 1 Dec 05, 2021
Create N Share is a No Code solution which gives users the ability to create any type of feature rich survey forms with ease.

create n share Note : The Project Scaffold will be pushed soon. Create N Share is a No Code solution which gives users the ability to create any type

Chiraag Kakar 11 Dec 03, 2022
Web3 Solidity Connector

With this project, you can compile your sol files and create new transactions including creating contract and calling the state changer functions. You can integrate integrate your sol files with Pyth

Fethi Tekyaygil 3 Oct 09, 2022
Modelling and Implementation of Cable Driven Parallel Manipulator System with Tension Control

Cable Driven Parallel Robots (CDPR) is also known as Cable-Suspended Robots are the emerging and flexible end effector manipulation system. Cable-driven parallel robots (CDPRs) are categorized as a t

Siddharth U 0 Jul 19, 2022