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.13.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.13.0
File Size Uploaded Provenance Actions
zsasa-0.13.0.tar.gz 528.5 kB With provenance Details for zsasa-0.13.0.tar.gz

Built distributions (wheels)

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

Total release size: 48.7 MB

Release files / zsasa-0.13.0.tar.gz

Download URL zsasa-0.13.0.tar.gz
Size 528.5 kB
Tags Source
SHA-256 checksum
How to use checksums
781e522d6ad9d1727fb4dd977bcb72dc0d7015b4e0264f6d3cb2fe9795bf739a
BLAKE2b-256 checksum
How to use checksums
a4c199c0639d05eacb205976b129f5718943bc1f64858490aa4b1525dde6f019
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.0-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
ee1211293fcc221f6ea4e50cec5f98c06e7f9d891ff67da0cd2d1a417012d7a3
BLAKE2b-256 checksum
How to use checksums
9df7cd17ef1ffa5a9c77e1399e06b651c48a3d0c5e7037892c6ec008eda22038
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
3a4dc8c5dc7d72f8b5233c7cabb77f3da281e4816ab7f917e8d4f621950f47cb
BLAKE2b-256 checksum
How to use checksums
68dd148a115e6d31d2734b472109450d7d2282a618d04356d3bde96b083bd66d
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
a62d1711758db853299df322346593c4e043c75e80008aa40caf8741aed46cff
BLAKE2b-256 checksum
How to use checksums
f182be28aa6817088edc8b8350d512a5391d35bee78b436ab40e5edd847b7496
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
e3c84df725bdf918f7686371da9cf1a21aa86ae4af384044d9f5d0e12f34ab16
BLAKE2b-256 checksum
How to use checksums
fe9941955aa0e7a5b1e3dceb82923f413e97f662236eafc9f5688ab9cc9c0a8d
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
61aa62078e7c60a6f5cf4b673c0a6f04e50dc6bb62de33eba0e19efc89874744
BLAKE2b-256 checksum
How to use checksums
b77e3a858d3d13b5d1100e034530f53f3df025daec38211295e64ebe4a4b4189
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.0-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
745ce3c99a8d3f445e5e8169d01f3457f464b6f81447043981fb50df80c45879
BLAKE2b-256 checksum
How to use checksums
d6af22e2322b3e6d0b5fe7392f884ca5771aef23e9bfae5f5e8aa217de5fb7c0
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
695b6c1a5e41f60085674ce751580589241749b0466cadc33e4077c4e4ef15f0
BLAKE2b-256 checksum
How to use checksums
e0eca50308793cfac3a146f85754b84de51a69846c3e8bf3fae63426c5ee0013
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
bbbeba5ddcf8b3144eab07fc5b42df0fb83d2e4322a96c02e929bede0631ef15
BLAKE2b-256 checksum
How to use checksums
242aa19edf35e3a7af54b8375f0c171d70326486b180e684c392daedea1430b7
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
f477aaf0110a1d18d5961ed43c16dac1cf2860a8c0ec092f9f1900bfa79602ee
BLAKE2b-256 checksum
How to use checksums
57f5dc2ebd439fe492a04bd740781f995e344a435a2864d878a88d7606a9bcc9
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
37e08b12f3078dd56a6a240ff98ad32d3867cc5ae417e5f3cc4af6e4bfc1801a
BLAKE2b-256 checksum
How to use checksums
87b051415bc57627f87fe5948127a583698c5d7a614e89d29091616feda14983
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.0-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
912f33cf8eef198e1d93c73c3cd24089a470eaa2c576ae56e3a64910b91037c1
BLAKE2b-256 checksum
How to use checksums
5ce1cdb9eb79071f35a240834c0a047f23eed6bba4c91db078716b6565a55d02
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
29501f0e218e18270da765bea36001a8d919e20d6f3b271b0130ae5498d3dea9
BLAKE2b-256 checksum
How to use checksums
1ebdb8729fa32526379054e391e950db051491969d12d33c5582a89d4ffc276c
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
a4f9656405f2538a52f465ebbc6e8cbd0e23c942d28ecf5823a343dcdb2021c2
BLAKE2b-256 checksum
How to use checksums
ae087b09572a3a6d2cbb1aa392c1069cf22a7c8fb330ffafe4ed8f530957d1bc
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
f1f81b33b30a321adbdd316b6092d51f7408d24f090e74285d80eaf2f1e72008
BLAKE2b-256 checksum
How to use checksums
f3c7e2b5c3994d82da71bc55b1effb3853c1b9af0a522f07f0baae785cc797cc
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 2, 2026.

Transparency log

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

Download URL zsasa-0.13.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
bf85104a63d802890b49e856dfcbd63a4f6ce53f7cca20e0e3b08917301aa5ce
BLAKE2b-256 checksum
How to use checksums
9601a02a4b5afad32b3e08f0f62c7145832d8725fc801098010fa36fc9154649
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 2, 2026.

Transparency log

Security for zsasa 0.13.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.13.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 2, 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.13.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