Skip to content

Commit a84a6c9

Browse files
committed
Revise docs and environments for improved setup
Updated documentation to improve clarity and navigation, including new Sphinx includes for README, LICENSE, and CONTRIBUTING. Added a dedicated installation guide and macOS environment file. Removed obsolete environment files and Apptainer spec, streamlining environment setup instructions to favor provided YAML files and external documentation.
1 parent 8aeb7f7 commit a84a6c9

16 files changed

+152
-668
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ When contributing to the code base, please adhere to the [PEP8 style guide](http
2727
Please write tests for any contributed code or append to
2828
existing tests.
2929

30+
Existing tests can be found in `rf_diffusion/test_inference_commands.py`
31+
3032
### Approving and Merging Pull Requests
3133
Currently only the original developers and the Devel Team
3234
at Rosetta Commons can approve and merge pull requests. PRs

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,22 @@ This repository contains the code for the [associated preprint](https://www.bior
1212
publisher={Cold Spring Harbor Laboratory}
1313
}
1414
```
15+
## Documentation
16+
More information and documentation can be found [here](https://rosettacommons.github.io/RFDpoly/).
1517

1618
## Installation and setup
1719

18-
0. Clone the repository
20+
### 1. Clone the repository
1921
```bash
2022
git clone [email protected]:RosettaCommons/RFDpoly.git
2123
```
2224

23-
1. Set environment variables and create directories
25+
### 2. Set environment variables and create directories
26+
27+
*This section is not necessary for running RFDpoly,
28+
but te example commands below use these environment
29+
variables.*
30+
2431

2532
Set relevant paths for installation and then create the directories the paths point to:
2633

@@ -38,7 +45,7 @@ mkdir -p $WEIGHTS_DIR
3845
mkdir -p $ENV_DIR
3946
```
4047

41-
3. Navigate to the directory where you want to save model weights, download them, and set path variable for weights of your choice:
48+
### 3. Navigate to the directory where you want to save model weights, download them, and set path variable for weights of your choice:
4249
```Bash
4350
# Download model weights:
4451
cd $WEIGHTS_DIR
@@ -52,7 +59,7 @@ curl -O https://files.ipd.uw.edu/pub/2025_RFDpoly/train_session2024-07-08_172045
5259
export RFDPOLY_CKPT_PATH=\$WEIGHTS_DIR/train_session2024-07-08_1720455712_BFF_3.00.pt
5360
```
5461

55-
4. Setting up the environment:
62+
### 4. Setting up the environment:
5663
Navigate to the directory where you want to [Apptainer](https://apptainer.org/) file, download it, and set path variable:
5764
```Bash
5865
cd $ENV_DIR
@@ -61,10 +68,8 @@ APPTAINER_PATH=$ENV_DIR/SE3nv.sif
6168
```
6269
Downloading the `.sif` file may take several minutes.
6370

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-
```-->
71+
You can find alternative installation instructions in the
72+
[external documentation](https://rosettacommons.github.io/RFDpoly/).
6873

6974
## Basic Use Case Example: Testing Your Setup
7075

@@ -125,10 +130,8 @@ Contact **[email protected]** if you have trouble accessing files or hit any bugs.
125130
- Primary workflow: Linux host with [Apptainer](https://apptainer.org/) ≥ 1.1 (or Singularity equivalent). The bundled container image runs Ubuntu 22.04.2 LTS.
126131
- Alternative workflow: macOS 13+/Windows 11 via Conda (CPU only unless you install CUDA-capable PyTorch wheels).
127132
- **Software dependencies**
128-
- Apptainer runtime to execute `SE3nv.sif`, this can be built from `SE3nv.spec` in `rf_diffusion/environment`
129133
- 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`.
130134
- **NOTE:** All dependencies are specified in `rf_diffusion/environment/`, such that users can set up an equivalent working environment on any operating system.
131-
- Downloaded assets: model checkpoints (`*.pt`, ~2.3 GB each) and the container image (`SE3nv.sif`, ~8 GB).
132135
- **Tested configurations**
133136
- Ubuntu 22.04 host with Apptainer 1.1.9, NVIDIA driver ≥ 515, CUDA 11.7 runtime.
134137
- PyTorch 1.13.1+cu117, Python 3.10.8, PyRosetta 2023.09 inside the container.

docs/source/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232

3333
html_theme_options = {
3434
"sidebar_hide_name":False,
35-
"announcement": "<em>THIS DOCUMENTATION IS CURRENTLY UNDER CONSTRUCTION</em>",
35+
#"announcement": "<em>THIS DOCUMENTATION IS CURRENTLY UNDER CONSTRUCTION</em>",
3636
"light_css_variables": {
3737
"color-brand-primary": "#F68A33", # Rosetta Teal
3838
"color-brand-content": "#37939B", # Rosetta Orange

docs/source/contributing_link.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONTRIBUTING to RFDpoly
2+
=======================
3+
4+
.. include:: ../../CONTRIBUTING.md
5+
:parser: myst_parser.sphinx_

docs/source/index.rst

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
RFDpoly documentation
77
=====================
88

9-
Add your content using ``reStructuredText`` syntax. See the
10-
`reStructuredText <https://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html>`_
11-
documentation for details.
9+
.. include:: readme_link.rst
1210

1311

1412
.. toctree::
15-
:maxdepth: 2
13+
:titlesonly:
1614
:caption: Contents:
1715

16+
readme_link.rst<self>
17+
license_link.rst
18+
contributing_link.rst
19+
installation_guide.md
20+

docs/source/installation_guide.md

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
# Installation Guide
2+
3+
## Using the Apptainer Image
4+
If possible, we highly recommend using the provided apptainer image which can be obtained via:
5+
```bash
6+
curl -O https://files.ipd.uw.edu/pub/2025_RFDpoly/SE3nv.sif
7+
```
8+
9+
Here is an example for how to use this image to run RFDpoly:
10+
```bash
11+
apptainer run --nv /path/to/SE3nv.sif /path/to/RFDpoly/rf_diffusion/run_inference.py --config-name=multi_polymer \
12+
diffuser.T=50 \
13+
inference.ckpt_path=/path/to/train_session2024-07-08_1720455712_BFF_3.00.pt \
14+
inference.num_designs=1 \
15+
contigmap.contigs=[\'33\ 33\ 75\'] \
16+
contigmap.polymer_chains=[\'dna\',\'rna\',\'protein\'] \
17+
inference.output_prefix=/path/to/your/output/directory/basic_uncond_test01
18+
```
19+
20+
If you see an error when attempting to run this related to
21+
a lack of an input file, try adding this option:
22+
```bash
23+
inference.input_pdb=/path/to/RFDpoly/rf_diffusion/test_data/DBP035.pdb
24+
```
25+
26+
## Creating a Conda Environment
27+
28+
### Linux:
29+
If the apptainer image is not compatible with your system
30+
or you are doing development with RFDpoly, you can create
31+
a [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) environment with a provided `environment.yml` file:
32+
33+
```bash
34+
conda env create -f /path/to/RFDpoly/rf_diffusion/environment/environment.yml
35+
conda activate RFDpoly_env
36+
pip install /path/to/RFDpoly/rf_diffusion/RF2-allatom/rf2aa/SE3Transformer
37+
```
38+
The last command installs a slightly modified version of
39+
se3-transformer. If installing this package does not work,
40+
you can try installing [`se3-transformer-pytorch`](https://pypi.org/project/se3-transformer-pytorch/) instead,
41+
but we do not guarantee that your results will be exactly
42+
the same.
43+
44+
You can test your installation by running:
45+
```bash
46+
python /path/to/RFDpoly/rf_diffusion/run_inference.py \
47+
--config-name=multi_polymer \
48+
diffuser.T=50 \
49+
inference.ckpt_path=/path/to/RFDpoly/weights/train_session2024-07-08_1720455712_BFF_3.00.pt \
50+
inference.num_designs=1 \
51+
contigmap.contigs=[\'33\ 33\ 75\'] \
52+
contigmap.polymer_chains=[\'dna\',\'rna\',\'protein\'] \
53+
inference.output_prefix=./basic_uncond_test01
54+
```
55+
56+
If using the `environment.yml` file does not work, please
57+
create an issue. Or, if you modified the `.yml` file to
58+
work for your system, make a pull request to add it to
59+
the `rf_diffusion/environment` folder.
60+
61+
### MacOS
62+
If the apptainer image is not compatible with your system
63+
or you are doing development with RFDpoly, you can create
64+
a [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html) or [mamba](https://mamba.readthedocs.io/en/latest/user_guide/mamba.html) environment with a provided `macos_environment.yml` file:
65+
66+
```bash
67+
conda env create -f /path/to/RFDpoly/rf_diffusion/environment/macos_environment.yml
68+
conda activate RFDpoly_env
69+
pip install /path/to/RFDpoly/rf_diffusion/RF2-allatom/rf2aa/SE3Transformer
70+
```
71+
The last command installs a slightly modified version of
72+
se3-transformer. If installing this package does not work,
73+
you can try installing [`se3-transformer-pytorch`](https://pypi.org/project/se3-transformer-pytorch/) instead,
74+
but we do not guarantee that your results will be exactly
75+
the same.
76+
77+
You can test your installation by running:
78+
```bash
79+
python /path/to/RFDpoly/rf_diffusion/run_inference.py \
80+
--config-name=multi_polymer \
81+
diffuser.T=50 \
82+
inference.ckpt_path=/path/to/RFDpoly/weights/train_session2024-07-08_1720455712_BFF_3.00.pt \
83+
inference.num_designs=1 \
84+
contigmap.contigs=[\'33\ 33\ 75\'] \
85+
contigmap.polymer_chains=[\'dna\',\'rna\',\'protein\'] \
86+
inference.output_prefix=./basic_uncond_test01
87+
```
88+
89+
If using the `macos_environment.yml` file does not work,
90+
please create an issue. Or, if you modified the `.yml` file
91+
to work for your system, make a pull request to add it to
92+
the `rf_diffusion/environment` folder.

docs/source/license_link.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
LICENSE
2+
=======
3+
4+
.. include:: ../../LICENSE.md
5+
:parser: myst_parser.sphinx_

docs/source/readme_link.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
README
2+
======
3+
4+
.. include:: ../../README.md
5+
:parser: myst_parser.sphinx_
6+

rf_diffusion/environment/SE3nv.spec

Lines changed: 0 additions & 94 deletions
This file was deleted.

rf_diffusion/environment/conda-config.txt

Lines changed: 0 additions & 9 deletions
This file was deleted.

0 commit comments

Comments
 (0)