You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foundry install all --checkpoint-dir <path/to/ckpt/dir>
18
+
where `checkpoint-dir` will be `~/.foundry/checkpoints` by default. Once installed, foundry sets the env `FOUNDRY_CHECKPOINTS_DIR` which it will use during inference or subsequent commands to find the checkpoints. `base-models` installs the latest RFD3, RF3 and MPNN variants - you can also download all of the models supported (including multiple checkpoints of RF3) with `all`, or by listing the models sequentially (e.g. `foundry install rfd3 rf3 ...`).
19
+
To list the registry of available checkpoints:
18
20
```
19
-
This will download all the models supported (including multiple checkpoints of RF3) but as a beginner you can start with:
To check what you already have downloaded (defaults to `$FOUNDRY_CHECKPOINTS_DIR` if set):
24
+
```
25
+
foundry list-installed
22
26
```
23
27
24
-
>*See `examples/all.ipynb` for how to run each model in a notebook.*
28
+
>*See `examples/all.ipynb` for how to run each model and design proteins end-to-end in a notebook.*
25
29
26
30
### Google Colab
27
31
For an interactive Google Colab notebook walking through a basic design pipeline with RFD3, MPNN, and RF3, please see the [IPD Design Pipeline Tutorial](https://colab.research.google.com/drive/1ZwIMV3n9h0ZOnIXX0GyKUuoiahgifBxh?usp=sharing).
@@ -68,11 +72,7 @@ For an interactive Google Colab notebook walking through a basic design pipeline
68
72
Install both `foundry` and models in editable mode for development:
Copy file name to clipboardExpand all lines: models/rfd3/README.md
+21-15Lines changed: 21 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,18 +10,21 @@ both are described in more detail below.
10
10
<imgsrc="docs/.assets/overview.png"alt="All-atom design with RFD3">
11
11
</p>
12
12
13
-
## Get Started
14
-
1. Install RFdiffusion3. See [Main README](../../README.md) for instructions how to install all models to run full pipeline (recommended). If you have already installed all the models skip [here](#run-inference).
13
+
> [!NOTE]
14
+
> Looking for config documentation? See [here](./docs/input.md)
15
+
16
+
## Getting Started
17
+
1. Install RFdiffusion3. See [Main README](../../README.md) for instructions how to install all models to run full pipeline (recommended). If you have already installed all the models skip [here](#run-inference).
15
18
```bash
16
19
pip install rc-foundry[rfd3]
17
20
```
18
21
2. Download checkpoint to your desired checkpoint location.
This sets `FOUNDRY_CHECKPOINTS_DIR` and will in future look for checkpoints in that directory, allowing you to run inference without supplying the checkpoint path. The checkpoint directory is optional, defaulting to `~/.foundry/checkpoints` if unset.
23
26
24
-
## Run Inference
27
+
## Running Inference
25
28
26
29
To run inference (with foundry installed in your environment, or RFD3 & Foundry src in PYTHONPATH):
27
30
```bash
@@ -54,15 +57,6 @@ that you are running the examples from the `foundry/models/rfd3/docs`
54
57
directory. If you would like to run RFD3 from a different location,
55
58
you will need to change the path in the `.json` file(s) before running.
56
59
57
-
### Install HBPLUS for hydrogen bond conditioning:
58
-
One of the examples shows how to incorporate hydrogen bond conditioning
59
-
into your designs. To make use of this feature, you will need to
60
-
additionally complete the following steps:
61
-
62
-
1. Download hbplus from here: https://www.ebi.ac.uk/thornton-srv/software/HBPLUS/download.html (available for free)
63
-
2. Follow the installation instruction here: https://www.ebi.ac.uk/thornton-srv/software/HBPLUS/install.html
64
-
3. Update `HBPLUS_PATH` in `foundry/.env` file with the path to your `hbplus` executable.
65
-
66
60
<table>
67
61
<tr>
68
62
<td align="center">
@@ -90,7 +84,7 @@ additionally complete the following steps:
90
84
</tr>
91
85
</table>
92
86
93
-
## Training:
87
+
## Training and Fine-Tuning
94
88
95
89
We make available to the community not only the weights to run RFdiffusion3 but also the complete training code, easily extendable to additional use cases. Any AtomWorks-compatible dataset (and thus, any collection of structure files) can be readily incorporated and used for training or fine-tuning.
96
90
@@ -112,9 +106,10 @@ RFdiffusion3 supports arbitrary datasets of structure files for training and fin
112
106
113
107
After setting up Hydra configs, launch a training run:
114
108
```bash
115
-
uv run python models/rfd3/src/rfd3/train.py experiment=pretrain
109
+
uv run python models/rfd3/src/rfd3/train.py experiment=pretrain ckpt_path=<path/to/ckpt>
116
110
```
117
111
112
+
Supplying `ckpt_path=null` (default) will start with fresh weights.
118
113
See the [path configs](/models/rfd3/configs/paths/) to customize data input and log output directories.
119
114
120
115
### Logging Configuration
@@ -162,6 +157,17 @@ In `models/rfd3/configs/datasets/design_base.yaml` there's the shared configs fo
162
157
163
158
**Training with WandB:** We strongly recommend tracking your runs via wandb. To use it, simply have your WANDB_API_KEY set and use the wandb logger. For more details see [here](wandb.ai)
164
159
160
+
# Appendix
161
+
162
+
## Install HBPLUS for hydrogen bond conditioning:
163
+
One of the examples shows how to incorporate hydrogen bond conditioning
164
+
into your designs. To make use of this feature, you will need to
165
+
additionally complete the following steps:
166
+
167
+
1. Download hbplus from here: https://www.ebi.ac.uk/thornton-srv/software/HBPLUS/download.html (available for free)
168
+
2. Follow the installation instruction here: https://www.ebi.ac.uk/thornton-srv/software/HBPLUS/install.html
169
+
3. Update `HBPLUS_PATH` in `foundry/.env` file with the path to your `hbplus` executable.
170
+
165
171
## Citation
166
172
167
173
If you use this code or data in your work, please consider citing:
In this document, we detail the syntax of the config structure.
38
+
39
+
## CLI arguments
40
+
Key CLI arguments (from the default config) to know include:
41
+
-`n_batches` — number of batches to generate per input key (default: 1).
42
+
-`diffusion_batch_size` — number of diffusion samples per batch (default: 8).
43
+
-`specification` — JSON overrides for the per-example InputSpecification (default: `{}`). For example, you can run `rfd3 design inputs=null specification.length=200` for a quick debug of creating a 200-length protein.
44
+
-`inference_sampler.num_timesteps` — diffusion timesteps for sampling (default: 200).
45
+
-`inference_sampler.step_scale` — scales diffusion step size; higher → less diverse, more designable (default: 1.5).
46
+
-`low_memory_mode` — memory-efficient tokenization mode; set `True` if GPU RAM is tight (default: False).
47
+
48
+
The full config of default arguments that are applied can be seen in [inference_engine/rfdiffusion3.yaml](../configs/inference_engine/rfdiffusion3.yaml)
49
+
33
50
## InputSpecification fields
34
51
35
52
Below is a table of all of the inputs that the `InputSpecification` accepts. Use these fields to describe what RFdiffusion3 should do with your inputs.
@@ -88,7 +105,7 @@ select_fixed_atoms:
88
105
```
89
106
90
107
<p align="center">
91
-
<img src=".assets/input_selection.png" alt="InputSelection language for foundry">
108
+
<img src=".assets/input_selection.png" alt="InputSelection language for foundry" width=500>
92
109
</p>
93
110
94
111
## Unindexing specifics
@@ -166,4 +183,4 @@ Let us know if you have any additional questions, we'd be happy to answer them!
166
183
Below is a reference for more examples of different ways you can specify inputs to select from your pdb in configs; we hope the community can find use in this flexible system for future models!
0 commit comments