murrellb commited on
Commit
9f054b3
·
verified ·
1 Parent(s): 722e0b0

Add ProteinMPNN-compatible BindMPNN checkpoints and usage instructions

Browse files
BindMPNN_soluble_v_48_010.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cef0372be85f37d280e7c4ce1c3d98875f50345dcccfa98a4a65593d14f469ba
3
+ size 6680267
BindMPNN_soluble_v_48_020.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8ada5ba943c5436873405f0353848c20752fd239b4df883d259acb39e33fdf69
3
+ size 6680267
README.md CHANGED
@@ -6,14 +6,15 @@ tags:
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
  |---|---:|---:|---:|
@@ -91,6 +92,49 @@ checkpoint = torch.load(
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.
 
6
  - protein-design
7
  - inverse-folding
8
  - ligandmpnn
9
+ - proteinmpnn
10
  - bindmpnn
11
  ---
12
 
13
  # BindMPNN
14
 
15
+ BindMPNN provides **LigandMPNN-compatible and ProteinMPNN-compatible checkpoints** for amino-acid sequence design from protein structures. Use them with the [official LigandMPNN implementation](https://github.com/dauparas/LigandMPNN); the model options and examples for each architecture are given below.
16
 
17
+ ## LigandMPNN-compatible checkpoints
18
 
19
  | Checkpoint | Backbone noise level | Protein neighbors | Atom context size |
20
  |---|---:|---:|---:|
 
92
  # model.load_state_dict(checkpoint["model_state_dict"], strict=True)
93
  ```
94
 
95
+ ## ProteinMPNN-compatible checkpoints
96
+
97
+ These additional BindMPNN checkpoints use the **ProteinMPNN architecture** and can be loaded through the `soluble_mpnn` or `protein_mpnn` model options in the official LigandMPNN repository.
98
+
99
+ | Checkpoint | Backbone noise level | Protein neighbors |
100
+ |---|---:|---:|
101
+ | `BindMPNN_soluble_v_48_010.pt` | 0.10 Å | 48 |
102
+ | `BindMPNN_soluble_v_48_020.pt` | 0.20 Å | 48 |
103
+
104
+ Download them with:
105
+
106
+ ```python
107
+ from huggingface_hub import hf_hub_download
108
+
109
+ for filename in ("BindMPNN_soluble_v_48_010.pt", "BindMPNN_soluble_v_48_020.pt"):
110
+ hf_hub_download(
111
+ repo_id="MurrellLab/SeqGivenStruct",
112
+ filename=filename,
113
+ local_dir="checkpoints",
114
+ )
115
+ ```
116
+
117
+ Using the same installation described above, redesign chain B while keeping the other chains fixed:
118
+
119
+ ```bash
120
+ python run.py \
121
+ --model_type soluble_mpnn \
122
+ --checkpoint_soluble_mpnn checkpoints/BindMPNN_soluble_v_48_010.pt \
123
+ --pdb_path complex.pdb \
124
+ --chains_to_design B \
125
+ --temperature 0.1 \
126
+ --seed 123 \
127
+ --batch_size 1 \
128
+ --number_of_batches 8 \
129
+ --out_folder outputs/bindmpnn_soluble
130
+ ```
131
+
132
+ Replace the checkpoint filename with `BindMPNN_soluble_v_48_020.pt` for the 0.20 Å variant. Alternatively, use `--model_type protein_mpnn` with `--checkpoint_protein_mpnn` pointing to the same file.
133
+
134
+ These models use protein backbone coordinates and fixed-chain amino-acid identities. They do **not** accept target side-chain or nonprotein atom context; `--ligand_mpnn_use_side_chain_context` applies only to the LigandMPNN-compatible checkpoints above. Noise labels identify checkpoint variants and are independent of sampling temperature.
135
+
136
+ For programmatic loading, use `torch.load(path, map_location="cpu", weights_only=True)`, instantiate the upstream `ProteinMPNN` with `model_type="soluble_mpnn"` and `k_neighbors=checkpoint["num_edges"]`, then load `checkpoint["model_state_dict"]` strictly. The files contain only inference weights, `num_edges`, and `noise_level`.
137
+
138
  ## Attribution
139
 
140
+ Please acknowledge the corresponding upstream implementations: [LigandMPNN](https://github.com/dauparas/LigandMPNN) and [ProteinMPNN](https://github.com/dauparas/ProteinMPNN).
checkpoints.json CHANGED
@@ -12,5 +12,17 @@
12
  "num_edges": 32,
13
  "atom_context_num": 25,
14
  "noise_level": 0.2
 
 
 
 
 
 
 
 
 
 
 
 
15
  }
16
- }
 
12
  "num_edges": 32,
13
  "atom_context_num": 25,
14
  "noise_level": 0.2
15
+ },
16
+ "BindMPNN_soluble_v_48_010.pt": {
17
+ "sha256": "cef0372be85f37d280e7c4ce1c3d98875f50345dcccfa98a4a65593d14f469ba",
18
+ "size_bytes": 6680267,
19
+ "num_edges": 48,
20
+ "noise_level": 0.1
21
+ },
22
+ "BindMPNN_soluble_v_48_020.pt": {
23
+ "sha256": "8ada5ba943c5436873405f0353848c20752fd239b4df883d259acb39e33fdf69",
24
+ "size_bytes": 6680267,
25
+ "num_edges": 48,
26
+ "noise_level": 0.2
27
  }
28
+ }