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.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 tcren 4.3.0
File Size Uploaded Provenance
tcren-4.3.0.tar.gz 2.5 MB With provenance Details

Built distributions (wheels)

Table of built distributions (wheels) for tcren 4.3.0
File
tcren-4.3.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
tcren-4.3.0-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.0-cp313-cp313-macosx_11_0_arm64.whl CPython 3.13 CPython 3.13 macOS 11.0+ ARM64 Details
tcren-4.3.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
tcren-4.3.0-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.0-cp312-cp312-macosx_11_0_arm64.whl CPython 3.12 CPython 3.12 macOS 11.0+ ARM64 Details
tcren-4.3.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details
tcren-4.3.0-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.0-cp311-cp311-macosx_11_0_arm64.whl CPython 3.11 CPython 3.11 macOS 11.0+ ARM64 Details
tcren-4.3.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details
tcren-4.3.0-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.0-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.0.tar.gz

Download URL tcren-4.3.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
7e103258be6ffb3dbccca75c9feef27995a8d687e39866e04758d2fcbedadbc7
BLAKE2b-256 checksum
How to use checksums
c3c2fb3a161737a590f5e18f6f714c885727da759eed5a2c19eaf3fc06c9c43d
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-cp313-cp313-win_amd64.whl
Size 3.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
4d98c523e938659513f4fdc86c52ae480429c5b7772d1fc040fa9c0208f64066
BLAKE2b-256 checksum
How to use checksums
ea80a8926bc0554b9db5eb45fde1ebdb209fb0d9d6ad5f8d6e1eed72c238f033
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
44319a5b1b4cf52b81d68a329642226b2a72e765380ca761d74b739139657b02
BLAKE2b-256 checksum
How to use checksums
7613cb6a25110f98dd3db6477bc58c3eda76948504e9e759ad0a7578ba4abb26
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
cc2206a8ee42cd15beaf85c2a18d0916e23cd381b227135e5c61c41deead1958
BLAKE2b-256 checksum
How to use checksums
e0aeb66c335e87bf40546c69d54e6c86d484568b17a5af0b6611066b73f85f79
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-cp312-cp312-win_amd64.whl
Size 3.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
5651447f6c6b05a3ad0889fd1ae7e53f7c5b965059b45effafde6b1ce03d73cc
BLAKE2b-256 checksum
How to use checksums
862e713acfd857389c339e6fc805115229a5f4ea04e632cd096804877216f09b
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
9f2592153dec9a7460ba1ccb2e9219ed8f3f43aba21b06209615abc9b22e7147
BLAKE2b-256 checksum
How to use checksums
73c11350f51638689f09b76c8e28f50fa41e8b0699277c80b028e22ad777780d
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
7d73fb954c8b37c4a91b918a895cd1c26e48841b36339783b6966349cdcb895e
BLAKE2b-256 checksum
How to use checksums
9dccbb50e1a1b3c1ba5171d820612c9c4770dde1a7640a149d245e043ad88f11
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-cp311-cp311-win_amd64.whl
Size 3.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
78dd79409874abc8705fc4a66a2a743241f8c8d6aa73d85676a1c988cfcfa3f1
BLAKE2b-256 checksum
How to use checksums
d4cae6bca064c9236dadec56aa26e1a4f38f5a7e90a4462e9938e109e37b461e
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
f8ba916c24e126adb7d60b882b885ad79ced0af68434a84b125d08afca02e167
BLAKE2b-256 checksum
How to use checksums
08874c0c5affa8f4018280ef441912f20cc41ef06949d1734e2001996cc54cf6
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
efd4472fa913ceb42afec451a924a423c87899ab0f8a863b34f7eac3184948da
BLAKE2b-256 checksum
How to use checksums
d6d73be40fa5365ce65a4d3c6a34a74960ff89f8704565081caa8d8770aac431
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-cp310-cp310-win_amd64.whl
Size 3.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
cfad160a8193d69e520cd96d560259a862f53ad6b2749b3f347da8afec60ff22
BLAKE2b-256 checksum
How to use checksums
534b10d3fcf5a47b775e200e0c133803e6892d03ea3c0f5c61b9c0ba2663be55
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
a250acd0af920bcd639fc9b911eb5639f090bb5c7bb706a4a1e5b67294e11e7f
BLAKE2b-256 checksum
How to use checksums
02c868fd8b7ae9dc0a27d33b9188305d137aa37e9aa288d99533efb84c037471
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 23, 2026.

Transparency log

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

Download URL tcren-4.3.0-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
211d25cc83a6168914f9be82d709f125a6e2c88a77117cfedc4922c406140f3b
BLAKE2b-256 checksum
How to use checksums
453033502e5b1b6afa0ac18236e344caee1ec50532cc072af0d5419ada52bf3f
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 23, 2026.

Transparency log

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

Select from 13 files

Attestation for tcren-4.3.0.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 23, 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.0 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