FRACTAL (Framework for Representation-guided Atomic ConsTruction & ALignment) is a constraint-based protein structure prediction system that leverages pre-trained protein language model representations for geometric inference. The system employs a two-stage architecture: neural constraint prediction followed by physics-guided deterministic folding.
Model Description
FRACTAL utilizes the ESM-2 3B parameter model (esm2_t36_3B_UR50D) as a frozen feature extractor, with specialized prediction heads trained to infer geometric constraints from sequence-derived embeddings. This approach decouples representation learning from structural assembly, enabling efficient training and interpretable intermediate outputs.
Deterministic Folding (separate module): Gradient-based optimization converts constraints into 3D atomic coordinates by minimizing constraint violation energy
This separation enables rapid experimentation with folding algorithms without retraining the neural components.
Installation
bash
1# Install via pip2pip install fractalml
34# Alternative: Local installation5git clone https://github.com/Aayan-Mishra/FractalGPT.git
6cd FRACTAL
7pip install -e .
System Requirements:
Python 3.8 or higher
PyTorch 2.0 or higher
CUDA 11.8 or higher (for GPU acceleration)
Minimum 8GB GPU memory recommended
Usage
WebUI
fractal webui
Python API
python
1from fractal.models import ConstraintPredictor
2from fractal.geometry.folding import fold_from_constraints
34# Initialize pre-trained model5model = ConstraintPredictor.from_pretrained(6"Fractal-Labs/FRACTAL-1-3B",7 device="cuda"# Use "cpu" for CPU-only inference8)910# Example: Predict structure for a protein sequence11sequence ="MNIFEMLRIDEGLRLKIYKDTEGYYTIGIGHLLTKSPSLNAAKSELDKAIGRNTNGVITKDEAEKLFNQDVDAAVRGILRNAKLKPVYDSLDAVRRAALINMVFQMGETGVAGFTNSLRMLQQKRWDEAAVNLAKSRWYNQTPNRAKRVITTFRTGTWDAYKNL"1213# Stage 1: Predict geometric constraints14predictions = model.predict_from_sequence(sequence, device="cuda")1516# Stage 2: Fold to 3D coordinates17structure = fold_from_constraints(18 predictions,19 num_steps=1000,# Optimization iterations20 lr=0.01,# Learning rate for gradient descent21 device="cuda"22)2324# Export structure25structure.to_pdb("predicted_structure.pdb")
Command-Line Interface
bash
1# End-to-end prediction with visualization2fractal fold input.fasta --checkpoint Fractal-Labs/FRACTAL-1-3B --viz
34# Outputs:5# - input.pdb: 3D structure in PDB format6# - input.html: Interactive 3D viewer (Plotly-based)7# - input.png: Static structural rendering
Constraint-Only Prediction
For applications requiring only geometric constraints without 3D folding:
Constraint prediction: 2-5 seconds for typical proteins (150-300 residues) on T4 GPU
Deterministic folding: 30-60 seconds for medium-sized proteins (150-300 residues)
Memory usage: Approximately 6-8GB GPU memory for sequences up to 512 residues
Limitations
Sequence length: Maximum 1024 residues due to ESM-2 positional encoding constraints
Training data coverage: Limited to approximately 1000 structures; generalisation to novel folds or rare protein families may be reduced
Prediction accuracy: This model is designed for research and educational purposes. It does not achieve state-of-the-art accuracy comparable to AlphaFold2/3 or RoseTTAFold on standardized benchmarks
Multimer prediction: Current implementation supports monomeric structures only
Post-translational modifications: Not explicitly modeled
Co-factor binding: Metal ions and small molecule co-factors are not predicted
Known Issues
Deterministic folding may converge to local minima for proteins with complex topologies
Confidence scores are less calibrated than AlphaFold2 pLDDT scores
Performance on disordered regions and long loops is limited
Model Card
Model Details
Developed by: Aayan Mishra (Huxley Research)
Model type: Constraint-based protein structure predictor
Language: Protein amino acid sequences
License: FOCL
Base model: ESM-2 3B (facebook/esm2_t36_3B_UR50D)
Intended Use
Primary intended uses:
Educational demonstrations of protein structure prediction concepts
Research prototyping for constraint-based folding algorithms
Generating initial structural hypotheses for further refinement
Teaching protein bioinformatics and structural biology
Out-of-scope uses:
Clinical or diagnostic applications
Drug discovery without extensive validation
High-stakes production deployments requiring state-of-the-art accuracy
Ethical Considerations
Protein structure prediction models may be used to design novel proteins with potentially harmful applications. Users should follow established biosafety guidelines and ethical frameworks when working with predicted structures, particularly for:
Toxin or venom protein engineering
Pathogen-related research
Dual-use biological technologies
Citation
If you use FRACTAL in your research, please cite the ESM-2 foundation model aswell as the FRACTAL Model:
bibtex
1@software{fractal2025,
2 title = {FRACTAL: Framework for Representation-guided Atomic Construction and Alignment},
3 author = {Mishra, Aayan},
4 year = {2025},
5 url = {https://github.com/Aayan-Mishra/FractalGPT}
6}
bibtex
1@article{lin2023evolutionary,
2 title={Evolutionary-scale prediction of atomic-level protein structure with a language model},
3 author={Lin, Zeming and Akin, Halil and Rao, Roshan and Hie, Brian and Zhu, Zhongkai and Lu, Wenting and Smetanin, Nikita and Verkuil, Robert and Kabeli, Ori and Shmueli, Yair and Fazel-Zarandi, Maryam and Sercu, Tom and Candido, Sal and Rives, Alexander},
4 journal={Science},
5 volume={379},
6 number={6637},
7 pages={1123--1130},
8 year={2023},
9 publisher={American Association for the Advancement of Science}
10}
This work builds upon the ESM-2 protein language model developed by Meta AI Research. We thank the Protein Data Bank for providing high-quality structural data and Kaggle for computational resources.