Skip to main content

Tools for processing outputs from CASTEP program.

Project description

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.

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

castepkit-0.0.9.tar.gz (18.0 MB view details)

Uploaded Source

Built Distribution

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

castepkit-0.0.9-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file castepkit-0.0.9.tar.gz.

File metadata

  • Download URL: castepkit-0.0.9.tar.gz
  • Upload date:
  • Size: 18.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.17

File hashes

Hashes for castepkit-0.0.9.tar.gz
Algorithm Hash digest
SHA256 eafdcd2f7012e4be2fd31daf100b25b2dcd236fe6939cebb7da57ad228f489cf
MD5 b9ec2f10626a820009f2847e40791b59
BLAKE2b-256 5e09505964f0de306867f17addc19c5642ccf0146e085e824bcbdb834983832f

See more details on using hashes here.

File details

Details for the file castepkit-0.0.9-py3-none-any.whl.

File metadata

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

File hashes

Hashes for castepkit-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 93e44fb241d4c6c197df9cdbd03fa7de18fecb471292018ff7f51b3c3da07904
MD5 db5c29d8a566a02a37939ca249cb504f
BLAKE2b-256 d1da02b4c9f19d67db42a6a893c55054eb1bae5436b2d0d0590d86bb456df8e7

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