Skip to main content

CASTEPKIT

Python 3.9+ GPLv3 License

castepkit is a Python package that provides a unified CLI and programmatic interface for post-processing and analyzing output files from the CASTEP first-principles simulation software. It provides wrappers for multiple CASTEP auxiliary programs such as NewSHG_ZY-XTIPC.x, weighted_den.x, and supports seamless integration of additional tools like atom_cutting_impi_XTIPC, calculate_ome_impi_XTIPC, and more.


Features

  • Unified CLI for running various CASTEP-related post-processing executables
  • Configurable executable paths and MPI launch settings via a user config file
  • Modular architecture: easily extendable for additional tools
  • Compatible with Python 3.10+

Installation

Stable version (from PyPI):

pip install castepkit

Development version (from GitHub):

git clone https://github.com/yingxingcheng/castepkit
cd castepkit
pip install .

Editable mode for developers:

pip install -e .[dev,tests]

To run tests:

pip install .[tests]
pytest

User Configuration

You can configure executable names, MPI settings, and default parameters using a TOML config file:

Config path: Linux/macOS: ~/.config/castepkit/config.toml Windows: %APPDATA%\castepkit\config.toml

Example config.toml:

[executables]
shg = "/opt/bin/NewSHG_ZY-XTIPC.x"
weighted_den = "/opt/bin/weighted_den.x"

[mpirun]
enabled = true
nproc = 8

Example Usage

# Run SHG alone
castepkit-shg GaAs_Optics --scissors 0.8 --direction 111

# Run weighted_den.x for a single file
castepkit-dens run GaAs_Optics --input_file_suffix shg_weight_veocc

# Run for both veocc and veunocc weights
castepkit-dens ve GaAs_Optics

# Run full SHG pipeline + weighted density
castepkit-dens shg GaAs_Optics --scissors 0.8 --direction 111

When running the real executables for castepkit-cut and castepkit-dens, the Intel compiler and MPI modules must be loaded:

module load compiler/intel/2021.3.0 mpi/intelmpi/2021.3.0

The configuration loader checks for these modules and prints a warning if they are missing.


License

castepkit is distributed under the terms of the GNU General Public License v3.

Metadata

Release files for castepkit 0.0.10

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

Source distribution (sdist)

Source distribution for castepkit 0.0.10
File Size Uploaded
castepkit-0.0.10.tar.gz 18.0 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for castepkit 0.0.10
File Interpreter ABI Platform
castepkit-0.0.10-py3-none-any.whl Python 3 none any Details

Total release size: 18.1 MB

Release files / castepkit-0.0.10.tar.gz

Download URL castepkit-0.0.10.tar.gz
Size 18.0 MB
Tags Source
SHA-256 checksum
How to use checksums
7e9836fd2d6e773cf0ec86b8fc90996ecf7aa8b54fb24fe504d09e1f43a05f74
BLAKE2b-256 checksum
How to use checksums
172fd425f663bc7c1b4271055c7062fef614655d2abf03e1b7c2904502970719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release files / castepkit-0.0.10-py3-none-any.whl

Download URL castepkit-0.0.10-py3-none-any.whl
Size 22.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
794d9090e59d41c81c020f7425ae3d6229fa27c6a48136cc49178bdb25e48d94
BLAKE2b-256 checksum
How to use checksums
4663393e7a230e41d98dfbc35a0c2d9355257ed5ddf947a6bda8c78283ce2992
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.17

Release history Release notifications | RSS feed

This release

0.0.10 This release

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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