Set up AF2 initial guess (dl_binder_design) as a remote tool
Validation status (2026-10-01): af2ig — the af2_initial_guess step of nrbennet/dl_binder_design at commit cafa3853, AlphaFold 2 model_1_ptm re-predicting a designed binder–target complex from the complex itself as the structural initial guess — ran on the NVIDIA GB10 (aarch64, cc 12.1, driver 580.173.02) under the optimization kit's off mode. Read what this is before reading anything else: "ig" is INITIAL GUESS, the input is a STRUCTURE and not a sequence, and the number it exists to produce is pae_interaction (angstroms; the field's working threshold is below 10). All five tu remote setup steps are green and the acceptance suite passed: an ascending ladder, a mixed-shape phase, four consecutive identical requests, and a separate clean-worker run at the row the budget is declared on — an ascending ladder of 100 / 200 / 400 residues, a mixed-shape phase, four consecutive identical requests, a separate clean-worker run at 800 residues (the row the budget is declared on), and a two-rebuild engine test. 29 held-worker requests, 29 structures, 0 failures, every one asserted to have written a *_af2pred.pdb. THERE ARE NO PADDING BUCKETS HERE, which is the opposite of AlphaFold 3 and changes which half of the test carries the evidence: this model compiles one XLA program per exact total residue count, so four identical requests exercise one program and the shape change is the whole test. Residency is worth 26x at its best rung and 1.7x at the row the budget is declared on -- 95.0 s cold against 3.6 s held at 100 residues, and 272.1 s against ~163 s at 800. Plan with the second number; the first is the best case, and it is largest where a request is cheapest. Declared budget 6.0 GiB at 800 residues, which is also the tool's input ceiling; the ladder is 0.5 / 1.0 / 2.0 / 6.0 GiB at 100 / 200 / 400 / 800 residues (reported), over a working set of 0.49 / 0.62 / 1.23 / 4.36 GiB (actual). Two cautions below are specific to this provider: its VRAM figure is quantised in a way a torch provider's is not, and its environment carries one named deviation from the kit's lock (tensorflow for tensorflow-cpu, because no aarch64 wheel of the latter exists). Public publication, cross-user isolation, concurrency, recovery and scientific quality are untested; keep this deployment private.
Prerequisites
- Run from the ToolUniverse repository root on Linux with Python 3.12.3.
- A CUDA GPU is required. This provider holds its model resident between requests; CPU is not a target.
- Keep provider data, weights, caches, and credentials outside Git.
- Bind to loopback. A non-loopback bind requires TOOLUNIVERSE_API_TOKEN; never put it in arguments or results.
Run the standard-library contract check before downloading large dependencies:
python scripts/remote_validation/setup_skill_preflight.py --implementation af2ig
After exporting provider resources, add --check-provider-env. After the
server starts, add --live to verify the exact MCP tool set without running
the model. Before sharing, add --check-connect-prereqs; this reports only
whether a key is set and never prints its value.
What this model is, and what it is not
This matters more here than for the folding providers beside it, because the
slug does not say it and the obvious guess is wrong.
- It is not AlphaFold 2 structure prediction from sequence. There is no
sequence-only route and adding one would be a different model.
- The input is one PDB file holding a complex. Chain 1 is the binder and
every chain after it is the target — dl_binder_design's own convention.
Getting the order backwards does not fail; it silently scores the wrong
interface. A single-chain file is predicted as a monomer and the interface
scores come back null.
- No MSA is built and no service is contacted. The "alignment" is the query
sequence by itself (
make_msa_features(msas=[[seq]]), max_msa_clusters = 5) and the template is generated from the input coordinates. There is
nothing to precompute, nowhere to send a request, and no MSA server to
configure — unlike colabfold, where that is the central question.
- The seed is upstream's and is fixed.
jax.random.PRNGKey(0) and
random_seed=0 are literals in the driver; there is no seed argument, so
this tool exposes none. One input has one answer.
num_recycle and initial_guess are compile-time: they are baked into
model_config before the jitted function is built, so changing either
rebuilds the held model. The reply says config_rebuilt when that happened.
Create the two environments
This provider is on the remote-tool standard, so it has two environments, not
one: the MCP server runs in ToolUniverse's, and the model runs in its own,
built from a pinned lock. They cannot import each other, and that is the point.
python3 -m venv .venvs/af2ig
. .venvs/af2ig/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .
python -m pip install fastmcp
The model half lives at the path TOOLUNIVERSE_AF2IG_PYTHON names, and nothing
above creates it. The kit pins CPython 3.11.5; create an empty interpreter
there first and let tu remote setup --only environment fill it from
src/tooluniverse/remote/af2ig/environment/requirements.lock with --no-deps,
so no version is silently resolved to something else:
python3.11 -m venv ~/af2ig-venv
Two things about this lock are worth knowing before it runs.
The jax line is two years old and drives this card. jax / jaxlib /
jax-cuda12-plugin / jax-cuda12-pjrt 0.5.3 was expected to be the blocker
for an AlphaFold-2-era kit on a Blackwell-class part, and it is not. jaxlib
publishes manylinux2014_aarch64 wheels from 0.4.18 onward; 0.5.3 publishes
four of them and both CUDA companions publish aarch64 wheels too. Measured in
the model interpreter: jax.default_backend() is gpu, the device is
CudaDevice(id=0) with device_kind "NVIDIA GB10" and compute_capability
"12.1", a 2048×2048 float32 matmul is correct, and there is no PTX JIT message.
An old pinned framework version is a question to measure against the index
and the card, never a conclusion to draw from the version number.
One line of the lock moved, and it is named. tensorflow-cpu 2.21.0
publishes eight wheels and every one is x86-64 or Windows; there is no aarch64
wheel of that distribution at any version. The lock substitutes tensorflow
2.21.0 — the same release, whose manylinux_2_27_aarch64 wheel is the CPU-only
build, because TensorFlow ships no aarch64 GPU artifact at all. The property
the kit pinned -cpu for is that TensorFlow must not touch the card while
JAX holds it, so that property is asserted rather than argued:
[env] verify checks tf.config.list_physical_devices('GPU') == []. The kit's
own check_pins.py --gpu therefore reports tensorflow-cpu: not installed,
and [kit] install permits that one line and no other — any second unmet
pin re-raises the kit's refusal with its exit code. It does not pass
AF2IG_OPT_FORCE, which would have suppressed every pin failure at once.
The rest is built by tu remote setup, which reads
src/tooluniverse/remote/af2ig/provider.toml and runs five steps: preflight,
environment, kit, weights, smoke. Each refuses by name and carries its fix.
export TOOLUNIVERSE_AF2IG_PYTHON=~/af2ig-venv/bin/python
export AF2_PARAMS=~/.af2ig
tu remote setup af2ig
Run one step at a time with --only preflight|environment|kit|weights|smoke
while bringing a machine up. The smoke step is the one that matters: it holds
the model, sends one request, asserts the provider produced what its manifest
says a successful run produces, and records the measured peak VRAM to
~/.cache/tooluniverse/measured/af2ig.json. A host schedules on that file.
Expect roughly 120 s on an idle card (114.5 s of it the request itself, peak reserved 1.0 GiB) for the smoke — almost all of it one XLA
compilation, not the fold.
Package/network-dependent commands must be rerun in a clean environment before marking this skill complete.
Two paths this provider lays out that pip does not
The patched upstream tree. AF2IG_DIR names
dl_binder_design/af2_initial_guess inside a tree the kit step produces:
the pinned cafa3853 archive unpacked and the kit's thirteen-diff series
applied. It is not an installed distribution, and predict_pdb.py — the
PyRosetta-free front end the whole provider runs through — is created by
patch 00_pdb_frontend_envport.diff and exists nowhere else. The install puts
it at ~/.cache/tooluniverse/af2ig-stock/... and the launcher defaults there,
so AF2IG_DIR only has to be exported if you keep the tree somewhere else.
It is laid out outside the kit checkout on purpose. bash run.sh install
unpacks it inside, and step_kit refuses a checkout with untracked content
it does not recognise — which it would do on the second run of a step the
standard requires to be idempotent. The install therefore does out of tree
exactly what run.sh install does in tree, with the kit's own archive, the
kit's own patch series and the kit's own check_pins.py --checkout verdict
(68/68 pinned files), and the checkout stays byte-identical to its pin.
The weights. AF2_PARAMS names the directory that holds params/, not
the params/ directory and not the file; that is the kit's own convention and
getting it wrong is the commonest start-up refusal. The one file is
params/params_model_1_ptm.npz, 373,103,340 bytes, declared in the manifest
with its sha256. The kit's own fetcher streams DeepMind's
alphafold_params_2022-12-06.tar (5.6 GB, 16 members, CC BY 4.0) and keeps
only that member, so the other 5.2 GB never lands on disk. No URL is restated
in ToolUniverse. One HEAD request against that URL was the first action taken
on this kit — 89 ms, HTTP 200, content-length: 5587968000, which is the
kit's own declared byte count exactly. A complete and installable kit can have
no model to run; checking costs less than a tenth of a second.
The one kit lever this provider engages, and why
[kit] mode = "off" -- no kit mode is resolved, the kit's CLI never runs,
nothing of af2ig_opt is imported, and nothing replaces upstream's loader,
which is what entitles the worker to hold the weights. On top of that, exactly
one of the kit's lever flags is passed to upstream's driver, and it is an
element of [runtime] worker_args in the manifest rather than a default, so the
argv you can read is the argv that runs:
-host_outputs the kit's L6
It is there because of a measurement that overturned the estimate it replaced.
The place to read it is upstream's own per-design timers, not the wall clock. On
a warm 195-residue request under stock, t_model is 14-17 s and t_output
is 45-57 s; at 400 residues t_output is 88 s. The output step is numpy and
scipy walking a tree of jax device arrays and pulling each one lazily, op by
op -- on a held worker it is three times the model. Measured, fresh worker each:
|
cold |
held |
| stock |
311.0 s |
70.1 / 60.6 / 75.5 s |
-host_outputs |
231.5 s |
13.3 / 12.8 s |
And it is exact, which was checked rather than taken on trust. Two ordinary
runs cannot check it: two processes disagree with each other anyway in the 5th
significant figure, because XLA's default autotuning picks algorithms by timing
them. Under the kit's own deterministic recipe (--det 1, i.e.
XLA_FLAGS=--xla_gpu_autotune_level=0) three routes produce one file --
sha256 81d69b99410824b7fad9ca5a9b9134d8e52f789580fe5202d1ce74ca8e70dc89 --
and they are the kit's own run.sh pred --mode off --det 1, this worker stock,
and this worker with the flag.
What is declined, and why each is a measurement rather than a preference.
L7 -precompile, L13 -program_cache, L15 -prefetch, L16
-overlap_output and U1 -sort_by_length all overlap work across the inputs
of one campaign; a resident worker serves one request at a time by contract, so
there is no next input to prefetch and no later design to write behind. L8, L10
and L11 go through the shared core's Pallas kernels, whose float32 tile tables
cover compute capability 8.0 and 9.0 only -- the kit's own README says the
triangle kernels are skipped on a capability without a row, and this card is
12.1. And L1 -device_params, the one that looks most obviously worth having,
is declined on a number: the per-call host-to-device transfer it removes is
355.7 MiB over 338 arrays and costs 2.4-6.2 ms on this card's unified
memory, where there is no bus to cross.
Residency, and the two numbers to quote
|
cold |
held |
gain |
| 100 residues |
95.0 s |
3.6 s |
26x |
| 195 residues (the smoke) |
142.4 s |
6.3 s |
23x |
| 800 residues (the declared row) |
272.1 s |
163.1 s |
1.7x |
The multiple is largest where a request is cheapest, so a provider quoting only
its best rung tells a host the opposite of what it needs: the expensive requests
are the ones being scheduled around. What residency keeps, largest first: the
XLA executables (one per exact residue count, 90-270 s each to build, and
nothing persists them across a restart unless you point AF2IG_JIT_ROOT
somewhere lasting), XLA's per-process autotuning results, the 355.7 MiB
parameter tree, and TensorFlow's feature pipeline warm. The weights are the
smallest of those -- a fresh process reads them in 2.4-4.3 s -- so unlike the
large-checkpoint providers this one's residency argument is almost entirely the
compiler's. For the per-request-process comparison, the honest reference is the
kit's own CLI: bash run.sh pred --mode off on the same single input takes
281.0 s end to end, every time.
Residency does not change the answer, and here that is falsifiable because
upstream fixes the seed. Four identical 195-residue requests gave one sha256; a
100-residue request replayed after a 200-residue one gave the same file as the
cold 100; and a num_recycle 3 -> 5 -> 3 round trip, which rebuilds the held
model twice, came back byte-identical to where it started.
Wall times above are from a contended card (a sibling provider's build held
2.8-10.6 GB at 95% utilisation throughout), so they are upper bounds; the peaks
reproduced identically across two complete runs of the suite. The one idle
comparison: the 195-residue cold request is 114.5 s idle against 142.4 s
contended.
Start and verify locally
python -m tooluniverse.remote.af2ig.af2ig_tool
The Streamable HTTP endpoint is http://127.0.0.1:8053/mcp. In a second activated shell run:
python - <<'PY'
import asyncio
from fastmcp import Client
async def main():
async with Client("http://127.0.0.1:8053/mcp") as client:
print([tool.name for tool in await client.list_tools()])
asyncio.run(main())
PY
Confirm discovery contains af2ig_predict; stop on empty, duplicate, or schema-drifted discovery.
Authorize once, then share with one short command
After installing dependencies, exporting the provider resources above, and
installing the pinned relay SDK described under Connect below, run from the
repository root. Log in only once per machine (and again after key rotation):
tu remote login
# Or import an existing protected 0600 file without sourcing it:
tu remote login --env-file /path/to/tooluniverse-service.env
Then each private share is one short command:
tu remote share af2ig
By default, tu remote login requests a short-lived device code, opens the
TU Platform approval page, and polls until the signed-in user approves. No key
copy/paste is required. On a headless machine, add --no-browser and open the
printed link elsewhere. The CLI exchanges the approval for a computer-only key,
verifies /remote-servers/preflight, stores it in a local 0600 config file, and
never displays it.