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

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.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.10.0
File Size Uploaded
zsasa-0.10.0.tar.gz 493.7 kB Details

Built distributions (wheels)

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

Total release size: 47.3 MB

Release files / zsasa-0.10.0.tar.gz

Download URL zsasa-0.10.0.tar.gz
Size 493.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c65f4b47d5047e49be5d3ebab935b8cf6e35d5f58f3f706ce2260804b6234562
BLAKE2b-256 checksum
How to use checksums
66a11dbf5ba29c268423ba539f5d3b709f31d67fd0dfb10926d7eece9200495f
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.0-cp313-cp313-win_amd64.whl

Download URL zsasa-0.10.0-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
a9c6ed623012c6d13b5ce3ffcbbda00ffb07e6569813dcf05c1211af3d6f8e6f
BLAKE2b-256 checksum
How to use checksums
d3e06b52264c87560dd2c560f3e72e705754fb918b40718cd6bd0ed82b5fc14e
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.0-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL zsasa-0.10.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
bc12fdd4e05280cb760a787f13134f49ff2afaaaf1d1c3c6313f53c44422807d
BLAKE2b-256 checksum
How to use checksums
bce53ad2a9cac80a0bc84b67f7d66407907dc0d463da144cd33295c007018158
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.0-cp313-cp313-manylinux_2_28_aarch64.whl

Download URL zsasa-0.10.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
acfa221d7c8c169309d9f06fbe4890959700f034230abea5bf58311d1fc29e09
BLAKE2b-256 checksum
How to use checksums
6475834d8f4d4617469a2ee98a4dc916580009aa70a07909f3c8ec7cec65d3d8
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.0-cp313-cp313-macosx_11_0_x86_64.whl

Download URL zsasa-0.10.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
0825ec9cac738982757912b792091e8e883e051d8453becf3cb902f39673bad0
BLAKE2b-256 checksum
How to use checksums
bfc4732054c6ac36a95dc69bbcba71afd0b4ad864987a97e1983afd1357e5e24
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.0-cp313-cp313-macosx_11_0_arm64.whl

Download URL zsasa-0.10.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
3f7c3dedfc1dead08e47ac7fca06a333bc8b59db23266307ee49ba3f0bc48e65
BLAKE2b-256 checksum
How to use checksums
a723d0f3c132d9763056bc2f2dbeec486eaa1a9d98530471720ebf493fc6d00e
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.0-cp312-cp312-win_amd64.whl

Download URL zsasa-0.10.0-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
bb5791759a54d65299fa5c323c7edfd13c66a5a9a4034776e5fba49909ea6df0
BLAKE2b-256 checksum
How to use checksums
8b6b068cc60d5b013fe18d9592d864810304410d96250f277edb5a63f72560d5
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.0-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL zsasa-0.10.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
df0d7f411df1a91cb445f81500ebe26ca83267789bb54c538beddf79b8bed5bb
BLAKE2b-256 checksum
How to use checksums
baa842a25cdab827b551f0a54bf80a42a347b582d6696cbb06765ada95555fc1
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.0-cp312-cp312-manylinux_2_28_aarch64.whl

Download URL zsasa-0.10.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
57ad439810f6618b9b88c612bdb8116cb2a70dd92412bf2da60989b3921fdc8f
BLAKE2b-256 checksum
How to use checksums
4d2c376472e0b5dcaf1ed7c3ec67ad689cf4a3254d87a6ec7fc9b1861bcd597d
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.0-cp312-cp312-macosx_11_0_x86_64.whl

Download URL zsasa-0.10.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
ea005b344e8922a08b13d7bfce7e1a9f11a9d414d3b9b5198b6af8545083a1b1
BLAKE2b-256 checksum
How to use checksums
5a02e1fd89e428909f9fc25bf4b080acf444a50c0b4917ef465b318643ef7104
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.0-cp312-cp312-macosx_11_0_arm64.whl

Download URL zsasa-0.10.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
665098cd88152211d2d48c3795993bc947dd68c76acc56396cd8e559fd539288
BLAKE2b-256 checksum
How to use checksums
6057466cac45c8d12693e9842504b689d66f373f98efc752ad5a36d1c9d178fc
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.0-cp311-cp311-win_amd64.whl

Download URL zsasa-0.10.0-cp311-cp311-win_amd64.whl
Size 1.7 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
e99051f7a2503437f5bef761a790f55f506cf17ddd6e93a27295bf207095b520
BLAKE2b-256 checksum
How to use checksums
1c6b8634ecb99cb6276eec1e441d11e3d6a930fcdc73a2cc6a49c73e65a60789
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.0-cp311-cp311-manylinux_2_28_x86_64.whl

Download URL zsasa-0.10.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
b9428f2a179edb23a7649e99e6d99b9a1ed481031eb8172e746aecda45a34f7d
BLAKE2b-256 checksum
How to use checksums
87b460dc1a26ae02c3a73c61db73ec21fa0647e19c15d5e13869fa09cd5eceda
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.0-cp311-cp311-manylinux_2_28_aarch64.whl

Download URL zsasa-0.10.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
f5a57ff042f6eccf98ef7efd9ec852cd51aba88ae04244723c5c8e52b06f1081
BLAKE2b-256 checksum
How to use checksums
94d5e6e0119af35a42f5efd4b7eefb1991f99c2b48afbde0e6fdc0a5d6c12489
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.0-cp311-cp311-macosx_11_0_x86_64.whl

Download URL zsasa-0.10.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
0933d6388e1a1bf4c0f12e7b63f8c213e6372a259bc4313893e3221426778ece
BLAKE2b-256 checksum
How to use checksums
652ae3b9f12c064fe25e7f63b456a80836ccfb9b60d7f440e3e539fe0dff379e
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.0-cp311-cp311-macosx_11_0_arm64.whl

Download URL zsasa-0.10.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
e79e1a48e3489abcb236237897570f5eebdeb3de43ee3666ed2c4def799723f2
BLAKE2b-256 checksum
How to use checksums
ed945316f319dadfcbaa7fd044f093d3a1f77d0a82cbbada52740e8dbfd65b50
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.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