How lhatsk/alphalink works
AlphaLink extends OpenFold to predict protein structures from a sequence plus experimental crosslink restraints, including contact-threshold and distogram inputs. Its main workflow is restraint preparation, sequence/MSA/template feature generation, model inference with restraint-aware embeddings, and structure output with optional relaxation. The repository also includes OpenFold training and IHM deposition paths. Relationships below rely on the README and SOURCE INDEX references; unsampled implementation details are not inferred.
Main entry points: predict_with_crosslinks.py Crosslink inference · model.py AlphaLink model · data_pipeline.py Raw feature assembly · protein.py Protein structure encoding
Components 20
Restraints and inputs
- Sequence and restraints
- Distogram conversion
preprocessing_distributions.py
Feature preparation
- MSA search
openfold/data/data_pipeline.py - Search tools
openfold/data/tools - Template features
openfold/data/templates.py - Raw feature assembly
openfold/data/data_pipeline.py - Tensor features
openfold/data/feature_pipeline.py
Structure prediction
- Crosslink inference
predict_with_crosslinks.py - AlphaLink model
openfold/model/model.py - Input and restraint embedding
openfold/model/embedders.py - Evoformer trunk
openfold/model/evoformer.py - Structure module
openfold/model/structure_module.py - Prediction heads
openfold/model/heads.py
Structure outputs
- Protein structure encoding
openfold/np/protein.py - Structure relaxation
openfold/np/relax/relax.py - Predicted structure
Training and deposition
- Model training
train_openfold.py - IHM deposition writer
make_ihm.py
Other components
- Researcher
- mmCIF model
Connections 22
- Researcher → Sequence and restraints: provides
- Sequence and restraints → Distogram conversion: converts distributions
- Sequence and restraints → Crosslink inference: supplies inputs
- Distogram conversion → Crosslink inference: prepares distograms
- Crosslink inference → MSA search: runs or loads alignments
predict_with_crosslinks.py - MSA search → Search tools: invokes search tools
openfold/data/data_pipeline.py - Crosslink inference → Raw feature assembly: assembles features
predict_with_crosslinks.py - Raw feature assembly → Template features: uses template featurizer
openfold/data/data_pipeline.py - Crosslink inference → Tensor features: processes features
predict_with_crosslinks.py - Tensor features → Raw feature assembly: transforms raw features
openfold/data/feature_pipeline.py - Crosslink inference → AlphaLink model: runs inference
predict_with_crosslinks.py - AlphaLink model → Input and restraint embedding: embeds inputs
openfold/model/model.py - AlphaLink model → Evoformer trunk: updates representations
openfold/model/model.py - AlphaLink model → Structure module: generates coordinates
openfold/model/model.py - AlphaLink model → Prediction heads: computes predictions
openfold/model/model.py - Crosslink inference → Protein structure encoding: serializes structure
predict_with_crosslinks.py - Crosslink inference → Structure relaxation: optionally relaxes
predict_with_crosslinks.py - Structure relaxation → Protein structure encoding: uses protein representation
openfold/np/relax/relax.py - Protein structure encoding → Predicted structure: writes structure
- Researcher → Model training: trains model
train_openfold.py - Researcher → IHM deposition writer: requests deposition file
- mmCIF model → IHM deposition writer: provides model input