Skip to main content

tcren

tcren — rank and inspect TCR–pMHC models

PyPI tests docs Python 3.10+ GPLv3

tcren ranks candidate αβ TCR:peptide–MHC structures and exposes the evidence behind the ranking: generator confidence, structural contact energy, interface geometry and contact topology. Start with a cohort of separately modelled candidates, or use the toolkit to inspect one structure or score peptides on a fixed template.

The scores are dimensionless structural readouts. They are not binding free energies, calibrated binding probabilities or affinity estimates. For receptor ranking, keep ipTM primary and inspect the structural components alongside it; the combination is not an established universal improvement over ipTM.

Install

pip install tcren
tcren build-mhc-ref

Binary wheels contain five native extensions. The runtime dependency arda-mapper annotates TCR chains and fetches its reference/search backend on first use. The MHC allele reference is built from IMGT on demand. See the installation guide for reference data, supported environments and first-run behavior.

For development, use the repository's isolated environment:

bash setup.sh
source .venv/bin/activate

Start with one ranking task

tcren screen -s models.tar.gz -o scores.tsv
# Optional table with unique complex.id and iptm columns:
tcren screen -s models.tar.gz --confidence confidence.tsv -o scores.tsv

A cohort holds one side fixed:

Task Fixed side Varying side Structural alanine reference
Epitope ranking receptor peptide epitope positions
TCR ranking pMHC receptor contacted CDR residues

Automatic detection reads the annotated peptide and CDR3 pair. Keep one MHC background and verify experimental identities before joining labels. A mixed set or a set where nothing varies is refused. Missing ipTM is reported; tcren reads it from metadata or the confidence table and does not calculate generator confidence.

Task-matched screening workflow

The structural reference truncates side chains to alanine in three dimensions, retains backbone and Cβ atoms, and rebuilds contacts. It is not a virtual identity substitution on a fixed contact map. The selected side follows the ranking task.

Read the evidence and the score

screen reports raw components, standardized contributions, missingness, cohort flags and a provenance sidecar containing the frozen-reference identity.

  • Confidence: the generator's iptm.
  • Energy: the structural alanine difference on the TCR:peptide interface.
  • Geometry: height-field Pearson complementarity, sc_shape.
  • Topology: CDR:pMHC graph cycle fraction, g_cyclo_frac; carried for TCR ranking.

TCR ranking uses S = (6 * ipTM + T) / 7, where T = g_cyclo_frac. Both inputs and the default score lie in [0,1]; this is not a binding probability. Energy and geometry remain separate readouts. Frozen standardized components remain diagnostic columns. Epitope ranking retains weighted Stouffer with confidence and energy weighted equally. Nothing is fitted or normalized against the query cohort. Legacy custom references retain their Stouffer rule.

Models with zero TCR:peptide contacts remain in output with a discard reason and no score. They do not count toward the default floor of 30 models with an interface. Smaller cohorts report components alone. Flags report by default. --on-flag explicitly selects report, structure, geometry, withhold or reverse; responses cannot restore unavailable scores. Reversal is not recommended as a correction for modelling failures.

The screening guide defines every component, its units, the combination equations, missingness and output fields. The inspection guide explains how to read those outputs. Keep MHC class, epitope and template coverage explicit when making comparisons. High peptide-ranking accuracy alone does not establish receptor specificity across epitopes.

Use the toolkit for a particular quantity

Need Entry point
Rank from an existing structural epitope-energy/ipTM table tcren rank-epitopes
Thread candidate peptides on one fixed structure tcren score
Structural alanine difference for candidate poses tcren scoring --delta --reference-mode structural
Structural contacted-CDR reference tcren export --quantity receptor-reference --reference-mode structural
Individual geometry, topology and energy descriptors tcren features
Chain/region annotation and residue contacts tcren annotate, tcren contacts
Canonical MHC frame tcren superimpose
pMHC surface relief, charge and hydropathy tcren surface
Pose/confidence diagnostics and matched comparisons tcren inspect-models, tcren associate
Trajectory and mechanical readouts tcren md, tcren mechanics

Fixed-template threading and separately modelled candidates are distinct protocols. features retains historical fixed-map dPhi columns; use the explicit structural scoring/export routes above for the current alanine reference. The full API reference documents library calls, experimental contact layers and supported historical reproduction APIs.

Historical recognize, assess and fitted Potts readouts retain their dependencies and reproduction contracts; they are not the current screen. The integral/GLM commands were withdrawn. See reference dependencies and SOURCES for parameter provenance and resource identities.

Development and verification

./setup.sh --tests
.venv/bin/ruff check src tests
source .venv/bin/activate
make -C docs html SPHINXOPTS=-W

Use .venv/bin/python -m pytest -m 'not slow' for the non-slow suite; scientific benchmarks are separate from software checks. Rebuild the editable install after native changes. Scientific campaigns, old results and publication figures are maintained with the benchmark and manuscript repositories. CHANGELOG.md records software changes. The API skill owns API guidance.

Metadata

Release files for tcren 4.3.2

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

Source distribution (sdist)

Source distribution for tcren 4.3.2
File Size Uploaded Provenance
tcren-4.3.2.tar.gz 2.5 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for tcren 4.3.2
File
tcren-4.3.2-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
tcren-4.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.17+ x86-64 Details
tcren-4.3.2-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
tcren-4.3.2-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
tcren-4.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.17+ x86-64 Details
tcren-4.3.2-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
tcren-4.3.2-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
tcren-4.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.17+ x86-64 Details
tcren-4.3.2-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
tcren-4.3.2-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
tcren-4.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.10 CPython 3.10 Linux glibc 2.17+ x86-64 Details
tcren-4.3.2-cp310-cp310-macosx_11_0_arm64.whl CPython 3.10 CPython 3.10 macOS 11.0+ ARM64 Details

