8000 GitHub - idrblab/LinkeReady · GitHub
[go: up one dir, main page]

Skip to content
< 7FFF link rel="preload" as="image" href="https://github.githubassets.com/assets/copilot-dark-2b28403b6080e898.png"/>

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

LinkeReady banner

LinkeReady

One-stop setup for fragment-based linker design.

Overview

LinkeReady overview

LinkeReady is a platform for fragment-based molecular linker design. A reference molecule is divided into two retained fragments separated by a linker region, and the same design problem is routed to three mechanistically distinct generators: DeLinker reconstructs the connection in SMILES space with a variational autoencoder, FFLOM assembles it on the molecular graph with a normalizing flow, and DiffLinker denoises linker atoms in 3D Cartesian space with an equivariant diffusion model. All three paradigms run under one fragmentation rule, one execution contract, and one output interface, so their results can be compared — and combined — directly.

This repository is the one-package local deployment of LinkeReady. A freely accessible web server is also available at linkeready.idrblab.cn.

Features

  • One unified conda GPU environment for three models with originally incompatible stacks (TensorFlow 2 compat.v1, PyTorch, and PyTorch + pytorch-lightning 1.9).
  • Config-driven generation: a single entry point (generate_all.py) reads all settings from configs/default.yaml; command-line flags override the YAML.
  • Three generative paradigms behind one interface: VAE (DeLinker), normalizing flow (FFLOM), and 3D equivariant diffusion (DiffLinker).
  • Standardized output: per-model results are written under a common directory layout so every candidate can be traced to its input and source model.

Requirements

  • NVIDIA GPU (developed and tested on an RTX 4090D, CUDA 12.4 driver)
  • mamba/miniforge for install_env.sh
  • ~72 MB download for the model weights

Installation

bash install_env.sh        # builds the env into ./env_mamba (mamba required)

The installer is conda-forge-first; four packages not suitably available on conda-forge (see requirements.txt) are installed as pip fallbacks. The resulting env contains TensorFlow 2 (run in compat.v1 mode for DeLinker), PyTorch, and pytorch-lightning 1.9 (for DiffLinker) side by side.

Model weights

bash download_ckpt.sh      # fetches weights (~72 MB) into ckpt/

This downloads the public weight bundle https://linkeready.idrblab.cn/media/linkeready_model_weights.tar.gz and places one checkpoint per model under ckpt/. The file-to-model mapping is documented in ckpt/README.md; the default paths in configs/default.yaml point exactly at these files.

Quick start

CUDA_VISIBLE_DEVICES=0 env_mamba/bin/python generate_all.py --model All

--model accepts VAE/Flow/Diffusion/All (aliases: DeLinker/FFLOM/DiffLinker). Always use the env's python (env_mamba/bin/python), which serves all three models.

Input format

The input directory (default: ../test_input) must contain:

  • *_frag_*.sdf — 3D coordinates of the two fragments
  • *_frag_*.csv — one line: <full_mol_smiles> <linker_smiles> <fragments_smiles>
  • original_mol.sdf — reference molecule (used by DeLinker for distance/angle conditioning)

Output layout

Results are written under output_dir (default: runs/demo):

runs/demo/
├── results/
│   ├── VAE/         # DeLinker output
│   ├── Flow/        # FFLOM output
│   └── Diffusion/   # DiffLinker output
├── logs/            # per-model run logs
└── work/            # intermediate per-model working files

Useful overrides (all optional):

env_mamba/bin/python generate_all.py --model Diffusion \
    --config my_config.yaml \
    --input-dir /path/to/inputs \
    --output-dir runs/my_run \
    --linker-size 8 \
    --n-mols 100

Configuration

All generation settings live in configs/default.yaml:

Key Meaning
input_dir Directory with the fragment-pair inputs (see above)
output_dir Where results, logs, and work files are written
linker_size Number of linker atoms (shared by all three models)
n_mols Molecules to generate per model
delinker.checkpoint DeLinker (VAE) checkpoint path
fflom.checkpoint / fflom.seed FFLOM (Flow) checkpoint path and random seed
d 6108 ifflinker.checkpoint DiffLinker (Diffusion) checkpoint path
difflinker.size_gnn_checkpoint Optional linker-size predictor (only needed when linker_size is not given explicitly)
difflinker.n_steps Denoising steps; null uses the checkpoint default (500)

All paths are resolved relative to the repository root. The --config, --input-dir, --output-dir, --linker-size, and --n-mols flags override the YAML values.

Repository structure

generate_all.py      # unified entry point (config-driven)
download_ckpt.sh     # downloads model weights into ckpt/
install_env.sh       # builds the unified conda env into ./env_mamba
environment.yaml     # exported conda env spec
requirements.txt     # the 4 pip-fallback packages (with reasons)
configs/default.yaml # all generation settings
ckpt/                # model weights land here (not tracked by git)
src/delinker/        # DeLinker (VAE, TensorFlow 2 compat.v1)
src/fflom/           # FFLOM (Flow, PyTorch)
src/difflinker/      # DiffLinker (Diffusion, PyTorch + pytorch-lightning 1.9)

Acknowledgements

LinkeReady builds on the code and pretrained weights of the three original works:

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0