| --- |
| license: afl-3.0 |
| --- |
| Here, the tar file contains only the LMDB files of the training dataset and the checkpoints for HuDiff-Ab and HuDiff-Nb. |
| For the code and further details, please visit the [HuDiff GitHub repository](https://github.com/TencentAI4S/HuDiff). |
| Below are simple code templates for utilizing the checkpoint to humanize the sequences. |
| ## HuDiff-Ab Humanization |
| There are two ways to humanize an antibody, either by using a complex fasta file containing antigen-antibody sequences or by providing individual heavy and light chain sequences. |
| ``` |
| python antibody_scripts/sample_for_anti_cdr.py |
| --ckpt checkpoints/antibody/hudiffab.pt |
| --anti_complex_fasta data/fasta_file/7k9i.fasta |
| ``` |
| Keep in mind that you need to replace 7k9i.fasta. |
| ## HuDiff-Nb Humanization |
| Using the fasta file of the nanobody, our model can humanize it. If you require a higher degree of humanization, consider increasing the batch size or the number of samplings. |
| ``` |
| python nanobody_scripts/sample_for_nano_cdr.py |
| --ckpt checkpoints/nanobody/hudiffnb.pt |
| --nano_complex_fasta data/fasta_file/7x2l.fasta |
| --model finetune_vh |
| --inpaint_sample True |
| ``` |