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.0.1-cp313-cp313-manylinux_2_27_x86_64.whl (21.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

kintera-2.0.1-cp312-cp312-manylinux_2_27_x86_64.whl (21.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.12macOS 15.0+ ARM64

kintera-2.0.1-cp311-cp311-manylinux_2_27_x86_64.whl (21.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.11macOS 15.0+ ARM64

kintera-2.0.1-cp310-cp310-manylinux_2_27_x86_64.whl (21.2 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64

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

Uploaded CPython 3.10macOS 15.0+ ARM64

kintera-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl (21.2 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64

kintera-2.0.1-cp39-cp39-macosx_15_0_arm64.whl (3.2 MB view details)

Uploaded CPython 3.9macOS 15.0+ ARM64

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp313-cp313-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 3b3a758c92e1a5915f61179a715d2ba59666661535922960c7825cf487f529f4
MD5 d8b36fdfc0d90e868730b5bb927654bc
BLAKE2b-256 76e34f3b3303d98661ac780dbbac62e78e7194c6323a160b9a6fa95db18017a7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 178a546ddddb6b2061f6d7b97479112e1bd4fade5a7fa26f313f9aa8a7d87603
MD5 19a7ec0489143153cd64497e51332dea
BLAKE2b-256 9a2cd05acbd7f68d19883fee94377b816438e23f1d43c1aebdde7e4393e5ce12

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp312-cp312-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 235d2d8aa0f7e8e20b713ddbbc1f051f102d997f9fb2ecfa14f1edb66863f9d9
MD5 ec87f49fded93f3f6910d0852f0b54e0
BLAKE2b-256 f5de9934aa1cfdfe8de83c347ff7a36c972d6eb8fb7fc9235d7a7568cf4cf87e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 e6d72b05a44232e2b8fe8b65823141962af0d377f25787dbce0a8ac8477bf90e
MD5 2ff8f6404d903e13a0b2a68e238eccb7
BLAKE2b-256 16c1f73ebde33fd261ac5effe8237522bce90f10eeb6742bff2b8ed1ef4e2da0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp311-cp311-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 a6a8585d12bced9527a37382701585155948f551e562a9c9c3668e7f7b639b8e
MD5 a50a080b0cfdebf47072229779dde422
BLAKE2b-256 e201f70ec1643bb4152d64be68211c40d1694d2ebee23b7a50e9191b1200565d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp311-cp311-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f5908a54b197ee0110abf2d31c8d8789993ed97b23bdefbbbb3551395cbda0c4
MD5 b7b78cefd5b707444ac85b8b1c77b457
BLAKE2b-256 3dc20e1352efeec3398945dd96e807f4acc35c0ba1373c09bf1d816d0a9e1997

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp310-cp310-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 1df575f60961ae4de2c2528ae04b0c1134a7c6f01adf37f07c0cdbdb6050accb
MD5 8a2a68b158a91ada554f175c7839450f
BLAKE2b-256 5c4342fc7bfef99e52c17536cd6cdf8b7d7b86582862ae93095ac15144096d39

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kintera-2.0.1-cp310-cp310-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 a9e9b24f9a29c0fbb8190e933daca6742bf52fdc5b05742b855a6ceec8663cac
MD5 320ce9ffcce65b8a92a744c218e62b26
BLAKE2b-256 d125243a8bf60fecbdb7709e10f155021cb06b5a6a347acf92e46b1525f48894

See more details on using hashes here.

File details

Details for the file kintera-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl.

File metadata

File hashes

Hashes for kintera-2.0.1-cp39-cp39-manylinux_2_27_x86_64.whl
Algorithm Hash digest
SHA256 fc0ac757c16aa13d3d1862859c29b2f98d6e9459ba893345c3ff8ec3a2b36a6f
MD5 f00a89ef7454aaf86ead9015b3f7d081
BLAKE2b-256 977d202911f02a8eeffe87a8063176e40de5992e5c04a930f3026d4f6d362369

See more details on using hashes here.

File details

Details for the file kintera-2.0.1-cp39-cp39-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for kintera-2.0.1-cp39-cp39-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8ad90e08343383bba74190b224762c620a2afe9c7c4740b4c4b07f5835168616
MD5 394ad5fa013b73c8d967fcc97d163bbb
BLAKE2b-256 54593e5603afffe82a6732d1503a47e9e607765e3964b6238f5d6f68bd2b6543

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