Sovereign 8s.is mirror of standardgalactic/AlignIF
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-31 15:57:05 +08:00
configs add train.py 2026-01-07 10:00:07 +08:00
src add ranking 2026-03-31 15:57:05 +08:00
environment.yml add ranking 2026-03-31 15:57:05 +08:00
example.pdb alignif 2025-07-22 00:51:44 +08:00
inference.py add ranking 2026-03-31 15:57:05 +08:00
LICENSE Add files via upload 2025-08-30 10:24:01 +08:00
model.png alignif 2025-07-22 00:51:44 +08:00
README.md add ranking 2026-03-31 15:57:05 +08:00
reproduce.py add train.py 2026-01-07 10:00:07 +08:00
train.py add train.py 2026-01-07 10:00:07 +08:00

AlignIF

model architecture AlignIF is a deep learning framework for functional RNA design that integrates 3D structural constraints with evolutionary principles from Multiple Structure Alignments (MStA). It enables biologically plausible RNA sequence generation while preserving structural functionality.

Data and Model Checkpoint

Please download the data and model checkpoints from Google Drive link and then put all files into the current folder.

Installation

First, download the repository and create the environment.

git clone https://github.com/sfwang-auto/AlignIF.git
cd ./AlignIF
conda env create -f environment.yml

AlignIF relies on the US-align. You can install US-align using the following command.

git clone https://github.com/pylelab/USalign.git
cd USalign
g++ -static -O3 -ffast-math -lm -o USalign USalign.cpp

AlignIF incorporates RibonanzaNet to compute the scMCC, thereby facilitating the ranking process.

git clone --recursive https://github.com/DasLab/rnet-inference.git

Note: We have tested the environment on Ubuntu 20.04.6 and CUDA 12.1. If you are using a different CUDA version, please install torch and torch-geometric according to the corresponding CUDA version.

Training

The train.py script can be used to train new AlignIF models. Simply run:

python train.py

Reproduce

To reproduce figures in the paper, we offer a single-command script that generates perplexity scores, sampled sequences, and profiles for AlignIF and baseline methods across the benchmark and independent test sets. All results are saved in the reproduce directory.

python reproduce.py

Usage

You are required to input the structure file (.pdb or .cif) of the RNA structures. AlignIF will subsequently output the designed sequences (outputs).

python inference.py --input_structure_path ./example.pdb --n_samples 1 --use_msta True --temperature 0.1

Furthermore, you can specify the max number of alignment (the MStA depth).

python inference.py --input_structure_path ./example.pdb --n_samples 1 --use_msta True --max_n_aligns 16 -temperature 0.1

License

This project is licensed under the CC-BY-NC-4.0.

Online service

We also provide online service http://www.csbio.sjtu.edu.cn/bioinf/AlignIF.