murrellb commited on
Commit
722e0b0
·
0 Parent(s):

BindMPNN checkpoints and inference instructions

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
BindMPNN_v_32_010_25.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1bd78f7902dd5f0ce88100aee083d3ed779d97227538c884b5a17d810446cd77
3
+ size 10537732
BindMPNN_v_32_020_25.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:274c66aef16a9219c718d8e212b26f2ff4bb54cee57d5264587d11af364daff7
3
+ size 10537732
README.md ADDED
@@ -0,0 +1,96 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - biology
6
+ - protein-design
7
+ - inverse-folding
8
+ - ligandmpnn
9
+ - bindmpnn
10
+ ---
11
+
12
+ # BindMPNN
13
+
14
+ BindMPNN provides two **LigandMPNN-compatible checkpoints** for amino-acid sequence design from protein structures. Use them with the [official LigandMPNN implementation](https://github.com/dauparas/LigandMPNN) and `--model_type ligand_mpnn`.
15
+
16
+ ## Checkpoints
17
+
18
+ | Checkpoint | Backbone noise level | Protein neighbors | Atom context size |
19
+ |---|---:|---:|---:|
20
+ | `BindMPNN_v_32_010_25.pt` | 0.10 Å | 32 | 25 |
21
+ | `BindMPNN_v_32_020_25.pt` | 0.20 Å | 32 | 25 |
22
+
23
+ The noise level identifies the checkpoint variant; it is **not** the sampling temperature and does not require adding noise to your input structure. Both files contain inference weights and the metadata required by LigandMPNN's checkpoint loader.
24
+
25
+ ## Installation and download
26
+
27
+ Use a Python 3.11 environment and install LigandMPNN according to its [installation instructions](https://github.com/dauparas/LigandMPNN#dependencies). For example:
28
+
29
+ ```bash
30
+ git clone https://github.com/dauparas/LigandMPNN.git
31
+ cd LigandMPNN
32
+ python -m pip install -r requirements.txt
33
+ python -m pip install huggingface_hub
34
+ ```
35
+
36
+ Download the checkpoints into this checkout:
37
+
38
+ ```python
39
+ from huggingface_hub import hf_hub_download
40
+
41
+ for filename in ("BindMPNN_v_32_010_25.pt", "BindMPNN_v_32_020_25.pt"):
42
+ hf_hub_download(
43
+ repo_id="MurrellLab/SeqGivenStruct",
44
+ filename=filename,
45
+ local_dir="checkpoints",
46
+ )
47
+ ```
48
+
49
+ ## Sequence design
50
+
51
+ This example redesigns chain **B** of a target–binder complex while keeping the amino-acid identities of the other chains fixed:
52
+
53
+ ```bash
54
+ python run.py \
55
+ --model_type ligand_mpnn \
56
+ --checkpoint_ligand_mpnn checkpoints/BindMPNN_v_32_010_25.pt \
57
+ --pdb_path complex.pdb \
58
+ --chains_to_design B \
59
+ --ligand_mpnn_use_side_chain_context 1 \
60
+ --temperature 0.1 \
61
+ --seed 123 \
62
+ --batch_size 1 \
63
+ --number_of_batches 8 \
64
+ --out_folder outputs/bindmpnn
65
+ ```
66
+
67
+ Replace `B` with the chain you want to redesign and `complex.pdb` with your input structure. To use the 0.20 Å variant, change the checkpoint filename to `BindMPNN_v_32_020_25.pt`.
68
+
69
+ - `--chains_to_design` specifies the mutable chains; other chains remain fixed.
70
+ - `--ligand_mpnn_use_side_chain_context 1` exposes sidechain atoms of fixed residues as context. Use `0` to omit that sidechain context.
71
+ - `--temperature` controls sequence sampling diversity independently of the checkpoint's noise label. The example uses 0.1; adjust it for your application.
72
+ - `--seed` controls reproducibility. Sequence files are written under the output folder's `seqs/` directory.
73
+
74
+ These are sequence-design checkpoints. Sidechain packing uses LigandMPNN's separate packing checkpoint and options; consult the upstream documentation for that workflow and for residue-level constraints, scoring, and batching.
75
+
76
+ ## Programmatic loading
77
+
78
+ The checkpoint files are PyTorch dictionaries with `model_state_dict`, `num_edges`, `atom_context_num`, and `noise_level`. A compatible loader can use:
79
+
80
+ ```python
81
+ import torch
82
+
83
+ checkpoint = torch.load(
84
+ "checkpoints/BindMPNN_v_32_010_25.pt",
85
+ map_location="cpu",
86
+ weights_only=True,
87
+ )
88
+ # Instantiate the upstream ProteinMPNN with model_type="ligand_mpnn",
89
+ # k_neighbors=checkpoint["num_edges"], and
90
+ # atom_context_num=checkpoint["atom_context_num"], then:
91
+ # model.load_state_dict(checkpoint["model_state_dict"], strict=True)
92
+ ```
93
+
94
+ ## Attribution
95
+
96
+ BindMPNN uses the LigandMPNN architecture and checkpoint format. Please acknowledge [LigandMPNN](https://github.com/dauparas/LigandMPNN) when using these checkpoints.
checkpoints.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "BindMPNN_v_32_010_25.pt": {
3
+ "sha256": "1bd78f7902dd5f0ce88100aee083d3ed779d97227538c884b5a17d810446cd77",
4
+ "size_bytes": 10537732,
5
+ "num_edges": 32,
6
+ "atom_context_num": 25,
7
+ "noise_level": 0.1
8
+ },
9
+ "BindMPNN_v_32_020_25.pt": {
10
+ "sha256": "274c66aef16a9219c718d8e212b26f2ff4bb54cee57d5264587d11af364daff7",
11
+ "size_bytes": 10537732,
12
+ "num_edges": 32,
13
+ "atom_context_num": 25,
14
+ "noise_level": 0.2
15
+ }
16
+ }