Skip to main content

A comprehensive CLI tool for VASP pre-processing (Supercells, K-points) and post-processing (DOS, Band Structure plotting)

Project description

Valyte Logo

Valyte

Valyte is a comprehensive CLI tool for VASP workflows, providing both pre-processing and post-processing capabilities with a focus on clean, publication-quality outputs and modern aesthetics.

Features

Pre-processing

  • Supercell Creation: Generate supercells from POSCAR files.
  • Interactive K-Point Generation: Create KPOINTS files with automatic grid calculation based on K-spacing.
  • Band KPOINTS Generation: Automatic high-symmetry path detection for band structure calculations.

Post-processing

  • DOS Plotting:
    • Smart Plotting: Automatically handles total DOS and Projected DOS (PDOS).
    • Orbital-Resolved: Plots individual orbitals (s, p, d, f) by default.
    • Adaptive Legend: Intelligently hides the legend if PDOS contributions are low.
    • Gradient Fill: Aesthetically pleasing gradient fills for DOS peaks.
  • Band Structure Plotting:
    • VBM alignment to 0 eV.
    • Color-coded bands (Purple for VB, Teal for CB).
    • High-symmetry path labels from KPOINTS.
  • Publication Quality: Clean aesthetics, custom fonts (Arial, Helvetica, Times New Roman), high DPI output.

Installation

Install Valyte directly from PyPI:

pip install valyte

Or install from source:

git clone https://github.com/nikyadav002/Valyte-Project
cd Valyte-Project
pip install -e .

Examples

DOS Plot Example Band Structure Example

Updating Valyte

To update to the latest version:

pip install --upgrade valyte

Usage

The main command is valyte.

Click to view detailed usage instructions

🧊 Create Supercell

Generate a supercell from a POSCAR file:

valyte supercell nx ny nz [options]

Example:

# Create a 2×2×2 supercell
valyte supercell 2 2 2

# Specify input and output files
valyte supercell 3 3 1 -i POSCAR_primitive -o POSCAR_3x3x1

Options:

  • -i, --input: Input POSCAR file (default: POSCAR).
  • -o, --output: Output filename (default: POSCAR_supercell).

📉 Band Structure

1. Generate KPOINTS

Automatically generate a KPOINTS file with high-symmetry paths for band structure calculations.

valyte band kpt-gen [options]

Options:

  • -i, --input: Input POSCAR file (default: POSCAR).
  • -n, --npoints: Points per segment (default: 40).
  • -o, --output: Output filename (default: KPOINTS).

Example:

valyte band kpt-gen -n 60 -i POSCAR_relaxed -o KPOINTS_band

🕸️ Generate K-Points (Interactive)

Generate a KPOINTS file for SCF calculations interactively.

valyte kpt

This command will prompt you for:

  1. K-Mesh Scheme: Monkhorst-Pack or Gamma.
  2. K-Spacing: Value in $2\pi/\AA$ (e.g., 0.04).

It automatically calculates the optimal grid based on your POSCAR structure.

2. Plot Band Structure

Plot the electronic band structure from vasprun.xml.

valyte band [options]

Options:

  • --vasprun: Path to vasprun.xml (default: current directory).
  • --kpoints: Path to KPOINTS file for path labels (default: looks for KPOINTS in same dir).
  • --ylim: Energy range, e.g., --ylim -4 4.
  • -o, --output: Output filename (default: valyte_band.png).

Example:

valyte band --ylim -3 3 -o my_bands.png

📊 Plot DOS

valyte dos [path/to/vasprun.xml] [options]

You can provide the path as a positional argument, use the --vasprun flag, or omit it to use the current directory.

Examples:

# Plot all orbitals for all elements (Default)
valyte dos

# Plot specific elements (Total PDOS)
valyte dos -e Fe O

# Plot specific orbitals
valyte dos -e "Fe(d)" "O(p)"

# Plot mixed (Fe Total and Fe d-orbital)
valyte dos -e Fe "Fe(d)"

Options:

  • -e, --elements: Specific elements or orbitals to plot.
    • Example: -e Fe O (Plots Total PDOS for Fe and O).
    • Example: -e Fe(d) O(p) (Plots Fe d-orbital and O p-orbital).
    • Example: -e Fe Fe(d) (Plots Fe Total and Fe d-orbital).
  • --xlim: Energy range (default: -6 6).
  • --ylim: DOS range (e.g., --ylim 0 10).
  • --scale: Scaling factor for Y-axis (e.g., --scale 3 divides DOS by 3).
  • --fermi: Draw a dashed line at the Fermi level (E=0). Default is OFF.
  • --pdos: Plot only Projected DOS (hide Total DOS).
  • --legend-cutoff: Threshold for legend visibility (default: 0.10 = 10%).
  • -o, --output: Output filename (default: valyte_dos.png).
  • --font: Font family (default: Arial).

Example:

valyte dos ./vasp_data --xlim -5 5 -o my_dos.png

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

valyte-0.1.7.tar.gz (4.7 MB view details)

Uploaded Source

Built Distribution

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

valyte-0.1.7-py3-none-any.whl (4.7 MB view details)

Uploaded Python 3

File details

Details for the file valyte-0.1.7.tar.gz.

File metadata

  • Download URL: valyte-0.1.7.tar.gz
  • Upload date:
  • Size: 4.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for valyte-0.1.7.tar.gz
Algorithm Hash digest
SHA256 f8498d8c50bdf239e26b72d76ff3e5701678b5f8ac998468a2c62bfbf0411a13
MD5 30424331aedb52eac9b89d130ca31527
BLAKE2b-256 5cbe14b6c3fe4f28c3590e24fa0ab637b3fa8c563b156a6fd738d372d263302c

See more details on using hashes here.

File details

Details for the file valyte-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: valyte-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 4.7 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for valyte-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e2bbbc50df9df0680538789d47540faa9e555ef59707f481388e228a348294
MD5 ca34432bc37c94b5921b7edc3a2d8602
BLAKE2b-256 af9acc9b6ff8eca67fd0ed3391ba5c1893104a6d3e745659526214528ef4dadf

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