You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let ESMFold2 obtain an MSA from a server when the user hasn't uploaded one, so msa_mode: server works for it the way it does for Boltz / OpenFold / Chai.
Split out of #95, which covers the uploaded-A3M path.
Why it needs us rather than the tool
Boltz, OpenFold and Chai each ship their own MSA-server client, so we just pass --use-msa-server and they fetch. The esm package has no such client — no
ColabFold, no MMseqs, no HTTP fetching anywhere in esm/utils/msa/ or esm/models/esmfold2/. It consumes an MSA object you hand it.
So for ESMFold2 we have to do the fetching and pass the result as an A3M.
Until that exists, ESMFold2 stays excluded from the --use-msa-server
passthrough (#94) — passing a flag its CLI does not define makes click exit 2
and kills the job.
We already have most of the client
scripts/_colabfold_api_msa.py does exactly this today: submit to {API_BASE}/ticket/msa, poll {API_BASE}/ticket/{id}, download and untar from {API_BASE}/result/download/{id}, with a 10s poll interval and a 30-minute cap.
It was written as a fallback for when colabfold_search isn't installed.
The work is largely promotion, not invention:
Move it from scripts/ into the package (e.g. predict_structure/msa_server.py) so adapters and runners can import it.
It is currently a standalone script with a main().
Add --use-msa-server / --msa-server-url to the esmfold2 subcommand, and
remove esmfold2 from the exclusion list in App-PredictStructure.pl. The
guard test added in Fix #75: stop passing --use-msa-server to ESMFold2, which has no such option #94 keys off whether the subcommand exposes the flag, so
it will follow automatically.
Open question — which server?
_colabfold_api_msa.py hardcodes the publichttps://api.colabfold.com.
Today's matrix run confirms the server path works end-to-end from the compute
nodes (B02, O02, C02 all passed), but nothing in this repo records a
self-hosted ColabFold/MMseqs endpoint — only placeholders
(mmseqs.example.com, my-mmseqs-server.com) — and nothing is listening on
coconut. Confirm whether we are meant to use our own server, and its
address, before wiring this. If we have one, msa_server_url should default
to it rather than the public API, for all tools and not just ESMFold2.
Relevant: the public API is rate-limited and shared; a batch matrix run against
it is not polite and not reliable.
Multimer pairing
For complexes, ESMFold2 pairs rows across chains by a key= tag in the A3M
header. ColabFold emits OX=<organism_id>; upstream's tutorial says to rewrite OX= to key= so rows sharing an organism get paired. Single-chain jobs do not
need this. Worth handling here since server-fetched MSAs are exactly where
multimer pairing matters.
Acceptance
predict-structure esmfold2 --protein x.fasta --use-msa-server fetches and
folds with an MSA, no uploaded file
A matrix case with tool: esmfold2 and no msa_file exercises it
Ask
Let ESMFold2 obtain an MSA from a server when the user hasn't uploaded one, so
msa_mode: serverworks for it the way it does for Boltz / OpenFold / Chai.Split out of #95, which covers the uploaded-A3M path.
Why it needs us rather than the tool
Boltz, OpenFold and Chai each ship their own MSA-server client, so we just pass
--use-msa-serverand they fetch. Theesmpackage has no such client — noColabFold, no MMseqs, no HTTP fetching anywhere in
esm/utils/msa/oresm/models/esmfold2/. It consumes anMSAobject you hand it.So for ESMFold2 we have to do the fetching and pass the result as an A3M.
Until that exists, ESMFold2 stays excluded from the
--use-msa-serverpassthrough (#94) — passing a flag its CLI does not define makes click exit 2
and kills the job.
We already have most of the client
scripts/_colabfold_api_msa.pydoes exactly this today: submit to{API_BASE}/ticket/msa, poll{API_BASE}/ticket/{id}, download and untar from{API_BASE}/result/download/{id}, with a 10s poll interval and a 30-minute cap.It was written as a fallback for when
colabfold_searchisn't installed.The work is largely promotion, not invention:
scripts/into the package (e.g.predict_structure/msa_server.py) so adapters and runners can import it.It is currently a standalone script with a
main().use_msa_serveris set and no--msawas supplied, fetch per protein chain, write A3M, feed it through theESMFold2: wire up MSA input — the model supports it and we discard it #95 upload path.
--use-msa-server/--msa-server-urlto theesmfold2subcommand, andremove
esmfold2from the exclusion list inApp-PredictStructure.pl. Theguard test added in Fix #75: stop passing --use-msa-server to ESMFold2, which has no such option #94 keys off whether the subcommand exposes the flag, so
it will follow automatically.
Open question — which server?
_colabfold_api_msa.pyhardcodes the publichttps://api.colabfold.com.Today's matrix run confirms the server path works end-to-end from the compute
nodes (B02, O02, C02 all passed), but nothing in this repo records a
self-hosted ColabFold/MMseqs endpoint — only placeholders
(
mmseqs.example.com,my-mmseqs-server.com) — and nothing is listening oncoconut. Confirm whether we are meant to use our own server, and its
address, before wiring this. If we have one,
msa_server_urlshould defaultto it rather than the public API, for all tools and not just ESMFold2.
Relevant: the public API is rate-limited and shared; a batch matrix run against
it is not polite and not reliable.
Multimer pairing
For complexes, ESMFold2 pairs rows across chains by a
key=tag in the A3Mheader. ColabFold emits
OX=<organism_id>; upstream's tutorial says to rewriteOX=tokey=so rows sharing an organism get paired. Single-chain jobs do notneed this. Worth handling here since server-fetched MSAs are exactly where
multimer pairing matters.
Acceptance
predict-structure esmfold2 --protein x.fasta --use-msa-serverfetches andfolds with an MSA, no uploaded file
tool: esmfold2and nomsa_fileexercises itsingle-sequence fold — the ESMFold2: wire up MSA input — the model supports it and we discard it #95 failure mode
Related