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.2-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.2-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.2-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.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.2-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b0ebdb025404389529e3b545f39355fe162ee998c2c347ef39d17676bdee8389
MD5 abac8ff907ce289c1f05de0dfc1370b8
BLAKE2b-256 1c4d14bff8056609ccefc0f8d3410a3c198910e11a32f9cc28cb37209dfd139b

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.2-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.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.2-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 97f80747efd3a0e207779107a0d6e5a00a6081ec53fe02ecb6b5f65246fab90f
MD5 3815feaa2aff0a6c9973dac3b2892f89
BLAKE2b-256 54b82552dc3ac47ef74998eaedb730ee4ddd5ee759419f2ab23852b853752ba4

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.2-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.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.2-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 294b3bb78f6789d723b0367fd4f265fa9536d2ecd86919bb38d007c1b7679427
MD5 c26ae049d33972cbb923ac43e7d1fad4
BLAKE2b-256 2a2df14f4c235e73e91485d43a8ede1f2f74f219f906d7d420c5f2f18f47deac

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.1.2-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