Skip to main content

smsd-metal

smsd-metal provides optional Apple Metal screening on Apple silicon Macs and needs the same version of smsd:

python -m pip install "smsd==8.2.0" "smsd-metal==8.2.0"

The GPU computes integer overlaps; scores use the CPU expressions and hits keep target order. Matching runs on the CPU. The backend keeps prepared corpus fingerprints on the device for reuse. ECFP4 Tanimoto screening and the atom-count MCS similarity bound are distinct operations.

import smsd

# Three targets: with the default settings, far too few for automatic GPU use,
# so this runs on the CPU.
corpus = smsd.TargetCorpus.from_smiles(["CCO", "CCN", "CCC"])
print(smsd.gpu_device_info())
corpus.prewarm(num_threads=1)
assert corpus.screen_many(["CCO", "CCN"], 1.0, num_threads=1) == [[0], [1]]
assert corpus.screen_targets_many(["CCO", "CCN"], 1.0, num_threads=1) == [[0], [1]]

smsd finds the package at run time. Automatic ECFP4 screening of a prepared TargetCorpus of at least 100,000 targets uses Metal on an Apple M5. Smaller corpora and other Apple GPUs use the CPU unless SMSD_METAL_MIN_TARGETS is set to a positive integer N: automatic screening then uses the Apple GPU for corpora of at least N targets; on an Apple M5, N replaces 100,000. Automatic similarity-bound screening (screen_targets) and substructure pre-screening use the CPU; the explicit match_corpus(..., gpu_prefilter=True) methods ask the GPU to run their pre-screen. gpu_is_available() and gpu_device_info() report backend availability, not whether a call used the device. Without a usable device, or when device work fails, screening runs on the CPU with the same hits. SMSD_DISABLE_GPU=1 disables the GPU at run time.

Corpus substructure searches can rule out targets that cannot contain the query before CPU matching. With SMARTS queries, match_atom_type=False or a node limit, every target is searched. Results keep their target order, atom numbering and search status.

Use screen_targets with an explicit threshold before MCS when an atom-count Tanimoto bound is wanted; this bound does not represent bond Tanimoto or weighted MCS scores. ECFP similarity is not a substructure test.

Packed fingerprint corpora do not use Metal: backend="auto" runs on the CPU, and backend="cuda" needs smsd-cuda.

Requirements

macOS 14 or later on Apple silicon, with CPython 3.12–3.15. The package uses the Metal framework that macOS provides and bundles no other library. Intel Macs are not supported.

Building

Build from an SMSD checkout on an Apple silicon Mac with the Xcode command-line tools:

MACOSX_DEPLOYMENT_TARGET=14.0 python -m pip wheel packaging/smsd-metal --no-deps -w dist

Its version must equal the smsd version of the checkout; the build stops otherwise. The smsd package itself never needs Metal.

Explicit initialisation

import smsd_metal; smsd_metal.preload() compiles the screening kernels before any data is screened. It does not upload a corpus or change automatic dispatch.

Licence

SMSD code is under the Apache License 2.0; see LICENSE and NOTICE.

Metadata

Release files for smsd-metal 8.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for smsd-metal 8.2.0
File Interpreter ABI Platform Actions
smsd_metal-8.2.0-py3-none-macosx_14_0_arm64.whl Python 3 none macOS 14.0+ ARM64 Details for smsd_metal-8.2.0-py3-none-macosx_14_0_arm64.whl

Release files / smsd_metal-8.2.0-py3-none-macosx_14_0_arm64.whl

Download URL smsd_metal-8.2.0-py3-none-macosx_14_0_arm64.whl
Size 32.1 kB
Tags Python 3 macOS 14.0+ ARM64
SHA-256 checksum
How to use checksums
f723b9b146c0f894d4b0644e73a8a771efeda0bd55bc0997ab7e21bfe13e5f0c
BLAKE2b-256 checksum
How to use checksums
1dc0663a6205dd80f2490778cbf41ee56d9a3022280e11aed4845d2b91c2336e
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 1, 2026.

Transparency log

Security for smsd-metal 8.2.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 1 file in this release has been uploaded with provenance metadata.

Attestation for smsd_metal-8.2.0-py3-none-macosx_14_0_arm64.whl

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

8.2.0 This release

1 release file 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