Lesson 4 of 14 · 11 min
Homology modeling: principles and the pipeline
Comparative or homology modeling predicts a target protein's three dimensional structure from the experimentally solved structure of one or more homologs. It rests on one robust observation: over evolutionary time protein structure diverges far more slowly than sequence, so proteins that share a common ancestor almost always share a fold. The task therefore reduces to finding a solved homolog and copying its coordinates onto the target sequence as faithfully as possible.
Nearly every tool runs the same five stages in the same order: template search, target template alignment, backbone transfer for the conserved core, loop modeling for insertions and deletions, and side chain packing. MODELLER, SWISS-MODEL, and Rosetta differ in the algorithm inside each stage, not in the ordering of the stages themselves.
Template search
Template search finds which solved structures are detectably related to the target. BLAST and PSI-BLAST compare a sequence or a sequence profile against a database and are reliable when identity is high. HHsearch instead aligns a hidden Markov model built from the target's multiple sequence alignment against HMMs of known structures, which is far more sensitive for remote homologs; the usual recipe is to build a target profile with HHblits and then search a structural set such as PDB70.
# 1. Build a target profile: 3 HHblits iterations over a large sequence DB
hhblits -i target.fasta -d UniRef30_2023_02 -oa3m target.a3m -n 3 -cpu 4
# 2. Search the PDB70 template HMMs with that profile
hhsearch -i target.a3m -d pdb70 -o target.hhr -cpu 4
# 3. Read the ranked hit table
head -n 12 target.hhrQuery sp|P0XXXX|TARGET
Match_columns 248
No_of_seqs 112 out of 1543
Neff 8.7
Searched_HMMs 34891
Date Wed Jul 8 14:22:07 2026
Command hhsearch -i target.a3m -d pdb70 -o target.hhr -cpu 4
No Hit Prob E-value P-value Score SS Cols Query HMM Template HMM
1 3f7g_A Alpha/beta-hydrolase fold 99.9 8.1E-31 2.3E-35 214.6 0.0 231 4-241 2-233 (236)
2 1uxz_B Carboxylesterase 99.6 3.4E-24 9.7E-29 182.1 0.0 224 9-240 1-227 (229)
3 5and_A Putative lipase 97.2 2.6E-11 7.4E-16 118.3 0.0 205 18-238 12-221 (240)
Backbone, loops, side chains
For every target residue aligned to a template residue, backbone transfer copies the main chain atom coordinates directly from the template, reconstructing the structurally conserved core. Insertions and deletions in the alignment fall into loops, which have no template to copy and are rebuilt by loop modeling using fragment databases or spatial restraint satisfaction. Side chain packing then places the side chains, typically with backbone dependent rotamer libraries as in SCWRL4, retaining template rotamers at conserved positions where possible.
Alignment and the twilight zone
Target to template sequence identity is the strongest single predictor of model accuracy. Above roughly 50 percent identity, models usually fall within about 1 Angstrom backbone RMSD and errors concentrate in loops and side chains. Below roughly 30 percent identity you enter the twilight zone, where similarity no longer reliably signals homology and, crucially, a correct alignment becomes hard to obtain even when the fold is genuinely shared.
The alignment decides which template residue donates coordinates to each target residue, so alignment quality is the dominant error source in comparative modeling. A single register shift displaces every downstream residue by one position and corrupts the local fold, an error larger than anything loop or side chain modeling introduces. Spend your effort here: prefer profile probabilities over raw percent identity, and manually verify that conserved catalytic and structural motifs align correctly before building.
Try it yourself: take a target FASTA, run hhblits then hhsearch against PDB70, and for the top hit record its Prob and query coverage from the summary table (the Query HMM range divided by Match_columns). Then scroll to that hit's alignment block lower in the .hhr file and read its pairwise sequence identity from the Identities field. Classify the template by that identity as safe (above 50 percent), a caution case (30 to 50 percent), or a twilight zone hit (below 30 percent), note how a confident Prob can sit alongside low identity, and flag where insertions or deletions in the alignment will force loop modeling in the hands-on build next.