FRACTAL: Framework for Representation-guided Atomic ConsTruction & ALignment - A protein structure prediction system
Project description
FRACTAL
FRACTAL (Framework for Representation-guided Atomic ConsTruction & ALignment) is a research-grade protein folding system inspired by AlphaFold-style pipelines and modern protein language models (ESM-2).
Philosophy:
- Intelligence predicts structured geometric constraints (distance distributions, contacts, torsions, confidence)
- Deterministic code enforces geometry + physics-inspired priors
This repository intentionally does not predict raw XYZ coordinates from the neural network.
Recent Updates (AlphaFold-Style Enhancements)
New capabilities:
- ✅ Validation loop with automatic model selection
- ✅ Checkpointing with training state resumption
- ✅ Learning rate scheduling (ReduceLROnPlateau)
- ✅ Early stopping based on validation loss
- ✅ Evaluation metrics: RMSD, TM-score, GDT-TS, contact accuracy
- ✅ Enhanced training with better logging and error handling
Repository layout
src/fractal/models/: ESM-2 backbone wrappers + lightweight constraint headssrc/fractal/data/: dataset formats + preprocessing utilitiessrc/fractal/geometry/: deterministic folding/assembly enginesrc/fractal/training/: trainers, losses, configs (with validation & checkpointing)src/fractal/inference/: FASTA → constraints pipelinesrc/fractal/evaluation/: NEW - RMSD, TM-score, GDT-TS metricsscripts/: CLI-adjacent utilities (preprocess/train/eval/infer)configs/: YAML configstests/: unit tests (geometry + model components)
Quickstart
Create an environment and install:
- Minimal install:
pip install -e . - With ESM support:
pip install -e '.[esm]' - With tests:
pip install -e '.[test]'
Run CLI help:
fractal --help
Training with Validation
The new training pipeline supports:
- Automatic validation during training
- Best model selection based on validation loss
- Learning rate reduction on plateau
- Early stopping to prevent overfitting
- Checkpoint management (keeps last N checkpoints)
Train from scratch:
python scripts/train.py configs/train.yaml
Resume from checkpoint:
python scripts/train.py configs/train.yaml --resume checkpoints/best
Config options (see configs/train.yaml):
trainer:
epochs: 50
validate_every_n_epochs: 1
save_every_n_epochs: 5
keep_last_n_checkpoints: 3
use_lr_scheduler: true
early_stopping_patience: 15
Evaluation
Evaluate a trained model:
python scripts/eval.py checkpoints/best data/processed/test_manifest.jsonl -o results.json
Metrics computed:
- Distance prediction accuracy (bin classification)
- Contact prediction accuracy (binary classification)
- Torsion angle error (degrees)
- Structure quality (when ground truth available):
- RMSD (Cα atoms)
- TM-score
- GDT-TS
Next Steps to Reach AlphaFold Performance
- Scale dataset: Download 10K+ PDB structures using
scripts/download_rcsb.py - Add MSA features: Integrate evolutionary information via MMseqs2/HMMER
- Implement structure module: Replace simple optimization with learned refinement
- Add template features: Use homologous structure templates
- Distributed training: Scale to multi-GPU with PyTorch DDP
Note: the current implementation focuses on a correct modular system skeleton with proper training infrastructure. Dataset preprocessing/training loops are research-grade and ready for expansion.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fractalml-1.0.0.tar.gz.
File metadata
- Download URL: fractalml-1.0.0.tar.gz
- Upload date:
- Size: 37.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b04680c836742a80ce01af9ef08edd528cf3718fcc468f21416f817c2fb116f
|
|
| MD5 |
06216ea77cbb1e8ba3b19f3d5b4b4901
|
|
| BLAKE2b-256 |
2ece2ab587393434ab63572ec4d77eda9f560da90ec4621132176d4edbb9c276
|
Provenance
The following attestation bundles were made for fractalml-1.0.0.tar.gz:
Publisher:
publish.yml on Aayan-Mishra/FractalGPT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fractalml-1.0.0.tar.gz -
Subject digest:
4b04680c836742a80ce01af9ef08edd528cf3718fcc468f21416f817c2fb116f - Sigstore transparency entry: 778919495
- Sigstore integration time:
-
Permalink:
Aayan-Mishra/FractalGPT@c1c9c8ffb8a725ac12634531720ded668b34c4d5 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Aayan-Mishra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1c9c8ffb8a725ac12634531720ded668b34c4d5 -
Trigger Event:
release
-
Statement type:
File details
Details for the file fractalml-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fractalml-1.0.0-py3-none-any.whl
- Upload date:
- Size: 44.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e47faa3e16e00817c83b8934064557cbda0ee189513481a8b42d82784927edc
|
|
| MD5 |
97d71d3a954e859e58d52f0924d5ca39
|
|
| BLAKE2b-256 |
f29aeac09eb25545526f0791dfefdc2b5efd5d5451c1278f6dedf747f6aa1bf4
|
Provenance
The following attestation bundles were made for fractalml-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on Aayan-Mishra/FractalGPT
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
fractalml-1.0.0-py3-none-any.whl -
Subject digest:
2e47faa3e16e00817c83b8934064557cbda0ee189513481a8b42d82784927edc - Sigstore transparency entry: 778919496
- Sigstore integration time:
-
Permalink:
Aayan-Mishra/FractalGPT@c1c9c8ffb8a725ac12634531720ded668b34c4d5 -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/Aayan-Mishra
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c1c9c8ffb8a725ac12634531720ded668b34c4d5 -
Trigger Event:
release
-
Statement type: