Skip to content

Commit 78e5bd7

Browse files
committed
README update and minor environment fix
I updated the README to clarify the language, update the fixed issues with the apptainer commands, and remove repeated information. I changed the name of the conda environment in environment.yml because "base" cannot be used for a conda environment.
1 parent 110d1d2 commit 78e5bd7

File tree

2 files changed

+48
-57
lines changed

2 files changed

+48
-57
lines changed

README.md

Lines changed: 47 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -13,48 +13,29 @@ This repository contains the code for the [associated preprint](https://www.bior
1313
}
1414
```
1515

16-
You can clone this repository using git, then inference can be run when you have downloaded model weights and the necessary apptainer to run (see below).
17-
18-
To download model weights:
19-
* [click here for the best RNA-design weights](https://files.ipd.uw.edu/pub/2025_RFDpoly/train_session2024-07-08_1720455712_BFF_3.00.pt)
20-
* [click here for the best general multi-polymer weights](https://files.ipd.uw.edu/pub/2025_RFDpoly/train_session2024-06-27_1719522052_BFF_7.00.pt)
21-
22-
This software runs using apptainers. To download the associated apptainer `.sif` file, [click here](https://files.ipd.uw.edu/pub/2025_RFDpoly/SE3nv.sif)
23-
Equivalent setup instructions for conda are in progress.
24-
25-
Once you have these files, you can follow the [design tutorial](https://github.com/RosettaCommons/RFDpoly/blob/main/RFDpoly_tutorial.pdf) to see various design tasks and the associated documentation/syntax.
26-
27-
Contact [email protected] if you have trouble accessing files or hit any bugs.
28-
29-
16+
## Installation and setup
3017

18+
0. Clone the repository
19+
```bash
20+
git clone [email protected]:RosettaCommons/RFDpoly.git
21+
```
3122

23+
1. Set environment variables and create directories
3224

33-
## Installation and setup
25+
Set relevant paths for installation and then create the directories the paths point to:
3426

35-
1. Set relevant paths for installation and navigate to directory for setup (change accordingly given your filesystem and choice of storage location):
36-
```Bash
37-
# Where you choose to install things (CHANGE THESE):
38-
RFDPOLY_DIR=~/git/RFDpoly_paper_version
39-
WEIGHTS_DIR=~/git/RFDpoly_paper_version/weights
40-
ENV_DIR=~/git/RFDpoly_paper_version/exec
27+
```bash
28+
# Feel free to change the exact names of the directories
29+
RFDPOLY_DIR=/path/to/RFDpoly
30+
WEIGHTS_DIR=/path/to/RFDpoly/weights
4131

42-
# Wherever you want to run some design jobs (ALSO CHANGE THIS):
43-
DESIGN_DIR=~/git/RFDpoly_paper_version/design_jobs
32+
# path for where to put the Apptainer .sif file
33+
ENV_DIR=/path/to/RFDpoly/exec
4434

4535
# Make the directories
4636
mkdir -p $RFDPOLY_DIR
4737
mkdir -p $WEIGHTS_DIR
4838
mkdir -p $ENV_DIR
49-
mkdir -p $DESIGN_DIR
50-
51-
```
52-
53-
2. Navigate to the directory where you want to set up the repo, and clone it:
54-
```Bash
55-
cd $RFDPOLY_DIR
56-
git clone [email protected]:RosettaCommons/RFDpoly.git
57-
5839
```
5940

6041
3. Navigate to the directory where you want to save model weights, download them, and set path variable for weights of your choice:
@@ -68,64 +49,74 @@ curl -O https://files.ipd.uw.edu/pub/2025_RFDpoly/train_session2024-06-27_171952
6849
curl -O https://files.ipd.uw.edu/pub/2025_RFDpoly/train_session2024-07-08_1720455712_BFF_3.00.pt
6950

7051
# Set weights path (replace with your choice of weights):
71-
MODEL_WEIGHTS_PATH=$WEIGHTS_DIR/train_session2024-07-08_1720455712_BFF_3.00.pt
72-
export RFDPOLY_CKPT_PATH="$MODEL_WEIGHTS_PATH"
73-
52+
export RFDPOLY_CKPT_PATH=\$WEIGHTS_DIR/train_session2024-07-08_1720455712_BFF_3.00.pt
7453
```
7554

7655
4. Setting up the environment:
77-
Navigate to the directory where you want to apptainer file, download it, and set path variable:
56+
Navigate to the directory where you want to [Apptainer](https://apptainer.org/) file, download it, and set path variable:
7857
```Bash
7958
cd $ENV_DIR
8059
curl -O https://files.ipd.uw.edu/pub/2025_RFDpoly/SE3nv.sif
8160
APPTAINER_PATH=$ENV_DIR/SE3nv.sif
82-
8361
```
62+
Downloading the `.sif` file may take several minutes.
63+
64+
<!--Equivalent python environments can be set up using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html), or an environment manager of your choice. Environment files are provided in `rf_diffusion/environment` and can be used as follows:
65+
```bash
66+
apptainer build SE3nv.sif SE
67+
```-->
8468

85-
Equivalent python environments can be set up using conda, or an environment manager of your choice.
86-
All dependencies and packages are specified in the files found in `rf_diffusion/environment` (see `environment.yml` and `SE3nv.spec`)
69+
## Basic Use Case Example: Testing Your Setup
70+
71+
In this example, RFDpoly will create a single design
72+
with three chains:
73+
1. A DNA chain with 33 segments
74+
2. An RNA chain with 33 segments
75+
3. A protein chain with 75 residues
76+
77+
Make a directory to store the outputs of the demo and store
78+
it in the `DESIGN_DIR` environment variable:
79+
```bash
80+
export DESIGN_DIR=/path/to/your/output/directory
81+
```
8782

88-
## Testing that everything works (the *DEMO*):
89-
Change directory to run from within the RFDpoly directory useful for filepath searches if you are not providing an input pdb), and run example inference script.
90-
Be sure to specify your desired output directory with `$DESIGN_DIR`.
9183
```Bash
9284
cd $DESIGN_DIR/
9385

