$ show TencentAI4S/IgGM
IgGM is a generative foundation model for antibody and nanobody design, implemented as a deep learning library with a command-line interface. The system performs tasks such as CDR loop design, framework region redesign (humanization), inverse design from complex structures, affinity maturation, and structure prediction. It uses a diffusion-based approach to co-design amino acid sequences and 3D backbone structures, leveraging an ESM2-based protein language model, Evoformer blocks with triangular attention, invariant point attention, and a structure module similar to AlphaFold2. The pipeline is orchestrated by the `AbDesigner` class and invoked via the `design.py` script, accepting PDB and FASTA inputs and generating output sequences and structures. The repository includes well-structured reusable components for rigid-body transformations (Rotation, Rigid), PDB parsing, coordinate conversion, and diffusion schedules, though some research artifacts (misspellings, commented code) and dependency pinning to older PyTorch/CUDA versions indicate moderate technical drift.
The LLM identified 4 files worth highlighting for reuse:
Implements `Rotation` and `Rigid` classes for SE(3) geometry, mirroring AlphaFold2's rigid-body API. Supports quaternion/matrix conversion, interpolation, scaling, and composition. Cleanly separated and dependency-light, making it directly reusable in any computational biology project requiring 3D coordinate transformations.
A comprehensive PDB parser handling gzip-compressed files, chain extraction, sequence alignment via SEQRES/ATOM, segment-based offset alignment, pLDDT extraction, and multimer export. Demonstrates non-obvious skill in handling edge cases (missing residues, chain breaks) and provides a clean API for downstream analysis.
Contains diffusion math utilities: discrete-state interpolation for sequences (D3PM-style), continuous interpolation for translations and rotations (DDPM/DDIM), and `IGSO3Buffer` for efficient SO(3) noise sampling. These are framework-agnostic and can be extracted for any sequence+structure diffusion model.
An implementation of Invariant Point Attention (IPA), a key architectural component from AlphaFold2 that operates on 3D coordinates with SE(3) invariance. The module is isolated with clear input/output tensors and can be reused in other structure-aware deep learning models.