
Cluster MSAs to predict alternative protein conformations with AlphaFold2 Learn more
Input
What is AF-Cluster?
AF-Cluster is a method for predicting multiple protein conformations by clustering a multiple sequence alignment (MSA) before running AlphaFold2. Standard AlphaFold2 predictions converge on a single dominant structure, even for proteins that adopt two or more biologically relevant folds. AF-Cluster addresses this by splitting the MSA into sequence subgroups using the DBSCAN density-based clustering algorithm, then generating separate AlphaFold2 predictions from each cluster.
The approach was developed by Hannah Wayment-Steele and colleagues and published in Nature (volume 625) in 2024. The authors validated the method on metamorphic proteins, including the cyanobacterial clock protein KaiB, where AF-Cluster correctly predicted both the ground-state and fold-switched conformations. NMR spectroscopy confirmed that a KaiB variant predicted by AF-Cluster was indeed stabilized in the opposite fold.
How does AF-Cluster work?
Proteins evolve under selective pressure to maintain function, and function often requires switching between conformational states. Homologous sequences in an MSA may carry co-evolutionary signals for different conformations. When the full MSA is fed to AlphaFold2, these conflicting signals average out and the prediction collapses onto a single state.
AF-Cluster separates these signals by clustering the MSA:
- A3M normalization: Lowercase insertion characters are removed. The first non-query sequence sets the encoded alignment width; an empty or shorter query is zero-padded, and unrecognized uppercase symbols contribute an all-zero encoded position.
- Gap filtering: A non-query sequence is retained only when its fraction of
-characters is strictly below the selected cutoff. - Feature encoding and DBSCAN clustering: Each aligned sequence is one-hot encoded over the 20 standard amino acids plus gap, and DBSCAN uses Euclidean distance in that feature space. Each cluster must contain at least
min_samplessequences; sequences outside dense regions are labeled as noise. - Epsilon optimization: When epsilon is not specified, AF-Cluster scans values from 3 to 20 in steps of 0.5. The source implementation samples 25% of the retained sequences independently for each scan value and selects the value that yields the most clusters.
- Consensus generation: A consensus sequence is derived from each cluster, representing the dominant residue at each position within that subgroup.
Each cluster's alignment can then be used as input to AlphaFold2 independently, producing structure predictions that may capture different conformational states.
How to use AF-Cluster online
ProteinIQ runs the commit-pinned AF-Cluster source on cloud infrastructure, so no software installation is needed. The current source revision is 6b22451. The runtime applies the identified proteiniq-cli-numeric-types-v1 parser correction and verifies the original and corrected entrypoint digests before publishing the image.
Input
| Input | Description |
|---|---|
Multiple Sequence Alignment | A protein MSA in FASTA or A3M format. The first sequence is the query, and the first non-query sequence sets the source encoding width after lowercase A3M insertions are removed. With controls enabled, at least 10 non-query sequences must remain after gap filtering. With zero controls, fixed-epsilon clustering needs at least 1 retained non-query sequence, automatic scanning needs 3, PCA needs 2, and t-SNE needs 30. Jobs accept up to 5,000 sequences, 2,000,000 aligned sequence cells, and 5,000,000 submitted characters; uploaded files are limited to 5 MiB. |
MSAs can be generated from tools like Clustal Omega or MAFFT, or obtained from databases such as UniRef or ColabFold search.
Settings
| Setting | Description |
|---|---|
Min samples per cluster | Positive integer controlling the minimum number of sequences required to form a DBSCAN cluster (default 3). Higher values produce fewer, more populated clusters. |
Gap fraction cutoff | Positive cutoff that removes each non-query sequence when its gap fraction is at or above the selected value (default 0.25). Lower values enforce stricter filtering; values above 1 retain every sequence. |
DBSCAN epsilon | Non-negative Euclidean-distance threshold for DBSCAN neighborhood membership (default 0 for automatic). At 0, AF-Cluster scans 3–20 in 0.5 increments. |
Minimum epsilon | Positive first epsilon tested during automatic scanning (default 3). |
Maximum epsilon | Positive largest epsilon available to automatic scanning (default 20). It must be greater than or equal to the minimum. |
Epsilon step | Positive increment between automatic epsilon candidates (default 0.5). Hosted automatic scans are limited to 100 candidates. |
Control alignment count | Number of independently sampled U10 controls and, when enough sequences remain, U100 controls (0–20, source default 10). Select 0 to skip control generation. |
Shuffle sequence order | Apply the source resample option, which randomly shuffles non-query rows before clustering. Despite the source option name, it does not sample with replacement. Every non-query sequence must have the same positive aligned width in this mode because the shuffled first row defines the encoder width. |
Visualization
| Setting | Description |
|---|---|
Generate PCA plot | Project clustered sequences onto their first two principal components. Useful for seeing how clusters separate in sequence space. |
Generate t-SNE plot | Generate the source t-SNE embedding. This source revision represents the appended query as an all-zero vector in this branch. At least 30 retained non-query sequences are needed by the source t-SNE defaults. |
Output
AF-Cluster produces several files:
- Cluster alignments: Separate A3M files for each identified cluster, ready for structure prediction with AlphaFold2 or other folding tools.
- Submitted alignment snapshot: A byte-preserving ProteinIQ copy of the exact submitted MSA for provenance and workflow reuse. This is clearly labeled because the pinned AF-Cluster source does not emit the
_REF.a3mfile described in its README. - Control alignments: The selected number of independently sampled U10 control MSAs generated by AF-Cluster. U100 controls are also generated when more than 100 non-query sequences remain after filtering.
- Clustering assignments: A table mapping each post-filter sequence to its assigned cluster (or -1 for noise/unassigned sequences), including PCA coordinates when PCA is enabled.
- Cluster metadata: Source metadata for each cluster, including consensus sequence, average identity to the cluster consensus, average identity to the query, and cluster size.
- Visualization: Source PCA and t-SNE PDFs when their respective settings are enabled.
- Run logs: The AF-Cluster log with epsilon scanning, cluster counts, and filtering summary, plus captured source standard-output and warning streams when present.
All of these artifacts are available to workflows. Cluster and control alignments are emitted as separate sequence artifacts so each alignment can be connected directly to a downstream folding step.
The on-screen assignments table previews up to 1,000 rows. The downloadable clustering-assignments TSV always retains every source row.
Applications
AF-Cluster is most valuable for proteins suspected of adopting multiple folds:
- Metamorphic proteins: Proteins like KaiB, lymphotactin, and RfaH that switch between entirely different folds. Standard AlphaFold2 typically predicts only the dominant state.
- Conformational ensembles: Enzymes or receptors with open/closed states, active/inactive forms, or ligand-induced rearrangements.
- Protein family surveys: Screening an entire protein family for members that may adopt alternative folds, even when fold-switching has not been experimentally observed.
- Mutation design: Identifying residue positions where mutations might shift the conformational equilibrium. The original study designed three mutations predicted to flip KaiB into its fold-switched state, confirmed by NMR.
Limitations
- Depends on MSA quality: The method requires an MSA with sufficient sequence diversity. Small or shallow alignments may not contain enough signal for meaningful clustering.
- No guarantee of biological relevance: Not every cluster corresponds to a true conformational state. Some clusters may reflect phylogenetic divergence rather than structural differences.
- Single-domain focus: AF-Cluster was developed and validated primarily on single-domain proteins and metamorphic switches. Multi-domain or disordered proteins may not benefit from this approach.
- Sensitivity to parameters: The choice of epsilon and minimum samples affects which clusters emerge. Automatic epsilon selection works well in many cases but is not infallible.
- Stochastic outputs: Automatic epsilon scanning and control-MSA sampling are not seeded in this source revision, so repeated runs can select a different epsilon or return different controls.
- Source t-SNE query representation: In this revision's t-SNE branch, the appended query is represented as an all-zero vector rather than its amino-acid encoding. ProteinIQ preserves that source behavior.
- Downstream prediction required: AF-Cluster prepares MSA subsets but does not itself predict structures. A separate folding step with AlphaFold2 or a similar tool is needed to generate 3D models from each cluster.
Related tools

