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.11.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.11.0
File Size Uploaded
zsasa-0.11.0.tar.gz 497.8 kB Details

Built distributions (wheels)

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

Download URL zsasa-0.11.0.tar.gz
Size 497.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5d566bd2d2be71e5e0b167342001517a56f6bab81f6c22ee07a99f8054da3fd3
BLAKE2b-256 checksum
How to use checksums
0c7083ddeb94eaab25b2a5bdaae8ab8c39df230d840cde1f57b9c5a4038f8cc7
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
8747633a5f3653b5588616845aa84faf3fc029d6e9e90cdc4399afb957f9171d
BLAKE2b-256 checksum
How to use checksums
e3de91cc3abc3101a69942cfa9c270ebb98d9018e997fbfe2e868b445c6dc14a
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
fb8be21ac358cdc830b4851413dc114898e8f24c8bf9732a1cd08d34eb334b77
BLAKE2b-256 checksum
How to use checksums
b81f37278447e14818d4ad232eaa999d2f18473e28d5ef08a11f750d71b544d0
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
0f4df1abedd87ba6d8023638e60f89de8ac1db2f65f31158b8ebd95b0a53d3da
BLAKE2b-256 checksum
How to use checksums
007e9912badef25aed76b69cec36968d797b7ead35dd29b4bc9f7e64171358ea
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
806d92ebef6cb586783507ef38d2840a8b850fad8c21be80c1b75e0a9dbe5ebd
BLAKE2b-256 checksum
How to use checksums
387563dfca2728a2719d356c08f911d547a728c023284032f0233cd78116228e
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.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
982bfcce4cbf59f6cabd5fddc92c37972dfa2e757f1af9369f88faa4c292ffef
BLAKE2b-256 checksum
How to use checksums
577ea77ce87c63ee47ac62398f962b21fdb1749240d307937d3bf9de3835370f
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
08d5feaad4a4162c396fa9096c7ede549259fa05c4541d3acf48925b3eb56d97
BLAKE2b-256 checksum
How to use checksums
89001d3bfb9059a5fcf34d294bb7a0c54df21178c7f8bdf5db2e88dd0a31257e
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
16b209988d1ac46fee1da88c548707474714f8bc0b16baad7516ddaff57db049
BLAKE2b-256 checksum
How to use checksums
82a4296da33f1382ea3fbf4bb153d21de7cc8fd438e4335b01e4bd632f40675e
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
6666a398e6cb93e7e2fa168dcfb807530a491223bbd827780756c03f16449b5d
BLAKE2b-256 checksum
How to use checksums
d13bb2dc9ea4f432dbcf4e45723ceb8fa084ea2a6e606754d26449c58b0d4734
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
c751ffe3d52223203d5485df2efa31d83e768a8a3652101b5e08c5dc7acbabb2
BLAKE2b-256 checksum
How to use checksums
c37c6babdee77aec6af10c1f1ca96a679fd09f52107fb4087ad10058ee39ce85
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.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
9a8c46304c7c51b84b6f45b62ef97e7be8b1af8213930c6d5ce14032e4c568a4
BLAKE2b-256 checksum
How to use checksums
c6c1bd1b8ed75714a4a0cd6676dda4920b07916e598f628fa03bf442e7d5311d
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ffa8bb0a47776b9753cb3065a4453b3dad71608b479516727d889a62fd506336
BLAKE2b-256 checksum
How to use checksums
5c0b9dc69e3f931c3bb55812bac42bedac257841069fa005de4cf44815c9657e
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
f811fa17f6f632c38c24372f36b648e00b6fd0a702091e90e8567567ef4fa7e8
BLAKE2b-256 checksum
How to use checksums
d9d624ce23e6838dd0f7661d585ad6121c1f33a0a76d1512f324ea2e2edec56f
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
529e7069f07558ceba86d1affb946f4264f054de874a5931b85d7be55fedf9f4
BLAKE2b-256 checksum
How to use checksums
0a0581f44e80f5b1dbdf17e5f7580f9ffbcdb531e3d8f6a7d9fa21f07763dfce
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.0-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
fe99ddaac64c795379865980293d5ab07fe55845ddb655277a9bb304d9b41aba
BLAKE2b-256 checksum
How to use checksums
bd9b0ee890fc0dce58501e9a54fb0683d0c7716863c44d5038dd1c64a8a8000d
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 11, 2026.

Transparency log

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

Download URL zsasa-0.11.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
88e2dafa50f6923fff4922944fed2da68ef80f3c37e751839ed10266457180f2
BLAKE2b-256 checksum
How to use checksums
5fb7f5fb1ad996c6e63025a089b9e5be1e1d6abd077160d1402fdb1a1cb2832b
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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.11.0 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