Total release size: 38.4 MB

Release files / tcren-4.3.2.tar.gz

Download URL tcren-4.3.2.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7950482875b44c481a4551563dbb991138b084bb73035e5326162a216956fdd5
BLAKE2b-256 checksum
How to use checksums
06d289e949ea6f8d5a9a708964f80ca1fbd1af350231f6243804bcc0e6c4364f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp313-cp313-win_amd64.whl

Download URL tcren-4.3.2-cp313-cp313-win_amd64.whl
Size 3.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
50bf850e41e0acceedf19df6a35b5d4ed792f5291ddd3997ce14b6052306b98b
BLAKE2b-256 checksum
How to use checksums
4690d4926df84280738fbd2f29fd570723089fa7fd8586f481c0ff3917e09759
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.2-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.13 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
faa52c673038f4c6f24ab5d157a98dd5ea4fa354c066bdb04962b7908a4351e9
BLAKE2b-256 checksum
How to use checksums
bffce693505c77f4810851bf4cb4044002061dc28902dd57f85bcb1b3ac6f05f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp313-cp313-macosx_11_0_arm64.whl

Download URL tcren-4.3.2-cp313-cp313-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.13 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
30cc2ca80e0bb6aed08c91aa24cc674a910280a9227a9b8af18c3413901ec810
BLAKE2b-256 checksum
How to use checksums
de4c742e798c0f6cf5e8f6a43d680eec8f0f1d71e6e7d1ccacc687fd90e5671e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp312-cp312-win_amd64.whl

Download URL tcren-4.3.2-cp312-cp312-win_amd64.whl
Size 3.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
d1ee9cdb523e9955990d40319c60ee9c6be6061e4eb0ca4ef0b44719c7ebe7af
BLAKE2b-256 checksum
How to use checksums
4f82596ca357cd500f4074828b44d495f434703ca1716eb67d809ad8f88824a8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.12 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
288bd36dabd620d6caa530add465f4a0e44bfe990c9eda6efd05ed19b2bea642
BLAKE2b-256 checksum
How to use checksums
a65637bea77132b07a9c79aadd61c6b6fe278237e4368570941af5f253a44730
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp312-cp312-macosx_11_0_arm64.whl

Download URL tcren-4.3.2-cp312-cp312-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.12 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
79bac0d4120c69f47e0e86fd63ffcb8d91f8e06f7e618661e5fd282ce0ba0bc3
BLAKE2b-256 checksum
How to use checksums
553f32b89a078b639f89362c84e0aee07ccd129e718e63ed8effd5eaae08fddd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp311-cp311-win_amd64.whl

Download URL tcren-4.3.2-cp311-cp311-win_amd64.whl
Size 3.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
f265f22d2538ffbc66090343db1b2b41a1e1b936f1ce391e6cafaf2750bb7db8
BLAKE2b-256 checksum
How to use checksums
49e929b89b442d67f679df1d8019c5f68984df648fc12f25ea2d7a56ee0333c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.11 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
180a25df9085de1ed13dd047653b7566a1c6cdbdf63ed0992ac526b3343a327e
BLAKE2b-256 checksum
How to use checksums
bcdee0e11272c8d597f0fde55dd16d5b205636ac6ea09f78f8521e0cea649455
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp311-cp311-macosx_11_0_arm64.whl

Download URL tcren-4.3.2-cp311-cp311-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.11 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
b4ac97322c772bb5ba25828455f6d9146de9ac5cad7b3c2d6013b815d85c3802
BLAKE2b-256 checksum
How to use checksums
8931c7e99ff5e53927ea50316205bceec2c4ce7f8c8289dacdddd3619ee06555
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp310-cp310-win_amd64.whl

Download URL tcren-4.3.2-cp310-cp310-win_amd64.whl
Size 3.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
4600a0917c1d6e673c9e9c7d45179aa1ddbdbf6c44b4b598a07e003ba5ade80b
BLAKE2b-256 checksum
How to use checksums
fbb6a443588a7d7c9c35711fe9ecc055ce3e9aaaf02a0c3f7268afd9835ec704
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 3.1 MB
Tags CPython 3.10 Linux glibc 2.17+ x86-64
SHA-256 checksum
How to use checksums
54e6c702bbe07867191e9acfca6fbe6f959aeaf3ea9b89ed2c387df31e7f5f61
BLAKE2b-256 checksum
How to use checksums
3b40bd8f79f3062c88bc598fc1b611dc65e5acdd561f779bff3f7edad83adb49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Release files / tcren-4.3.2-cp310-cp310-macosx_11_0_arm64.whl

Download URL tcren-4.3.2-cp310-cp310-macosx_11_0_arm64.whl
Size 2.9 MB
Tags CPython 3.10 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
527fa0e0aa24f43854c6b0caa1819bce3c644f4141de21d6e5d198723638d398
BLAKE2b-256 checksum
How to use checksums
979a96929c0afcde768f82667772198d5189c6efaae5e0f67c716940438591a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 24, 2026.

Transparency log

Security for tcren 4.3.2

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 13 files in this release have been uploaded with provenance metadata.

Select from 13 files

Attestation for tcren-4.3.2.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 Oct 24, 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

4.3.2 This release

13 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