Skip to main content

C++ implementation for high-performance fitting and numerical optimization in NASAP.

Project description

nasap-fit

A high-performance Python library for fitting reaction rate constants in chemical kinetics analysis (NASAP), powered by a C++ backend using SUNDIALS and SuiteSparse.

Installation

pip install nasap-fit

Requires Python 3.12+ on Linux or macOS.

Quick Start

from nasap_fit import NasapFit

engine = NasapFit.from_yaml("config.yaml")

# Global search with Differential Evolution
population = engine.run_de(
    pop_size=128,
    terminationCondition={"timeLimit": 60.0},
    seed=1,
)
best = min(population, key=lambda r: r.error)

# Local refinement with Levenberg-Marquardt
refined = engine.run_lm(
    best.constants,
    terminationCondition={"maxIter": 300, "xtol": 1e-8},
)

# Simulate concentration and reaction progress
result = engine.simulate(
    t=[1.0, 10.0, 100.0],
    constant=refined.constants,
    reaction_ids=[0, 1],
)

License

MIT © Hiraoka Group

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.

nasap_fit-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (763.0 kB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nasap_fit-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (762.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

nasap_fit-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (762.6 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file nasap_fit-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 92ae2763fa42aa3cf28c080c8a72b4ba5a17c1273168ad5096f3b36c99e9d5b5
MD5 22db5aee9e60b83f31c5295a56f3860a
BLAKE2b-256 590ecf5cfaca1b787ad5432158ae12f09fed9a29d36116ba7d19619d8332582c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheelBuilder.yml on Hiraoka-Group/nasap-fit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nasap_fit-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2ea913b1741fa45ba5c43bd8d07fafd2e72997ac7f35887c123fafe77c4206e7
MD5 28c6e972e8b9c43a5ab90074a8eb342e
BLAKE2b-256 4a1b4c1ef6fc17e662af3d4fc372e1b9b1919fe79eaa53da18aabb85b0d675d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheelBuilder.yml on Hiraoka-Group/nasap-fit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file nasap_fit-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 50a65f4522be722f174360614ed66875a74964b5b3f12a20e47c4aa00993339d
MD5 382cef68c2c4dedcac6d4567d6218b73
BLAKE2b-256 a8a25c1bbc3be5d7fc3774e71f22a0ac117d2f7edf29da4be368408d231f4939

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: wheelBuilder.yml on Hiraoka-Group/nasap-fit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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