All skills
Fold a sequence
phi-fold
Fold one or more protein sequences on Dyno Phi and report the structure with its confidence.
Use when a person gives amino-acid sequences and wants a structure, a complex, pLDDT, pTM, ipTM or PAE, or asks which folding model to use. Phi routes one chain to ESMFold 2, a complex to AlphaFold 2, and ligands, DNA, RNA or affinity to Boltz-2; the tools are phi_fold_structure, phi_job_status and phi_job_results, or the phi CLI and the Python client.
Install this skill
phi skills install phi-fold -gFold a sequence
Use this skill when the person gives one or more amino-acid sequences and wants a structure or its confidence.
Before you start
- One sequence per chain, amino-acid letters only. Write a complex as the chains joined with
:. - A Phi session: the web app, the MCP connector signed in with a Dyno account, or an API key. A fold spends the organization's credits, so price it with
dry_run: truewhen cost matters.
Steps
- Call
phi_fold_structurewithsequencesand leavemodelunset. Phi routes one protein chain to ESMFold 2, two or more chains to AlphaFold 2, and any request with a ligand, DNA, RNA or affinity to Boltz-2. Setmodelonly when the person names one. - Poll
phi_job_statusat thepoll_after_secondsthe response gives. A single chain finishes in a few minutes; a large complex takes longer. - When the status is
COMPLETED, readphi_job_results. Structures come back as resource links with time-limited URLs, so download them before reporting. - Report mean pLDDT and pTM, and for a complex ipTM, ipSAE and iPAE, as the runner wrote them. Per-residue pLDDT is in the PDB's B-factor column; use it to say which regions are confident and which are not.
From the CLI, the same fold is one command:
phi jobs submit ESMFOLD2 --input sequences=@seqs.fasta --wait --out resultsFrom Python:
with PhiClient() as phi:
job = phi.jobs.submit("ESMFOLD2", inputs={"sequences": [sequence]})
phi.jobs.wait(job.job_id)
phi.artifacts.download(phi.artifacts.list(job.job_id, suffix=".pdb"), "results")When it fails
FAILEDorERROR: read the job'serror, say what happened in one sentence, and propose one change (a cleaned sequence, a shorter construct, another model). Do not resubmit the same request unchanged.- A 402: the organization has too few credits. Say what the fold needs and what is available, then stop.
- A 429: wait for
Retry-Afterand try once more. The person never needs to hear about it.
Rules
- Say which model folded the sequence and why.
- Quote only the metrics the runner wrote. Never compute or estimate confidence yourself.
Version 1.2