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.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.8 kB view details)

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

nasap_fit-0.2.1-cp314-cp314-macosx_11_0_arm64.whl (478.5 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nasap_fit-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.6 kB view details)

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

nasap_fit-0.2.1-cp313-cp313-macosx_11_0_arm64.whl (478.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nasap_fit-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.5 kB view details)

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

nasap_fit-0.2.1-cp312-cp312-macosx_11_0_arm64.whl (478.1 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 cd62cdcd3f59674a35f56dea41dd7ba5fddb869867157549a93c74d5ebac7771
MD5 5c9183f6f936b11c7de707131ef92db6
BLAKE2b-256 f221abaa8ff46e455630e78d634f46a0df7e73ba72bbfc613c8add1b4b2328b1

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.2.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.2.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 908c8178ee009aa12ae0d8580063ba79cb6c0c55b1f4c599542cb01871bd064b
MD5 5151b45b0439ecf0d09bb665d2de4136
BLAKE2b-256 0d7a8d6bfba5bafa58392087c59bbffa0a210a1bb53e8b37cd36d5d7fed2d48d

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.2.1-cp314-cp314-macosx_11_0_arm64.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.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 24518aab4fbd5a2d44ead8b223b00402fbdaaed76973643d0e8ece672fbf9b0f
MD5 4d205a168f2be03812e2289c09eb3f21
BLAKE2b-256 36be02a09ec9dacf14d44bf7d73a7ecc11ea5bb31c204695b6d362353e34502f

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.2.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.2.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 710b46b0df00dd660691506431f0b80d95dfab43f67a1b45d57254cebe252ffd
MD5 b0ff988f4460df79a3bf661ef2f4abca
BLAKE2b-256 73eab9840b4d4d2ccabebdc2a039f919a550d05406cb7e3ff969c56ca5d878b3

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.2.1-cp313-cp313-macosx_11_0_arm64.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.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ed4afc82617c8eb444faeed379907a163dfcd2ddcc41ca80550e5dd826b0a8e2
MD5 9532c9afd4cf9946745041348b233fa3
BLAKE2b-256 4d419c58c204937222dd4372542e67c0a7b3ef0195aa164c5dce3100834fa39b

See more details on using hashes here.

Provenance

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

File details

Details for the file nasap_fit-0.2.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for nasap_fit-0.2.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a1fdb9b2d718582e01cadb19c521fe97b495757e6f79a2fcf7343c1b4a34f608
MD5 f870aba5c461d7bf1e55ccc6849c5c8b
BLAKE2b-256 b63cf23fb88f773167556f4f17734415dafd8b8256cd8354da0dbf4f62fe621c

See more details on using hashes here.

Provenance

The following attestation bundles were made for nasap_fit-0.2.1-cp312-cp312-macosx_11_0_arm64.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