Skip to main content

pyiron_workflow_vasp

A VASP workflow integration package for pyiron, providing tools and utilities for running and managing VASP calculations within the pyiron workflow framework.

Installation

The package can be installed using pip:

# Basic installation
pip install pyiron_workflow_vasp

# Installation with development tools
pip install "pyiron_workflow_vasp[dev]"

# Installation with notebook support
pip install "pyiron_workflow_vasp[notebook]"

# Installation with all optional dependencies
pip install "pyiron_workflow_vasp[dev,notebook]"

Dependencies

The package requires the following core dependencies:

  • Python >= 3.8
  • numpy >= 1.20.0
  • pandas >= 1.3.0
  • pymatgen >= 2023.0.0
  • pyiron_workflow >= 0.1.0
  • ase >= 3.22.0

Project Information

Usage

The package provides a set of tools for running VASP calculations within pyiron workflows. A minimal end-to-end example:

from ase.build import bulk
from pymatgen.io.vasp.inputs import Incar
from pyiron_workflow_vasp.vasp import VaspInput, vasp_job

structure = bulk("Fe", cubic=True, a=2.83)
incar = Incar.from_dict({
    "ENCUT": 400,
    "ISMEAR": 1,
    "SIGMA": 0.1,
    "ISPIN": 2,
    "MAGMOM": "2*3.0",
})

# VaspInput bundles structure + INCAR (+ optional KPOINTS / explicit POTCARs).
# Without an explicit potcar_paths kwarg, POTCAR generation uses the
# pseudopotential library configured in ~/.pyiron_vasp_config.
vasp_input = VaspInput(structure=structure, incar=incar)

job = vasp_job(workdir="./bulk_fe_run", vasp_input=vasp_input)
job.run()

print("converged:", job.outputs.convergence_status.value)
print("E_pot:    ", job.outputs.to_value_dict()["vasp_output"]["generic"]["energy_pot"])

For more examples — including an equation-of-state scan and a queued cluster run — see:

VASP Configuration

The .pyiron_vasp_config file is essential for configuring the paths to the VASP pseudopotential files (POTCAR files) used in pyiron_workflow's VASP nodes. The file specifies the locations of different VASP potential sets and the default potential set to be used.

For detailed configuration instructions, see generate_vasp_pyiron_config.md, which includes:

  • Basic configuration setup
  • Configuring custom pseudopotential sets
  • Adding new pseudopotential variants to CSV files

1. Determine the Locations of Your VASP POTCAR Files

Before creating the .pyiron_vasp_config file, ensure that you know the locations of the different POTCAR sets on your system. The common VASP potential directories are potpaw_64, potpaw_54, and potpaw_52, but your setup may vary. The directory structure should look something like this:

/home/pyiron_resources_cmmc/vasp/potpaw_64/LDA
/home/pyiron_resources_cmmc/vasp/potpaw_64/GGA
/home/pyiron_resources_cmmc/vasp/potpaw_54/LDA
/home/pyiron_resources_cmmc/vasp/potpaw_54/GGA
/home/pyiron_resources_cmmc/vasp/potpaw_52/LDA
/home/pyiron_resources_cmmc/vasp/potpaw_52/GGA
  • LDA and GGA refer to the functional types for the VASP potentials.

2. Create the .pyiron_vasp_config File

  1. Open a terminal and navigate to your home directory:

    cd ~
    
  2. Use a text editor (such as nano or vim) to create and open the .pyiron_vasp_config file. For example:

    nano .pyiron_vasp_config
    
  3. Add the following lines to the file. Make sure to modify the paths according to your setup.

    # Set the default POTCAR set
    # Make sure that the default_POTCAR_set matches one of the suffixes in the vasp_POTCAR_path_*
    default_POTCAR_set = potpaw64
    
    # Path to the root directory containing the VASP pseudopotential files
    pyiron_vasp_resources = /home/pyiron_resources_cmmc/vasp
    
    # Path for different POTPAW versions (adjust these paths according to your setup)
    vasp_POTCAR_path_potpaw64 = {pyiron_vasp_resources}/potpaw_64
    vasp_POTCAR_path_potpaw54 = {pyiron_vasp_resources}/potpaw_54
    vasp_POTCAR_path_potpaw52 = {pyiron_vasp_resources}/potpaw_52
    # Note that pyiron vasp nodes can detect variants of vasp_POTCAR_path_{randomsuffix}
    # So if you want to do something with custom pseudopotentials, you can... 
    # Each of these dirs must have a "GGA" and "LDA" subdirectory structure
    # i.e. 
    # The structure should look like
    # .../vasp/potpaw_64/LDA
    # .../vasp/potpaw_64/GGA
    # .../vasp/potpaw_54/LDA etc.
    
  4. After you have added the configuration details, save the file:

    • If you're using nano, press Ctrl + O, then Enter to save. Press Ctrl + X to exit.
    • If you're using vim, press Esc, type :wq, and press Enter to save and exit.

3. Verify File Permissions

Ensure that your .pyiron_vasp_config file and the POTCAR directories are readable by your user. Run the following command to check the file permissions of the .pyiron_vasp_config:

ls -l ~/.pyiron_vasp_config

If necessary, you can modify the permissions to ensure read access:

chmod 644 ~/.pyiron_vasp_config

Also, verify that you have read/copy access to the files inside the VASP resource directories (potpaw_64, potpaw_54, etc.):

ls -l /home/pyiron_resources_cmmc/vasp/potpaw_64

4. Testing Your Configuration

To verify that pyiron is correctly reading the .pyiron_vasp_config file, you can either check within your pyiron scripts or write a simple Python script to test the configuration:

import os
from pathlib import Path

# Read the config file
config_file = Path.home().joinpath(".pyiron_vasp_config")
with open(config_file, "r") as f:
    print(f.read())

This should print out the contents of your .pyiron_vasp_config, and you can check if the paths are correctly generated.

Additional Notes:

  • Ensure Correct Paths: Double-check that the paths to your POTCAR directories are correct. Incorrect paths will lead to pyiron not being able to find the necessary POTCAR files for your VASP calculations.

By following these instructions, you'll have a correctly configured .pyiron_vasp_config file that points to the appropriate VASP pseudopotential directories.

Metadata

Release files for pyiron-workflow-vasp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyiron-workflow-vasp 0.1.0
File Size Uploaded
pyiron_workflow_vasp-0.1.0.tar.gz 34.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyiron-workflow-vasp 0.1.0
File Interpreter ABI Platform
pyiron_workflow_vasp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 72.6 kB

Release files / pyiron_workflow_vasp-0.1.0.tar.gz

Download URL pyiron_workflow_vasp-0.1.0.tar.gz
Size 34.1 kB
Tags Source
SHA-256 checksum
How to use checksums
19bab4e1691137324222e6574e0df6437d55a308c7ed8a2e67e0c0c28174a81b
BLAKE2b-256 checksum
How to use checksums
42507c64c4593a0bc263f08690d17b3556b0382aa0882388222b8f99943e6174
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / pyiron_workflow_vasp-0.1.0-py3-none-any.whl

Download URL pyiron_workflow_vasp-0.1.0-py3-none-any.whl
Size 38.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4e1a883083f0d42d6b8d503e972441e06435acb7803e5405cf23689601ef8275
BLAKE2b-256 checksum
How to use checksums
40266fb4193a9dcd0a33726d06de5f6cc960903338d629e924cd82f329ad0a09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page