94-
$APPTAINER_PATH $RFDPOLY_DIR/RFDpoly/rf_diffusion/run_inference.py --config-name=multi_polymer \
86+
apptainer run --nv $APPTAINER_PATH $RFDPOLY_DIR/rf_diffusion/run_inference.py --config-name=multi_polymer \
9587
diffuser.T=50 \
96-
inference.ckpt_path=$MODEL_WEIGHTS_PATH \
88+
inference.ckpt_path=$RFDPOLY_CKPT_PATH \
9789
inference.num_designs=1 \
9890
contigmap.contigs=[\'33\ 33\ 75\'] \
9991
contigmap.polymer_chains=[\'dna\',\'rna\',\'protein\'] \
10092
inference.output_prefix=$DESIGN_DIR/test_outputs/basic_uncond_test01
101-
10293
```
10394
The initial run will take a little while to precompute the IGSO3 cache, but subsequent runs will be more direct and quick.
10495

10596

10697
if that throws errors, then try:
107-
```
108-
$APPTAINER_PATH $RFDPOLY_DIR/RFDpoly/rf_diffusion/run_inference.py --config-name=multi_polymer \
98+
```bash
99+
cd $DESIGN_DIR
100+
101+
apptainer run --nv $APPTAINER_PATH $RFDPOLY_DIR/rf_diffusion/run_inference.py --config-name=multi_polymer \
109102
diffuser.T=50 \
110-
inference.ckpt_path=$MODEL_WEIGHTS_PATH \
111-
inference.input_pdb=$RFDPOLY_DIR/RFDpoly/rf_diffusion/test_data/DBP035.pdb \
112-
inference.num_designs=3 \
103+
inference.ckpt_path=$RFDPOLY_CKPT_PATH \
104+
inference.input_pdb=$RFDPOLY_DIR/rf_diffusion/test_data/DBP035.pdb \
105+
inference.num_designs=1 \
113106
contigmap.contigs=[\'33\ 33\ 75\'] \
114107
contigmap.polymer_chains=[\'dna\',\'rna\',\'protein\'] \
115108
inference.output_prefix=$DESIGN_DIR/test_outputs/basic_uncond_test01
116-
117-
118109
```
110+
119111
explanation: model initialization searches for an input pdb filepath, even if you aren't performing motif scaffolding. Providing a (real) dummy filepath will fix this is the default search paths are unsuccessful.
120112

121-
**Expected output:** a three chain .pdb file, containing a complex of DNA (chain A), RNA (chain B), and protein (chain C).
122113
**NOTE:** using the `--config-name=multi_polymer` specification is the best way to ensure that all settings work together as expected, and are consistent with the behavior reported in the manuscript.
123114

124115
## If the example (demo) command above works, proceed to exploration of the full [design tutorial](https://github.com/RosettaCommons/RFDpoly/blob/main/RFDpoly_tutorial.pdf).
125116
The full design tutorial contains many inference commands for the types of designs reported in the RFDpoly paper.
126-
The design tutorial also is intented to provide documentation, and explain arguments in the context of their use-cases.
127-
117+
The design tutorial is intended to provide documentation, and explain arguments in the context of their use-cases.
128118

119+
Contact **[email protected]** if you have trouble accessing files or hit any bugs.
129120

130121
# Additional Software Policy checklist items:
131122
## System requirements
@@ -134,7 +125,7 @@ The design tutorial also is intented to provide documentation, and explain argum
134125
- Primary workflow: Linux host with [Apptainer](https://apptainer.org/) ≥ 1.1 (or Singularity equivalent). The bundled container image runs Ubuntu 22.04.2 LTS.
135126
- Alternative workflow: macOS 13+/Windows 11 via Conda (CPU only unless you install CUDA-capable PyTorch wheels).
136127
- **Software dependencies**
137-
- Apptainer runtime to execute `SE3nv.sif`.
128+
- Apptainer runtime to execute `SE3nv.sif`, this can be built from `SE3nv.spec` in `rf_diffusion/environment`
138129
- For native/Conda installs: Python 3.10, PyTorch 1.13.1, CUDA 11.7 toolchain (if using an NVIDIA GPU), PyRosetta 2023.09+, DGL 1.0.1, e3nn 0.5.1, hydra-core 1.3.2, and the packages listed in `rf_diffusion/environment/environment.yml`.
139130
- **NOTE:** All dependencies are specified in `rf_diffusion/environment/`, such that users can set up an equivalent working environment on any operating system.
140131
- Downloaded assets: model checkpoints (`*.pt`, ~2.3 GB each) and the container image (`SE3nv.sif`, ~8 GB).

rf_diffusion/environment/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: base
1+
name: RFDpoly_env
22
channels:
33
- pytorch
44
- https://conda.rosettacommons.org

0 commit comments

Comments
 (0)