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.1

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.1
File Size Uploaded Provenance Actions
zsasa-0.12.1.tar.gz 524.3 kB With provenance Details for zsasa-0.12.1.tar.gz

Built distributions (wheels)

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

Total release size: 48.4 MB

Release files / zsasa-0.12.1.tar.gz

Download URL zsasa-0.12.1.tar.gz
Size 524.3 kB
Tags Source
SHA-256 checksum
How to use checksums
6895c8f405fc7450b22dfcc27abb87dc3901466c9edd1c67424d5b1ed699d15b
BLAKE2b-256 checksum
How to use checksums
dda22d55ba8ea17f7a99370a47a1791514c812f9ea049530ed021f8f3a530876
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
594eda912c9542a4c52ed1446e55974b32ff5525e5831756f7600caccdd7a76b
BLAKE2b-256 checksum
How to use checksums
3c139a1116efceb11baea3578f2102dadeb8cfd929d26a8eead80f8160b303c5
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
9fa8d53c4207bdb8dfa1f9dc628f6b4033d9b44821aa10f4088b9435834cffa1
BLAKE2b-256 checksum
How to use checksums
f030cbdc63e8ecfbbc01566c0844c6d34992ae16dd6c282d96aecea75c9699fc
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
ef2208ef48a6e89c410e4d37b418cd90b4a89bbe8801ec443977263cd804411f
BLAKE2b-256 checksum
How to use checksums
616c215ee9b62340340bb1d168ab4682d74814a2c0bb576c3dfe072409f0e981
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
4e268d179469893b7f4078ba3a7f954faa85db65c9b83687123581dd0d9eea4e
BLAKE2b-256 checksum
How to use checksums
3e4d7ff1ae832a3578e2aa1b3b6f01eb966730e1ce001c789db7ff2a25cd99ef
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
6a4b567b5333b961ffad7dbb294d9a98c20dc0cc5434d6292180411144021213
BLAKE2b-256 checksum
How to use checksums
d77cbce4fbd5fe0064bfe018c32e14106e6c8493def7e15cf24ccf6e19ad4430
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
fae8cd456b85491494f4b9a203c24b8110c73570f1c1434213d54dcfe62eb75e
BLAKE2b-256 checksum
How to use checksums
5e0a662bbfff118acb37665b16790138e02ac0b6bc782cdebf84a3ea792044be
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
e4d4b4cb22f57ae729a3a0b0f3e797c09873cafd34ea47e2303e51a3380650bd
BLAKE2b-256 checksum
How to use checksums
44dbfafe1ddb6aaad7130e60013e7373f411f1438721c585baecc0daa1a04417
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
db527a67d07fd9c8be431b96315e1178e6a913d8f930e2a896ba09c62ba85a5a
BLAKE2b-256 checksum
How to use checksums
9c7850d0ab3f82c0ae5c6c1365eed878437e5983f30fe1d70e1686a2b04ddfb8
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
ab1f180d9329b121961ca149519ac52887ff4621f09e55f70e4e34e41b0f9af3
BLAKE2b-256 checksum
How to use checksums
02eb323f7e5fbcae58f7d1374e9e0ca7cb0b3d9a90f4d556270dcc6ba7fea6a3
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
665aa7417d71709a00a99db0cd860457ed8d5abd09ca63b7d3973c842a036474
BLAKE2b-256 checksum
How to use checksums
c3fa6fc55d0bbe13ecee9b877ec0235ae89d258329a6673f174f353d5d3b0d26
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
3281d7c517b77475195199afbd8a8e7df2d04a6f167b1b28264233e23163d08c
BLAKE2b-256 checksum
How to use checksums
7659f6739eed6f6e30bd97a62db4e14f2320d93990c306130e4a78408afe1efe
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
f6816dbec2e76befe4f5c803e1eda7c2f17b6b6025bc0c803399d3ecc17abc9b
BLAKE2b-256 checksum
How to use checksums
1177c7b1f1547e76b4819b9c2b80804d26f6b5cbd393d815dfc7ac9211de650c
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
9bc5d103941f6538dca7564ba89ed2fbeb7ba335c75b119838ce7b18cd0c2d42
BLAKE2b-256 checksum
How to use checksums
51ca7cc1751e2b817f22f36d9cfa226f975207ea4f62ece473f42419da009911
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
0a7c14d2ea0dc71f89d37fdfbb796a998b415264de5d2ffab910fc8e95c40410
BLAKE2b-256 checksum
How to use checksums
32307f851aad2628639b6d474d2615b6a60e9e8b1fb46151f1ddfa3127e2cfb3
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 30, 2026.

Transparency log

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

Download URL zsasa-0.12.1-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
c5db916b1e2c338cde2ac9c8e8defd788c46ef71bb5dfd146c4fec04b7e0304c
BLAKE2b-256 checksum
How to use checksums
81b90e6d403e80e803bb3f694c6ca64b081132d7bf476f485e24f335798658b4
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 30, 2026.

Transparency log

Security for zsasa 0.12.1

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.1.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 30, 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.1 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