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

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

Built distributions (wheels)

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

Download URL tcren-4.3.1.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
23d93ea693ccaf6ab84159509934c8c7e042ba602c9f0f6f1b0d27ec8e7d8584
BLAKE2b-256 checksum
How to use checksums
0b90bde347bb7f1dbabd69bb18618c4bf1167ce5d141fbf9d83516f42b41a01a
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.1-cp313-cp313-win_amd64.whl

Download URL tcren-4.3.1-cp313-cp313-win_amd64.whl
Size 3.0 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
537df6ec758dcce9ab4e1ac1b8a9f01b46dcb73c0cda64dbbd586cb6649834cb
BLAKE2b-256 checksum
How to use checksums
77604593562258eb71a464364269ddb7ab0e85d44b47da42d28131401796cca2
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.1-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.1-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
961fee3d7f02d2f3781dd019f24cb84084de821fe0bb88ca1404ac1504a09ef2
BLAKE2b-256 checksum
How to use checksums
d5940333188787e44b22fca74995542f94c8bfb6e52178d57df063aadbcb9d89
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.1-cp313-cp313-macosx_11_0_arm64.whl

Download URL tcren-4.3.1-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
73f2a79374566999019de78c9cec9810a5a5aef3687a9ef29a3b4073e42c713e
BLAKE2b-256 checksum
How to use checksums
025670636117558b5a36544715147d87f4184f84ed16e1dfc40f2563976ef819
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.1-cp312-cp312-win_amd64.whl

Download URL tcren-4.3.1-cp312-cp312-win_amd64.whl
Size 3.0 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
f1f76e7040d9dd59dbbfba375faff53763304049a95f9fc1d8ec3d866b25c48b
BLAKE2b-256 checksum
How to use checksums
6699df2fe7c9772698dfdafc608e1fe5402b59ba96746fd78d3de52f39a8292a
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.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.1-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
a6bded34ddb98c0a434b48627a9939df32d5110a2e8ebf00708c28089cfe5c4e
BLAKE2b-256 checksum
How to use checksums
a12184c56b50b02f650c5352302b0dbcf69ed9b9a834398e6465ae98d351ccf3
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.1-cp312-cp312-macosx_11_0_arm64.whl

Download URL tcren-4.3.1-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
765685dada5da1834ac8b792d3400246d6bfcce7864d6aadf0d69086357eb64d
BLAKE2b-256 checksum
How to use checksums
736e19fab208ba5ebcafd42bfbcb1fee3dff7ea5d20695124c8b78fe6d68f1a4
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.1-cp311-cp311-win_amd64.whl

Download URL tcren-4.3.1-cp311-cp311-win_amd64.whl
Size 3.0 MB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
9deb250e09cb8b1a092475eccd58617b9f12c89ed4d8089af8ac3da6295c6bb7
BLAKE2b-256 checksum
How to use checksums
dc97cf138167319a9a635fa60cb879adab4ba372e9af63c54117b0e1161ddd4b
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.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.1-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
c142d6ceee76c7eba131c464fc58a1b11a84c27f56c77626ec704b45b6c7be9f
BLAKE2b-256 checksum
How to use checksums
514fc8cd7444afaeda4c7ac72ab9a00db36d666c6b240f7f39f4de95f717a80a
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.1-cp311-cp311-macosx_11_0_arm64.whl

Download URL tcren-4.3.1-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
934d83f9283a1f8533ea98beb8d0a29b66ec362d5113fd04f3f52520c26c5c83
BLAKE2b-256 checksum
How to use checksums
be1552cce91c1b912df12227d567f23852f52ed7989b7b96df76c8f33c1554d2
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.1-cp310-cp310-win_amd64.whl

Download URL tcren-4.3.1-cp310-cp310-win_amd64.whl
Size 3.0 MB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
110fb4064bca35f1f0abe37744a40e51dc56432eab97ef6c65dbd130b04c3fc8
BLAKE2b-256 checksum
How to use checksums
8084acbfa9dd7164efdb004dfc8dfbb08a6709f9a48228bbdaba916e3065211c
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.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL tcren-4.3.1-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
e2194745963553fcffeacaf5aeb6fd7269256fa85d33101a1c8564a0f1680106
BLAKE2b-256 checksum
How to use checksums
6b316a525afee74d1ca2269c76c6e3bfef9604ebddd9f9e4b897021f1298f0bc
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.1-cp310-cp310-macosx_11_0_arm64.whl

Download URL tcren-4.3.1-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
b3a81e858d1cb0559b3fc8f1bdfc835092e8c3369d82874d15497b204c3b30f6
BLAKE2b-256 checksum
How to use checksums
473aaf83a017e86cfa09367bb3f1b82a3a8db5516d317298f3986602fccef20a
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.1

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