Skip to content

LiteFold/litefold

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LiteFold: Protein Structure Prediction Made Accessible

📝 Release blog | 🌐 LiteFold

LiteFold makes protein structure prediction accessible without the usual GPU setup headaches. It's a simple server that runs state-of-the-art folding models for researchers and students.

LiteFold Visualization Interface

Overview

The release of models like AlphaFold has transformed computational structural biology, enabling unprecedented accuracy in protein structure prediction. However, there remains a significant accessibility gap between these powerful tools and the broader scientific community.

LiteFold bridges this gap by providing:

  1. A lightweight, GPU-powered inference server for protein structure prediction
  2. Support for state-of-the-art models starting with ESMFold
  3. Simple self-hosting capabilities for researchers who need local control

Self-Hosting Guide

⚠️ UNDER CONSTRUCTION ⚠️

The self-hosted version is currently under development due to breaking changes introduced in the managed version. Please be patient as we work to release a stable self-hosted version soon. Thank you for your understanding.

Prerequisites

  • NVIDIA GPU with CUDA support
  • Docker and Docker Compose
  • At least 12GB of GPU memory (for ESMFold 3B model)
  • 20GB+ disk space for models and results

Quick Start with Docker

The fastest way to get LiteFold running is with Docker:

# Clone the repository
git clone https://github.com/Anindyadeep/litefold
cd litefold/litefold

# Start the container (will download model weights on first run)
docker build -t litefold -f selfhosted.Dockerfile .
docker run -d --gpus all -p 7114:7114 -v litefold_results:/data/results -v litefold_db:/data/db litefold

The server will be available at http://localhost:7114 This port 7114 is kept intentionally, so that it does not affect other processes running on same port (which is generally 8000)

Manual Setup

If you prefer to run without Docker:

  1. Install dependencies:

    pip install -r requirements.txt
  2. Start the server:

    python selfhosted.py

Configuration Options

The server can be configured using environment variables:

Variable Description Default
CUDA_DEVICE GPU device to use cuda:0
SQLALCHEMY_DATABASE_URL Database connection string sqlite:///db/jobs.db

Frontend Integration

While this repository contains the backend server, you can connect it to the LiteFold frontend for a complete experience. If you're using the managed LiteFold service, you can point it to your self-hosted backend by going to Settings → Server Configuration.

Making Your Local Server Public

To make your localhost server accessible from the internet, you can use ngrok:

  1. Install ngrok and get your authtoken. You can go to ngrok website to get the authtoken and they have a nice instructions on how to download it in mac / windows or linux.

  2. Configure ngrok:

    ngrok config add-authtoken YOUR_AUTH_TOKEN
  3. Create a tunnel to your local server:

    ngrok http 7114

This will give you a public URL (like https://abc123.ngrok.io) that you can use to access your local server from anywhere.

Usage

Once your server is running, you can:

  1. Submit protein structure prediction jobs via REST API
  2. Monitor job status and retrieve results
  3. Visualize predicted structures (if using the frontend)

API Endpoints

  • /predict - Submit a new prediction job
  • /status/{job_id} - Check job status
  • /successful-jobs/{user_id} - List successful jobs for a user
  • /health - Check server health

Example API Usage

Submit a prediction job:

import requests
import json

url = "http://localhost:7114/predict"
payload = {
    "job_id": "example-job-123",
    "job_name": "Hemoglobin Alpha",
    "model": "esmfold_3B_v1",
    "sequence": "MVHLTPEEKSAVTALWGKVNVDEVGGEALGRLLVVYPWTQRFFESFGDLSTPDAVMGNPKVKAHGKKVLGAFSDGLAHLDNLKGTFATLSELHCDKLHVDPENFRLLGNVLVCVLAHHFGKEFTPPVQAAYQKVVAGVANALAHKYH",
    "user_id": "user-123"
}
response = requests.post(url, json=payload)
print(response.json())

Check job status:

job_id = "example-job-123"
status_url = f"http://localhost:8000/status/{job_id}"
response = requests.get(status_url)
print(response.json())

Why LiteFold?

Traditional protein structure prediction pipelines come with significant barriers:

  • Complex dependencies and environment setup
  • High GPU requirements
  • Fragmented visualization and analysis tools

LiteFold simplifies this process with a streamlined, modular approach that separates inference from visualization, allowing researchers to focus on the science rather than infrastructure maintenance.

Feature Roadmap

  • ESM3 model support
  • AlphaFold2 model support
  • Chai1 / Boltz integration
  • RNA structure prediction
  • Protein-ligand docking
  • Protein-protein interaction modeling

Contributing

This project is in active development, and contributions are welcome! Whether you're a structural biologist, ML researcher, or software engineer, there are many ways to get involved:

  1. File issues for bugs or feature requests
  2. Submit pull requests for improvements
  3. Share scientific or technical feedback

License

This project is licensed under MIT License.

Acknowledgments

LiteFold builds upon the remarkable work of the open-source structural biology community, particularly:

About

Making folding experiments more accessible .

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published