Skip to main content

zsasa Python Bindings

Python bindings for zsasa — a high-performance SASA calculator in Zig.

Full Documentation

Installation

pip install zsasa
# or
uv add zsasa

The x86_64 wheels need a CPU with AVX2 and FMA (x86-64-v3, 2013 and later), and the macOS wheels need macOS 11 or later. On an older CPU, install from source with pip install --no-binary zsasa zsasa (needs Zig 0.17).

Optional Dependencies

pip install zsasa[gemmi]      # Gemmi integration
pip install zsasa[biopython]  # BioPython integration
pip install zsasa[biotite]    # Biotite integration
pip install zsasa[all]        # All integrations

Native Library

A wheel from PyPI bundles the libzsasa shared library and the zsasa binary. The library is looked for in the file ZSASA_LIB names, the package directory (and zig-out of a source checkout), the environment of the running interpreter (<sys.prefix>/lib, on Windows <sys.prefix>\Library\bin), and /usr/local/lib and /usr/lib, in that order; the current directory is never searched. Packagers that ship the library and the binary separately build a pure-Python wheel with ZSASA_NO_BUNDLE=1. See How the Native Library Is Found.

Quick Start

import numpy as np
from zsasa import calculate_sasa

coords = np.array([[0.0, 0.0, 0.0], [3.0, 0.0, 0.0]])
radii = np.array([1.5, 1.5])
result = calculate_sasa(coords, radii)
print(f"Total SASA: {result.total_area:.2f} Ų")
# With structure file (gemmi)
from zsasa.integrations.gemmi import calculate_sasa_from_structure
result = calculate_sasa_from_structure("protein.cif")
print(f"Total: {result.total_area:.1f} Ų")

Features

  • Two algorithms: Shrake-Rupley and Lee-Richards, with bitmask LUT optimization
  • Selectable precision: calculate_sasa_batch takes precision="f64" (default) or "f32"
  • Multi-threading: Automatic parallelization
  • Atom classification: CCD, ProtOr, NACCESS, and OONS classifiers
  • Analysis: Per-residue aggregation, RSA, polar/nonpolar classification
  • Batch processing: process_directory() for proteome-scale datasets
  • MD trajectory: MDTraj and MDAnalysis integrations; use pyztraj for direct trajectory-file I/O
  • Integrations: Gemmi, BioPython, Biotite

See the full API reference for details.

Development

cd python
uv run --with pytest pytest tests/ -v    # Tests
ruff format . && ruff check --fix .      # Lint

License

MIT

Metadata

Release files for zsasa 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for zsasa 0.14.0
File Size Uploaded Provenance Actions
zsasa-0.14.0.tar.gz 543.3 kB With provenance Details for zsasa-0.14.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for zsasa 0.14.0
File Actions
zsasa-0.14.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for zsasa-0.14.0-cp313-cp313-win_amd64.whl
zsasa-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details for zsasa-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl
zsasa-0.14.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for zsasa-0.14.0-cp313-cp313-manylinux_2_28_aarch64.whl
zsasa-0.14.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for zsasa-0.14.0-cp313-cp313-macosx_11_0_x86_64.whl
zsasa-0.14.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for zsasa-0.14.0-cp313-cp313-macosx_11_0_arm64.whl
zsasa-0.14.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for zsasa-0.14.0-cp312-cp312-win_amd64.whl
zsasa-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details for zsasa-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl
zsasa-0.14.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for zsasa-0.14.0-cp312-cp312-manylinux_2_28_aarch64.whl
zsasa-0.14.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for zsasa-0.14.0-cp312-cp312-macosx_11_0_x86_64.whl
zsasa-0.14.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for zsasa-0.14.0-cp312-cp312-macosx_11_0_arm64.whl
zsasa-0.14.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for zsasa-0.14.0-cp311-cp311-win_amd64.whl
zsasa-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ x86-64 Details for zsasa-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl
zsasa-0.14.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for zsasa-0.14.0-cp311-cp311-manylinux_2_28_aarch64.whl
zsasa-0.14.0-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details for zsasa-0.14.0-cp311-cp311-macosx_11_0_x86_64.whl
zsasa-0.14.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for zsasa-0.14.0-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 50.4 MB

Release files / zsasa-0.14.0.tar.gz

Download URL zsasa-0.14.0.tar.gz
Size 543.3 kB
Tags Source
SHA-256 checksum
How to use checksums
803e08cc087ab3d2798e94f4fd228adc9ba097a1194cd68ebba80714f46da6bd
BLAKE2b-256 checksum
How to use checksums
36b98bbf9e30df20a9f5ca38d8563b4196000dde587458c720db16664dd39f10
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp313-cp313-win_amd64.whl

