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

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

nasap_fit-0.3.0-cp314-cp314-macosx_11_0_arm64.whl (482.2 kB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

nasap_fit-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (771.0 kB view details)

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

nasap_fit-0.3.0-cp313-cp313-macosx_11_0_arm64.whl (481.9 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

nasap_fit-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (771.0 kB view details)

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

nasap_fit-0.3.0-cp312-cp312-macosx_11_0_arm64.whl (481.9 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2e7d994ba27c4d31f2c33f88084e18c72b5013fbb9b49825506efe536464ed72
MD5 7582d016c52724a4fdb62a0e8e800802
BLAKE2b-256 2bc85308e692cafdaf28b7b3524d5398f50a411cbe9689e47f5b66e6b50bc4e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3149764c00f9fc394225f9e7354199254cf485c1a29aefe7fe39ba287477d46
MD5 7b4ad853a5aeb286d9396f479366d8d5
BLAKE2b-256 bac7d2d01a10a4090d492f08f3ac1c09e3301ad4720ecf123a6066689ee067cf

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 81476f6e004f31ae84097b7955203f7e873f0075e9bbae15fa46b7fe4b840655
MD5 5b05bc92096c4a88df3004f43f7b6777
BLAKE2b-256 a421613f356f0dcd08e4ee55552a5e6841cb163dfeedbd15e7e3f7ca2ef15f68

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a286d976bae414a816387e01c24466a21fd656621c5695ed64df8f56968d4c40
MD5 897e6449a2e43ef0c35a562d08d9c4cf
BLAKE2b-256 7abfa945c03cf78166bad41b900574b74f0d374475a858798115254a29675448

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c260b0eac2c842b31815a47acc4ac52087c649f280e3651e0246838073576a31
MD5 3ec723196b7e217581049c2a3539176d
BLAKE2b-256 f96b53fe6d3730766a15361e3d0c4a35cca1e67be2cb9e103144074e5c54ecd4

See more details on using hashes here.

Provenance

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

File details

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

File metadata

File hashes

Hashes for nasap_fit-0.3.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e832e861cac8d35d0726f98c96b154a83e7b29455eff54790118e2c62d15df0
MD5 929982b1a7007497aa980a0fc24c78f1
BLAKE2b-256 0ece48136af647150e6b579171e9955f61833015767fa3cec08e04216eb86aae

See more details on using hashes here.

Provenance

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