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.16).

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.12.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.12.0
File Size Uploaded Provenance Actions
zsasa-0.12.0.tar.gz 522.0 kB With provenance Details for zsasa-0.12.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for zsasa 0.12.0
File Actions
zsasa-0.12.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for zsasa-0.12.0-cp313-cp313-win_amd64.whl
zsasa-0.12.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.12.0-cp313-cp313-manylinux_2_28_x86_64.whl
zsasa-0.12.0-cp313-cp313-manylinux_2_28_aarch64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ ARM64 Details for zsasa-0.12.0-cp313-cp313-manylinux_2_28_aarch64.whl
zsasa-0.12.0-cp313-cp313-macosx_11_0_x86_64.whl CPython 3.13 CPython 3.13 macOS 11.0+ x86-64 Details for zsasa-0.12.0-cp313-cp313-macosx_11_0_x86_64.whl
zsasa-0.12.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details for zsasa-0.12.0-cp313-cp313-macosx_11_0_arm64.whl
zsasa-0.12.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for zsasa-0.12.0-cp312-cp312-win_amd64.whl
zsasa-0.12.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.12.0-cp312-cp312-manylinux_2_28_x86_64.whl
zsasa-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ ARM64 Details for zsasa-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl
zsasa-0.12.0-cp312-cp312-macosx_11_0_x86_64.whl CPython 3.12 CPython 3.12 macOS 11.0+ x86-64 Details for zsasa-0.12.0-cp312-cp312-macosx_11_0_x86_64.whl
zsasa-0.12.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details for zsasa-0.12.0-cp312-cp312-macosx_11_0_arm64.whl
zsasa-0.12.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for zsasa-0.12.0-cp311-cp311-win_amd64.whl
zsasa-0.12.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.12.0-cp311-cp311-manylinux_2_28_x86_64.whl
zsasa-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl CPython 3.11 CPython 3.11 Linux glibc 2.28+ ARM64 Details for zsasa-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl
zsasa-0.12.0-cp311-cp311-macosx_11_0_x86_64.whl CPython 3.11 CPython 3.11 macOS 11.0+ x86-64 Details for zsasa-0.12.0-cp311-cp311-macosx_11_0_x86_64.whl
zsasa-0.12.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details for zsasa-0.12.0-cp311-cp311-macosx_11_0_arm64.whl

Total release size: 48.4 MB

Release files / zsasa-0.12.0.tar.gz

Download URL zsasa-0.12.0.tar.gz
Size 522.0 kB
Tags Source
SHA-256 checksum
How to use checksums
5d64f2a351f2730a103653646e551eba79ac199d256c1b019f185e5ccc7a4547
BLAKE2b-256 checksum
How to use checksums
a1c30f3e275e7f4b6457512ac11550ec3f4d10079727aad434162268831aee45
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
7d126b6ca6f1f20b8f5375fdb48c2afd0fd15bed687d37585d6a282b15e77051
BLAKE2b-256 checksum
How to use checksums
8763bdc0b1c49600bf802da13250571e4171930f4770b14b061667c5273ad92f
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp313-cp313-manylinux_2_28_x86_64.whl
Size 5.8 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
ee4af9d7121c6c1a2934527a400739e764e2dc3a1f900536d97db8ecc5e88de8
BLAKE2b-256 checksum
How to use checksums
dec57992a0c1d8667dda62f92edac27f9333d9e9ab5d57b7911c90a202a07a78
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp313-cp313-manylinux_2_28_aarch64.whl
Size 5.5 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
3674207dcf842c3a10b6beb4c91eb57e662950e2b1dd3af292b45aa93a5e194b
BLAKE2b-256 checksum
How to use checksums
2737fae4d7f7f552d082ddedde6b9e577a88afdc486238edbb0ffc293ab488c3
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
a1f4d40c8d99b2f6beacd321e6a4a562141db4edc5abb4755896ee6357d7d4b4
BLAKE2b-256 checksum
How to use checksums
76a35213a300e382871178e05025b66a1fa9ea75cc090ecb85567fb847955202
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
4fa9f7d9c29a59135498a3d8e3950cd597d107c218f63aca1bf4f490cffa8a12
BLAKE2b-256 checksum
How to use checksums
4f21be203804987db64798acdc7460e1da268dfc99b9bf8e7af4d3a076a439e8
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
917290abe2ed8185e9024e52397131b516f8a042392352485672f1554b3110ca
BLAKE2b-256 checksum
How to use checksums
4cf4005aca14ee668fa51090eb891c6297a237a9def30fcbdc7d5e7ad9e3a741
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp312-cp312-manylinux_2_28_x86_64.whl
Size 5.8 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4cf74dbcbf8842fb765d6fc40b98eff5acbaedd20ea143949887e176ef0368ca
BLAKE2b-256 checksum
How to use checksums
41e7e57c3354b49c76b743bc3b76a0ef48f0b91a56a704342fa582a189e76cec
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp312-cp312-manylinux_2_28_aarch64.whl
Size 5.5 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
2bea4402580351ad011c5ab33214fae47fc3fc38e8bbdc541d1b798f49e0214d
BLAKE2b-256 checksum
How to use checksums
666e7c50349baa86aebc1b036df1bc5f653e01b8112f80ecec66535f7ae04800
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
309fcf622f8d38506799cd917a23efcdf1854b8ebc05078101d4a8d4307a4afe
BLAKE2b-256 checksum
How to use checksums
e3111e504caf4f9ef5d78d21fb47ce7251256988733a79070c556101813fce86
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
d1d8fa6c3612e0753eb270cdfc92d39f6c2b78d02f84ce09b423cc111a940589
BLAKE2b-256 checksum
How to use checksums
a109bb392e4dfdbb9e8f82edcc4f737d71d04b892c0f5cb8181c605905e47a9e
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
20fb325eb4cabeea01b9686cef226f56a66635c004065cfb0a3f126139d7ab9a
BLAKE2b-256 checksum
How to use checksums
3de9c2a21df92b5589dff3b68b904ce25166a5def58cd54a6a29a45e53fd81a4
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp311-cp311-manylinux_2_28_x86_64.whl
Size 5.8 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
4cf0ffb43a1d76bf97a546e63c209fe95c268718569df390b9a197b35d1f6257
BLAKE2b-256 checksum
How to use checksums
8425b8717173b4eb74c93f57f96292a13b2d0d588c3b8efee53267906a90c779
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.0-cp311-cp311-manylinux_2_28_aarch64.whl
Size 5.5 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
c3be5999cb4117248efa894edd13a6f1cdc060fd55ff144cff8f05d71c340c16
BLAKE2b-256 checksum
How to use checksums
4e587694daf313608a9fc015aa78f1c0cc40d9b3678ed768baf0f45bc7d6a9ea
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
d7e716fa1704b5d6e602656a6f3b228771eb2283a24c3154869c1ff80fde503a
BLAKE2b-256 checksum
How to use checksums
8e5a8e4773fdd1f182f609bdee04a756cc6f242d8c3c77f5bacc220d94553de3
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 Oct 29, 2026.

Transparency log

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

Download URL zsasa-0.12.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
52ce113ebcba72e82a31ea37c04ab79fbdf15393f9eff65ce0a6316e5f83abb9
BLAKE2b-256 checksum
How to use checksums
b36bc01239cb08e8049e04ada3f422adeba76fa5dda569869fdd46d15d0e03af
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 Oct 29, 2026.

Transparency log

Security for zsasa 0.12.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.12.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 Oct 29, 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.12.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