Skip to main content

Yet another Ab Initio Visualizer with a variety of tools

Project description

YAIV

Yet another Ab Initio Visualizer...

A general purpose tool for condensed matter data analysis.

Table of Contents
  1. About The Project
  2. Installation
  3. Current tools
  4. Examples
  5. Roadmap

About The Project

YAIV is a collection of tools for plotting results of condensed matter ab initio codes such as Quantum Espresso, VASP, Wannier90, Wannier Tools... Although it can be used from the command line, the main intention of YAIV is to be used within JupyterLab, thereby allowing users to centralize the data analysis of a whole project into a single file. The goal is to provide both (1) fast and easy plotting defaults to glance over results, while (2) being flexible and powerful enough to generate publication-ready figures.

(back to top)

Why?

A single file to rule them all...

Most of the tools contained on YAIV are nothing more than glorified python scripts I needed during my PhD. Although python libraries for ab initio data analysis already exist, I found many of them being disigned to work within the command line (often required to be run from a certain directory). YAIV is aimed at providing useful ab initio analysis functionalities to those people willing to use a single JupyterLab file to organize their projects.

YAIV also intends to provide enough flexibility and modularity for most scenarios. To this end, useful tools are also provided in order to scrape data from the output of a variety of codes. Then, users can either further process the raw data or plot it in any desired way.

(back to top)


Installation

Create an isolated python enviroment

In case you want to create your own python enviroment and have it available in JupyterLab.

    python -m venv yaiv_env                             #Create yor new enviroment
    source yaiv_env/bin/activate                        #Load the enviroment
    pip install ipykernel                               #In order to create a Jupyter Kernel for this enviroment
    python -m ipykernel install --user --name=YAIV      #Install your new kernel with your desired name
    jupyter kernelspec list                             #Check that the new installed kernel appears

Now your new installed Kernel should be available in JupyterLab. You can select Kernel clicking at the top-right corner of JupyterLab.

Installing YAIV

You can either install from pip as:

   pip install yaiv

Or cloning the git repository:

   git clone https://github.com/mgamigo/YAIV.git
   cd YAIV
   pip install .

(back to top)


Current tools

All the functions are properly documented (remember that in JupyterLab all the documentation can be conviniently accesed with the shift + tab shortcut).

I. Grep module

This module provides text-scraping utilities for extracting (grepping) structural and spectral information from first-principles calculation outputs. It supports common DFT packages such as Quantum ESPRESSO and VASP.

from yaiv.grep import kpointsEnergies
spectrum = kpointsEnergies("OUTCAR")
spectrum.eigenvalues.shape
-----
(100, 32)

II. Utils module

This module provides general-purpose utility functions that are used across various classes and methods in the codebase. They are also intended to be reusable by the user for custom workflows, especially when combined with the data extraction tools.

III. Spectrum module

This module defines core classes for representing and plotting the eigenvalue spectrum of periodic operators, such as electronic bands or phonon frequencies, across a set of k-points. It also supports reciprocal lattice handling and coordinate transformations.

from yaiv.spectrum import electronBands
bands = electronBands("data/qe/Si.bands.pwo")
bands.eigenvalues.shape
---
(100, 32)
---
bands.plot()
---
(Basic Figure)

IV. Plot module

This module provides plotting utilities for visualizing eigenvalue spectra from periodic systems. It supports electronic and vibrational spectra obtained from common ab initio codes such as Quantum ESPRESSO and VASP.

from yaiv.plot import plot_spectrum
from yaiv.grep import kpointsEnergies
spectrum = kpointsEnergies("OUTCAR")
plot_spectrum(spectrum)
---
(Decorated Figure)
Built With

NumPy Pint Matplotlib ASE

(back to top)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

yaiv-1.0.1.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

yaiv-1.0.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

Details for the file yaiv-1.0.1.tar.gz.

File metadata

  • Download URL: yaiv-1.0.1.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for yaiv-1.0.1.tar.gz
Algorithm Hash digest
SHA256 15babe5fbd6807d4daee039522e0fa228c889f4a3ab0fa71294b2d212aa5af41
MD5 2a4a531ac1280fd5d95adec959e9fb06
BLAKE2b-256 3e0bfca7e8794b7c5c958607ebbc77e3bae55eae4349ebed315a7c96be907211

See more details on using hashes here.

File details

Details for the file yaiv-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: yaiv-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for yaiv-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e7533ca8643272319fdcd3e221b1ce889b9d9f8baa2911db05704d7b8850725
MD5 9cddf8c18294284cb15599d141d26604
BLAKE2b-256 e4081e3b701c140ec1cf0a131252bb39f2ea1c7a3ddcd64524736773c41fdf04

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page