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.1-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.1-cp313-cp313-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

kintera-2.1.1-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.1-cp312-cp312-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

kintera-2.1.1-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.1-cp311-cp311-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.11macOS 15.0+ ARM64

kintera-2.1.1-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.1-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.1-cp313-cp313-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.1.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a5326dcb474efe6827cb2bdd263216afd4d7c7900b820cd58099ba963554cf4e
MD5 3499e15815b1f77f81dc477903c2ddc8
BLAKE2b-256 d474561c165e6e7cabf999cba8a3f318a3a60ce35526d6bb583c9cb453cd3c53

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bbe22a8ae1ed73e24100532b1ae785e734ec3e89dcd5bfab1de0d6bf03191250
MD5 2d587de597ad86a826883f8a3f69b1c2
BLAKE2b-256 23c8bc7028d49739d2b5fd623cf252cc79ae4e71f01f64a2bb2890e2c951ff3e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 f1b47a210ab8ba7227c833bcc99423662d97c1dad7840367ebb66876908b3080
MD5 b97225980f55c7910b954a2e3cbfcd8a
BLAKE2b-256 e22cc84a3041c6abf696b0bcb5ef0d5e101a67847315e8d1b188f21cda3dffca

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c15ef98203ca4d3b86e56e45ae8c6a47db3c6ff67d02ca2aad8bbdec85089bdd
MD5 a27ef849d87dcbddd96e6ac0b85195fc
BLAKE2b-256 573aa8d38b4b0d2e53a9a1c158f8ef89a37b834329838a675567d0290cdab081

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 c4b7b89b3d52b3c808e5875e5ac552c572d841d450a918aec4b6b9cc2a9215be
MD5 c4652a020986ad5dc85e6463ddba215d
BLAKE2b-256 58034601c66c32d7c267a515d50b9887cd4f6b4ce256d6237cfd7e8d7c3ce99f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 5bf860f12b33bcb375a2e28ed943ccbfac2700273b517b08aeb61e7cd6ce2f8b
MD5 b139ffa9065323ff51a2c10595edc3d1
BLAKE2b-256 2469dc40e4d16d2fd7397fe81021b1cc5421cf51002ec375e47e1db92deae69c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 39be66c145435ef134fa6eb0000041a9e388f78723442afde7dd0bb164f18282
MD5 4f22c3205eb46db87ea829661c0060d2
BLAKE2b-256 b15d32ca98c22b1ff254a8bb2371f005664ca481c3eef6c3e150099c9bb14a05

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.1.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b24f5360aae875e697660523f4bc75023aacee911e4a678caaa1ef9b30ab1dcd
MD5 540d17469a6c4246d7e65aecb43a9d47
BLAKE2b-256 d10c1e98427639742517a555608f1aa92a5b54060e0d6433c7e1088259e8c286

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