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.10.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.10.1
File Size Uploaded
zsasa-0.10.1.tar.gz 496.1 kB Details

Built distributions (wheels)

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

Total release size: 47.4 MB

Release files / zsasa-0.10.1.tar.gz

Download URL zsasa-0.10.1.tar.gz
Size 496.1 kB
Tags Source
SHA-256 checksum
How to use checksums
7d4f3210a59f06b394f52d33cbddf09f1d84e32e15f5cb91e9fcb64c5c8713d2
BLAKE2b-256 checksum
How to use checksums
c06a371dc46953cf1b6373293aa7e76631426b715a6929bd420befdfaa833052
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
6f7da70505c12ae6118ff398195d599d64d8d1d2c49111ecb1f89cc77366f2c2
BLAKE2b-256 checksum
How to use checksums
46e3704fbe7c00b535d89cd328312f973ec7825fa724daa3678f1738676a6f92
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 5.7 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
2f1551d06b362a38825a432b90efaf6fecc9c947696df1a856c45d05cec9f39a
BLAKE2b-256 checksum
How to use checksums
2adcd60d69fdffb886ae5ee1dc01f908e9c51e23e9fedb813c39b511cc852ff1
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp313-cp313-manylinux_2_28_aarch64.whl
Size 5.4 MB
Tags CPython 3.13 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
efb87bb7c5a4add6d3d61bea1c15bc26b211648696ecff681c836648124b87ef
BLAKE2b-256 checksum
How to use checksums
a582b64b18307107377b8ebf175df5f5dde34cefc64b7e6ff828caf53e0319ff
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp313-cp313-macosx_11_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.13 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
16f90415d43313f371c32267e0056cd6abad246af4ebe6c029dc30d2af62a2a8
BLAKE2b-256 checksum
How to use checksums
fb089365105e0a9f834527effb342ce387f896a372ec6a504a5932a6fda7c1ba
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.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
7b3b1ff25246db9a051c7f4d874d5e73e2b7b0796d8680cdf47504dc3d07f3c3
BLAKE2b-256 checksum
How to use checksums
f03891d40d1427103c894ac50ab78a0ed0d4dc3c0f2e40dc7a70cb4f9dde1816
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
458966995fc457338b67566b1031e87afe475d580f61046c66d72830b3d5d44f
BLAKE2b-256 checksum
How to use checksums
d2e09a25fec5113eaa6afe8bfd43af576f8173acfc8b7c5fbd56fa6407b0eeaf
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 5.7 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
6598233127904d71823d86d2cb5a6ce69dcc18169c24fff338a19c48510822b2
BLAKE2b-256 checksum
How to use checksums
8996b55b98ce451beb3a19a66d95d8c2fb92849fba9054302b5e7c4be017fe4a
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp312-cp312-manylinux_2_28_aarch64.whl
Size 5.4 MB
Tags CPython 3.12 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
ff3aca1b4d334c40a6321b371c9e2e3852b2530d233e623a3bbb7e409f62a36a
BLAKE2b-256 checksum
How to use checksums
b0dbfb4d01e87da33147eb112e2d8ee9ac86e8e2112262e1460b773281ea19cb
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp312-cp312-macosx_11_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
b332948baba73c9469a4cae9d9953eb224a7d37317690b58b4e4a943b5f373c9
BLAKE2b-256 checksum
How to use checksums
74ee1839d16fdde16d0542a807e09beb99387f0954bc4bf934ddef6e49513907
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.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
dfa53696172538dc2a43563d479e9a986be6ab58625086e7c80b6e5a1e01f63d
BLAKE2b-256 checksum
How to use checksums
580d78bf41134447a099c4fbd34eaea929e708c40352e65f0b14b82e0324bb09
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
001252ee5f619cb80be63a45fd74a9d89ea69e56368a60854c86b72d0442cc0e
BLAKE2b-256 checksum
How to use checksums
d51fc7060763a14d9058f7fd035c9c45244ba2b00ac3288736a3b26d44bcd6a4
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp311-cp311-manylinux_2_28_x86_64.whl
Size 5.7 MB
Tags CPython 3.11 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c1a66c2c3dafb1d6abff3e5a3dbbaa54ca2acf1d5ac0fce18e0b2f65672e4d43
BLAKE2b-256 checksum
How to use checksums
57e9c055ba6b69e73cffc2e6b9776b0683a1b3e888323429b3b60fafa4fb2154
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp311-cp311-manylinux_2_28_aarch64.whl
Size 5.4 MB
Tags CPython 3.11 Linux glibc 2.28+ ARM64
SHA-256 checksum
How to use checksums
cc3471b4b29b50cd868b46891ad84a7e99e17ce6eb7fe15bb1436bd7ee1f2609
BLAKE2b-256 checksum
How to use checksums
c2f7f8d169b964d09cf057f94f652226bf1ca6503cb6709ad8dbd5c0e8f52394
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.1-cp311-cp311-macosx_11_0_x86_64.whl
Size 1.5 MB
Tags CPython 3.11 macOS 11.0+ x86-64
SHA-256 checksum
How to use checksums
495ba3cd9f47a1e5addd7c27758b7d44df51fabbe89981332def14e40e70d253
BLAKE2b-256 checksum
How to use checksums
1e4d43e874144f9eef46dca374f984f3dedcc0d02caed0d50c6755ff7bbf2df8
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 8, 2026.

Transparency log

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

Download URL zsasa-0.10.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
9666a1596369f61c5a2e3f665ca905edfd8c0995f4c3552fb7aaaddb365e84a6
BLAKE2b-256 checksum
How to use checksums
e5a725fb39c932a2a1df208bc7a4b49c936a910b7a6d71db37940828918de851
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 8, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.10.1 This release

16 release files

0.9.1

16 release files

0.9.0

16 release files

0.7.1

16 release files

0.7.0

16 release files

0.6.0

16 release files

0.5.0

16 release files

0.4.0

16 release files

0.3.2

16 release files

0.3.1

16 release files

0.3.0

16 release files

0.2.8

16 release files

0.2.7

16 release files

0.2.6

16 release files

0.2.5

16 release files

0.2.4

16 release files

0.2.3

16 release files

0.2.1

16 release files

0.2.0

16 release files

0.1.3

16 release files

0.1.2

16 release files

0.1.1

16 release files

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