Download URL zsasa-0.14.0-cp313-cp313-win_amd64.whl
Size 1.8 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
d4ac0ef685199db4f007862b8635eeb5cf8a96f60add9021554c0e3ef73b6016
BLAKE2b-256 checksum
How to use checksums
d97a2a2714d07265ff4a0a69b7210b08f8502055fb446248f3ce87435aff90ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL zsasa-0.14.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 6.1 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
f82113f3d43eadda6e42d2b83e8e2c1b5a5679355d371182e41452fc43d9253b
BLAKE2b-256 checksum
How to use checksums
d2463a56373dd96b8e9f814c9954aaf13d3ef14b65fb770b2eb247274bee3e19
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL zsasa-0.14.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 5.7 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ab53a9df9e3b82167c03517a0e57c503b1b081f6bbe13942a1d519ac18e1c404
BLAKE2b-256 checksum
How to use checksums
7ef5e7b129bb75369e2ea4568837341336afd9b00eb658a9b3af3c0313a752c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL zsasa-0.14.0-cp313-cp313-macosx_11_0_x86_64.whl
Size 1.6 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
b6657fa7dd2cbb2552ba43df54c72a134b8bfe45cb72fc5c43c76b68da404632
BLAKE2b-256 checksum
How to use checksums
5672211e9ba31bcd5cc112118695510b949081acf3e448f745a1ab6e7276729e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL zsasa-0.14.0-cp313-cp313-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
eba562abbe781618c3faa4f520d1948f06ef2ef6e05cd25f9c055060d9175329
BLAKE2b-256 checksum
How to use checksums
7a754589940d9f4eba50bc84ce1eb54caef7d0ebc4876ef4263e9264f5572df9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp312-cp312-win_amd64.whl

Download URL zsasa-0.14.0-cp312-cp312-win_amd64.whl
Size 1.8 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
2651709b4992cb4d044b85ce39b02db167cbd4865bb39204aa76e6bcf63b9ca5
BLAKE2b-256 checksum
How to use checksums
f44bba72f716d0c337dd13d4d7ee0a13e83ad8c38ce72f35a3c064bcb84703ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL zsasa-0.14.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 6.1 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
097f3b8aea29aa6d46aa6d94adc082ded0349e1740b7fbb88f78d88996418fc8
BLAKE2b-256 checksum
How to use checksums
2f2f3950066b575223d947638cb2dfdc7a9cfff73f693b8abb48fee76ad532fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL zsasa-0.14.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 5.7 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
70e75ee05c93c7a8220ea0cc7e2110aedf8319db3f66fd2f0a2de2066e35a1b5
BLAKE2b-256 checksum
How to use checksums
654005128d141a3b2c1f4f8f98eb5d268a1c25cdc5f57f8589f211a61c623424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL zsasa-0.14.0-cp312-cp312-macosx_11_0_x86_64.whl
Size 1.6 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
6da775cdafde006f117e77072206c3a7b446517796a97f22850238b79c66148d
BLAKE2b-256 checksum
How to use checksums
0dbd3514f22cd639b3a9c336829219fa5aef16ddc1f0c0f70b14d29671408adc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL zsasa-0.14.0-cp312-cp312-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6d36d3ba2c0e91f0448a4e127673984626a50f7030ae0ffea84c3e8ab10fe825
BLAKE2b-256 checksum
How to use checksums
0d866510b7505dc7a184b7c188a0d271734efae68808cfd1f397e52a87f91b5e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp311-cp311-win_amd64.whl

Download URL zsasa-0.14.0-cp311-cp311-win_amd64.whl
Size 1.8 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
756f34f64e105616b0e1bab790856af343d85eddff85a16c2a15743453bc5263
BLAKE2b-256 checksum
How to use checksums
07b1a2c21e34122e88c40f85b333a6d1ac1c588e9332c8f485280c595ab439f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL zsasa-0.14.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 6.1 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6c9a386048f113712b43754b4f1fc4305e60301fc4b02c6bbefadc2020282b00
BLAKE2b-256 checksum
How to use checksums
db13366bf18952bfa37a2f1ec397f5837813069da47f0dfd33ac35f014968891
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL zsasa-0.14.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 5.7 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
6f6adb614e790b36826b30832657e2d37dbfc34c753f3228a0f3bec9a155e02c
BLAKE2b-256 checksum
How to use checksums
9a2817e3eb2fa6e469190159631dc9f842495a4e9e603e40f19766389d5c4487
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp311-cp311-macosx_11_0_x86_64.whl

Download URL zsasa-0.14.0-cp311-cp311-macosx_11_0_x86_64.whl
Size 1.6 MB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
ea24c292952031466a3b79a28739fa83adf842080cd68c70336326996d57d450
BLAKE2b-256 checksum
How to use checksums
44b6aae6dfa3faa6e1e8a19350214ac251dd91a74ea972a018d5f4c432ea41f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / zsasa-0.14.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL zsasa-0.14.0-cp311-cp311-macosx_11_0_arm64.whl
Size 1.4 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
299eda266cc0ca7d6afa3464181c0e75e8b99a9a67099987edaefed9fcf50988
BLAKE2b-256 checksum
How to use checksums
c8c8fbfca316cf36f58231f6f08118c0b9de1a58cf0f1bc20f53f533da3357c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for zsasa 0.14.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 16 files in this release have been uploaded with provenance metadata.

Select from 16 files

Attestation for zsasa-0.14.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.0 This release

16 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page