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.0-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.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (762.8 kB view details)

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

nasap_fit-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (762.7 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.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.1.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9ae3ee052cd190c97b13dd5e84e603ae09e29b40fde3d1d0aaa9470216378e52
MD5 88cbe66498ffdc3e9931ce1875e9e0a7
BLAKE2b-256 1990606f339b1d245850cc003dedd3cbb3b3e42922bc26d1d0c147fedd935e60

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.1.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e62edc85a585ae85c96ed572eff0c0dd12eb82d8b571fcddc07cea93f777896c
MD5 4bf23bb4e1e3e4cedd420e0f08af54bb
BLAKE2b-256 63673b4bf9a236035cf57901f521fa673f739910d5540eeac4adb7b421055d90

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.1.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 38fd803b2541fae25004736a4eeb5366103241a0ef841f74500ffc35c49519a5
MD5 aa36bc1d69994fea1b1e4d28ee23291d
BLAKE2b-256 1a9f0bc36ad1b9b8e75af2cf6a7fb65aee821f0e41dbecaa807b8e11cc6b1cf7

See more details on using hashes here.

Provenance

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