RAxML-NG
Perform maximum-likelihood phylogenetic tree inference with RAxML-NG for aligned protein, DNA, or binary character data. Supports ML search, bootstrap analysis, and native automatic model-family selection.

DR-BERT
DR-BERT is a compact protein language model that predicts intrinsically disordered regions (IDRs) in proteins. It outputs per-residue disorder probability scores (0–1) from amino acid sequences, enabling fast and accurate annotation of disordered regions without structural data.

AbLang
Restore missing antibody residues, generate 768-dimensional sequence or residue representations, and calculate amino-acid likelihood scores with the original AbLang heavy- and light-chain models.

AbLang-2
Antibody-specific language model for predicting non-germline residues (NGL) in antibody sequences. AbLang-2 addresses germline bias in existing antibody language models by focusing on somatic hypermutation patterns, enabling more accurate prediction of amino acid likelihoods and generation of context-aware embeddings for antibody sequences.

Aggrescan3D
Static-mode Aggrescan3D analysis for per-residue aggregation propensity from a single protein structure.

AllMetal3D
Predict metal and water binding sites in protein structures using 3D convolutional neural networks (AllMetal3D + Water3D).

CANYA
Predict protein aggregation nucleation propensity from amino acid sequences using the Lehner Lab CANYA neural network.

DeepEMhancer
DeepEMhancer is a deep learning-based post-processing tool for cryo-EM maps. It performs sharpening, masking, and denoising in a single step without requiring an atomic model, with half-map and manual normalization support.

ESM-2
ESM-2 is a 650M parameter protein language model from Meta AI trained on 250M protein sequences. Generate rich sequence representations for downstream tasks like structure prediction, function annotation, and variant effect prediction.

ESM-C
ESM-C generates protein sequence representations and optional forward-pass sequence logits using Biohub protein language models. It supports the 300M, 600M, and 6B model variants for embedding extraction from tokenizer-compatible protein sequences.