Skip to main content

Atmospheric Chemistry and Thermodynamics Library

Project description

KINTERA

Atmospheric Chemistry and Thermodynamics Library

KINTERA is a library for atmospheric chemistry and equation of state calculations, combining C++ performance with Python accessibility through pybind11 bindings.

Table of Contents

Overview

KINTERA provides efficient implementations of:

  • Chemical kinetics calculations
  • Thermodynamic equation of state
  • Phase equilibrium computations
  • Atmospheric chemistry models

The library is written in C++17 with Python bindings, leveraging PyTorch for tensor operations and providing GPU acceleration support via CUDA.

Features

  • High Performance: C++17 core with optional CUDA support
  • Python Interface: Full Python API via pybind11
  • PyTorch Integration: Native tensor operations using PyTorch
  • Chemical Kinetics: Comprehensive reaction mechanism support
  • Thermodynamics: Advanced equation of state calculations
  • Cloud Physics: Nucleation and condensation modeling

Prerequisites

System Requirements

  • C++ Compiler: Support for C++17 (GCC 7+, Clang 5+, or MSVC 2017+)
  • CMake: Version 3.18 or higher
  • Python: Version 3.9 or higher
  • NetCDF: NetCDF C library

Python Dependencies

  • numpy
  • torch (version 2.7.0-2.7.1)
  • pyharp (version 1.7.2+)
  • pytest (for testing)

Platform-Specific Setup

Linux (Ubuntu/Debian)

sudo apt-get update
sudo apt-get install -y build-essential cmake libnetcdf-dev

macOS

brew update
brew install cmake netcdf

Installation

Quick Start

The simplest way to build and install KINTERA:

# 1. Install Python dependencies
pip install numpy 'torch==2.7.1' 'pyharp>=1.7.1'

# 2. Clone the repository
git clone https://github.com/chengcli/kintera.git
cd kintera

# 3. Configure and build the C++ library
cmake -B build
cmake --build build --parallel

# 4. Install the Python toolkit
pip install .

Testing

KINTERA includes both C++ and Python tests.

Running All Tests

After building and installing:

cd build/tests
ctest

Documentation

Full documentation is available at: https://kintera.readthedocs.io

To build documentation locally:

cd docs
pip install -r requirements.txt
make html

Documentation will be generated in docs/_build/html/.

Dependency Cache

A successful build saves cache files for each dependency in the .cache directory. These cache files:

  • Can be safely deleted at any time
  • Allow offline builds after the first successful build
  • Are automatically populated on first build

To force a clean rebuild:

rm -rf .cache build

Development

Code Style

KINTERA uses pre-commit hooks for code formatting and linting:

pip install pre-commit
pre-commit install
pre-commit run --all-files

Project Structure

kintera/
├── src/              # C++ source code
├── python/           # Python bindings and API
│   ├── csrc/        # pybind11 binding code (C++ implementation)
│   ├── api/         # Pure Python API
│   ├── kintera.pyi  # Type stub file for IDE/type checker support
│   └── py.typed     # PEP 561 marker for type hints
├── tests/            # C++ and Python tests
├── examples/         # Example usage
├── docs/             # Documentation source
├── cmake/            # CMake modules and macros
└── data/             # Test data and examples

Type Hints and IDE Support

KINTERA provides full type hint support through Python stub files (.pyi):

  • IDE autocomplete: Enhanced code completion in VS Code, PyCharm, etc.
  • Type checking: Verify code correctness with mypy or pyright
  • Documentation: Inline documentation with parameter types and examples

See python/STUB_FILES.md for more details on using type hints.

Continuous Integration

The project uses GitHub Actions for continuous integration. The CI pipeline:

  1. Runs pre-commit checks (formatting, linting)
  2. Builds on Linux and macOS
  3. Runs all C++ and Python tests

Continuous Deployment

Releases are automatically built and published to PyPI using GitHub Actions when a new release is created on GitHub.

Staying Updated

If you have forked this repository, please enable notifications or watch for updates to stay current with the latest developments.

License

See LICENSE file for details.

Authors

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

kintera-2.1.0-cp313-cp313-manylinux_2_27_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

kintera-2.1.0-cp313-cp313-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

kintera-2.1.0-cp312-cp312-manylinux_2_27_x86_64.whl (22.8 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

kintera-2.1.0-cp312-cp312-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

kintera-2.1.0-cp311-cp311-manylinux_2_27_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

kintera-2.1.0-cp311-cp311-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

kintera-2.1.0-cp310-cp310-manylinux_2_27_x86_64.whl (22.7 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

kintera-2.1.0-cp310-cp310-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.10macOS 15.0+ ARM64

File details

Details for the file kintera-2.1.0-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 f2acd554a591ac904b5884040e46e2e97e77c9b5aff1f6aa611cf77e731b9166
MD5 558efc37889d0c88a70a437baeaf2948
BLAKE2b-256 53b15487feeeb516639e2724d69421965e97a932b3ab7b4c1dadbb60f9e68f05

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d51e909a6bfd201f64624ec5ec519ac559733d6dec180facfe4666ee88b11f5e
MD5 2af7fb93d1d172ce79426600045792c0
BLAKE2b-256 4869294ee49ca91569905cb03e7f2ab786aa626905e953d7665f8b6e38dd987b

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp312-cp312-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 aac883b35cfe58ae7188a10b0b15ade62d795efa82808398eedb282b15444465
MD5 2ee661d5c60c3a1d4d5c08232f9860f6
BLAKE2b-256 63e4c01723b6e9ff653f0331c074a9387f043d2c13f126a12685caabfe557f1e

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 14bc74a79e3303a7a49794c8744a5c339fc25f329cdc40ba5bbb66456406891b
MD5 0803a1bdf0046fbe719d93b06b7c3e59
BLAKE2b-256 461e99edd0483322a0d93bde6be9cff365e0279f0b53f4a89b1d7f405914f053

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp311-cp311-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 6a5b4e7a9fe9df4d2977312685253c7d3c809be24dda0f6ab3645f25adaf11ca
MD5 77c111a5e290f6ef6935e46a9db29094
BLAKE2b-256 c0593b2297191fa08a73efbc8ba09d34531421193df1a2d354a21998cbf17cbe

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp311-cp311-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 7fe1fbc1b6b4ebaabc14e94260aebbba4ec4366f6123344daff354022f7f93cf
MD5 850c69add7fe27d1e47be54c02224eac
BLAKE2b-256 6f143bbf41577c4caeeb0c0c50b87980b43bdb28db7d84a488a6a0e23cbd6dd1

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp310-cp310-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 ce04f3278ef040d78cff266fcf373e2499c766c8cc9123940e24eff1879a558d
MD5 151a65770cdc3306146ecf9bedd4f41e
BLAKE2b-256 9a3b48947f6a6c6f5a00366b271cd190cf88563c1b5cb58929f75824f8e7a5b8

See more details on using hashes here.

File details

Details for the file kintera-2.1.0-cp310-cp310-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for kintera-2.1.0-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 9d0e5d7a112cc07caa6250376998848cf8edc9f342438928b333b9131f2aaa53
MD5 b9a26b2705b2cea046ab1aec0c02eb25
BLAKE2b-256 45d9769159b790e789aa290b7afb3b67de902a99daea324387c0975391e25c76

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