Skip to content

Commit 69a34d1

Browse files
rcluneCopilot
andauthored
Documentation (#36)
* Add and restructure documentation for RFdiffusion2 Introduces new documentation files including installation instructions, overview, and links to README and license. Updates Sphinx configuration to include sphinx-copybutton and reorganizes index.rst for improved navigation. The GitHub workflow now installs sphinx-copybutton. README updated with a link to the documentation site. * Add sphinx-new-tab-link and update documentation overview Added the sphinx-new-tab-link extension to the Sphinx build process and configuration. Updated overview.md with a detailed explanation of RFdiffusion2's capabilities and differences from the original RFdiffusion, and excluded overview.md from Sphinx build patterns. * Update and expand documentation for RFdiffusion2 Improved the README with clearer setup, installation, and inference instructions, and added troubleshooting tips. Expanded the documentation by adding new usage examples, configuration options, and ORI token explanations. Updated Sphinx configuration and index to include new documentation files, and adjusted workflow and dependencies to comment out unused Sphinx extensions. Enhanced installation guide with troubleshooting for Apptainer image issues and clarified instructions for both Apptainer and source installations. * Add CUDA 12.1/12.4 environment setup files Introduced conda environment YAMLs and pip requirements for CUDA 12.1 and 12.4 support in the 'envs' directory. Updated installation documentation to guide users on using these files and troubleshooting environment setup. Minor README correction for pipeline argument. * Update documentation for ORI tokens and config options Replaces ori_tokens.md with a new ori_tokens.rst containing detailed instructions and images. Updates configuration_options.md with more guidance on custom configs. Adjusts Sphinx conf.py exclude patterns and comments, updates index.rst to use the new ORI tokens doc, and adds supporting images. Minor typo fix in overview.md and clarifying comments in example usage docs. * Update doc/source/usage/ori_tokens.rst Co-authored-by: Copilot <[email protected]> * Update doc/source/conf.py Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent 7a615ea commit 69a34d1

File tree

14 files changed

+100
-19
lines changed

14 files changed

+100
-19
lines changed

.github/workflows/documentation_workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- uses: actions/setup-python@v5
1414
- name: Install dependencies
1515
run: |
16-
pip install sphinx sphinx_mdinclude furo sphinx-copybutton sphinx-new-tab-link
16+
pip install sphinx sphinx_mdinclude furo sphinx-copybutton #sphinx-new-tab-link
1717
- name: Sphinx build
1818
run: |
1919
sphinx-build -M html doc/source/ doc/build/

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ More detailed information about how to run, install, and use RFdiffusion2 can be
3131
- [LigandMPNN outputs](readme_link.html#ligandmpnn_outputs)
3232
-->
3333

34-
## Setup
35-
<a id="setup"></a>
34+
## Set-up
35+
<a id="set-up"></a>
3636

37-
If these setup instructions do not work for your system see the [Installation Guide](installation.html) for troubleshooting issues with the
37+
If these set-up instructions do not work for your system see the [Installation Guide](https://rosettacommons.github.io/RFdiffusion2/installation.html) for troubleshooting issues with the
3838
provided image and alternative instructions for how to install RFdiffusion2 from source.
3939

4040
1. **Clone the repo.**
172 KB
Loading
202 KB
Loading

doc/source/conf.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
napoleon_use_ivar = True
6565

6666
templates_path = ['_templates']
67-
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'overview.md', 'usage/run_inference_example.md', 'usage/other_pipeline_example.md']
67+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'overview.md', 'usage/run_inference_example.md', 'usage/other_pipeline_example.md', 'usage/configuration_options.md', 'usage/usage.rst']
6868

6969
# -- Options for HTML output -------------------------------------------------
7070
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
@@ -79,7 +79,7 @@
7979
"light_css_variables": {
8080
"color-brand-primary": "#F68A33", # Rosetta Teal
8181
"color-brand-content": "#37939B", # Rosetta Orange
82-
"color-admonition-background": "#FB35D6", # Rosetta light orange
82+
#"color-admonition-background": "#CCE8E8", # Rosetta light orange
8383
"font-stack": "Open Sans, sans-serif",
8484
"font-stack--headings": "Open Sans, sans-serif",
8585
"color-background-hover": "#DCE8E8ff",
@@ -90,7 +90,7 @@
9090
"dark_css_variables": {
9191
"color-brand-primary": "#37939B", # Rosetta teal
9292
"color-brand-content": "#F68A33", # Rosetta orange
93-
"color-admonition-background": "#FB35D6", # Rosetta light orange
93+
#"color-admonition-background": "#20565B", # Rosetta light orange
9494
"font-stack": "Open Sans, sans-serif",
9595
"font-stack--headings": "Open Sans, sans-serif",
9696
"color-brand-visited": "#37939B",

doc/source/index.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,12 @@ Welcome to the Official Documentation for `RFdiffusion2 <https://github.com/Rose
1515
readme_link.rst
1616
license_link.rst
1717
installation.md
18-
usage/usage.md
19-
usage/configuration_options.md
20-
usage/ori_tokens.md
18+
usage/ori_tokens.rst
2119

2220
.. toctree::
2321
:maxdepth: 1
2422
:hidden:
2523

26-
.. usage/other_pipeline_example.md
27-
.. usage/run_inference_example.md
28-
2924
.. Indices and tables
3025
.. ==================
3126
..

doc/source/overview.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Overview
22
========
33

44
Introduced in [Atom level enzyme active site scaffolding using RFdiffusion2](https://www.biorxiv.org/content/10.1101/2025.04.09.648075v1), RFdiffusion2 expands on the enzyme scaffolding capabilities of diffusion-based protein design by giving researchers finer control over enzyme active sites.
5-
The original [RFdiffusion](https://github.com/RosettaCommons/RFdiffusion) could generate enzyme scaffolds, but the geometry of the active site could only the specified at the residue level - no atomic or rotamer information could be directly provided.
5+
The original [RFdiffusion](https://github.com/RosettaCommons/RFdiffusion) could generate enzyme scaffolds, but the geometry of the active site could only be specified at the residue level - no atomic or rotamer information could be directly provided.
66
Although defining hotspot residues provided a way for protein designers to control scaffold-ligand interactions, they offered limited flexibility for the placement of the catalytic residues in the final design.
77

88
RFdiffusion2 addresses these limitations by:
@@ -12,4 +12,4 @@ RFdiffusion2 addresses these limitations by:
1212

1313
To learn how to run RFdiffusion2 using an [Apptainer](https://apptainer.org/) image, see the [READEME](readme_link.html).
1414

15-
> **NOTE:** The current rendition of RFdiffusion2 makes it particularly useful for enzyme scaffolding, but for many other applications RFdiffusion (the original) will be easier to use and may provide comparable or better results.
15+
> **NOTE:** The current rendition of RFdiffusion2 makes it particularly useful for enzyme scaffolding and it has increased backbone flexibility compared to RFdiffusion. However, for binder design it is recommended to use the original RFdiffusion.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,12 @@
11
## Configuration Options
2+
3+
This table only has the options shown in the `rf_diffusion/configs/inference/base.yml` and `rf_diffusion/configs/inference/aa.yml` files, as they are the most recommended for use by the developers.
4+
There are many other configuration (.yml) files in the `configs` directory, the options in them are not guaranteed to work.
5+
If you would like to create your own configuration file, which can be useful if you routinely use settings that are not the default, see the **Creating Your Own Config File** section, below.
6+
7+
8+
9+
### Creating Your Own Config File
10+
<a id="custom_configs"></a>
11+
12+
Here's some info on configurations!

doc/source/usage/ori_tokens.rst

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
ORI Tokens
2+
==========
3+
4+
ORI tokens define the center of mass for the designed portion of the enzyme scaffold. It allows for control over the active site and transition
5+
state orientation relative to the protein core. In binder design, the ORI token defines the center of mass of the binder relative to the target protein.
6+
7+
.. warning::
8+
9+
ORI tokens are only used in RFdiffusion2 and are not compatible with the original RFdiffusion.
10+
You must specify an ORI token when using RFdiffusion2
11+
12+
How to Add ORI Tokens to Your Input PDB
13+
---------------------------------------
14+
First add a ``HETATM`` to your PDB file:
15+
16+
.. code-block:: none
17+
18+
HETATM 6700 ORI ORI z 1 9.450 95.149 43.231 0.00 0.00 z ORI
19+
20+
Let's break down what each of these fields mean:
21+
22+
* ``HETATM``: This indicates that the line describes a non-standard atom.
23+
* ``6700``: This is the atom serial number. You can choose any unique number that does not conflict with existing atom numbers in your PDB file.
24+
* ``ORI``: This is the atom name. It should be set to ``ORI`` to indicate that this atom represents the ORI token.
25+
* ``ORI``: This is the residue name. It should also be set to ``ORI``.
26+
* ``z``: This is the chain identifier. You can choose any single character (letter or number) that does not conflict with existing chain IDs in your PDB file.
27+
* ``1``: This is the residue sequence number. You can choose any number that does not conflict with existing residue numbers in your PDB file.
28+
* ``9.450 95.149 43.231``: These are the X, Y, and Z coordinates of the ORI token in Angstroms. Set these to the desired position for the ORI token.
29+
* ``0.00 0.00``: These are the occupancy and temperature factor values. They can be set to ``0.00`` for the ORI token.
30+
* ``z``: This is the element symbol. It can be set to any character, as it is not relevant for the ORI token.
31+
* ``ORI``: This is the charge. It can be set to any value, as it is not relevant for the ORI token.
32+
33+
For an example of this you can take a look at ``rf_diffusion/benchmark/input/mcsa_41/M0584_1ldm.pdb``, which is used in the demo discussed in the README.
34+
The last line of this file is the ORI token.
35+
36+
.. note::
37+
You can also add the ORI token using PyMOL by running the following command in the PyMOL command line:
38+
39+
.. code-block::
40+
41+
cmd.delete("molecule1");cmd.pseudoatom(object="molecule1", pos=[-1,3,2], elem="ORI", name="ORI", vdw=1.5, hetatm=True, chain='z', segi='z', resn="ORI"); cmd.show("sphere", "molecule1");
42+
43+
Once you have added this line to your PDB file, you can move it using `PyMOL <https://www.pymol.org/>`_ or other protein visualization software.
44+
45+
For PyMOL, you can easily move the ORI token by selecting it (clicking on the sphere that represents the ORI token) and using the `"move" <https://pymolwiki.org/index.php/Move>`_ command or by dragging it with the mouse.
46+
To drag the ``HETATM`` with the mouse, select the atom by clicking on it, then go to A (action) -> drag coordinates:
47+
48+
.. figure:: /_static/images/drag_action.png
49+
:width: 90%
50+
:alt: Selecting the 'drag coordinates' option from the Action menu in PyMOL
51+
52+
Selecting the menu option that will allow you to drag only the ORI token in PyMOL.
53+
54+
If you are using a three-button mouse, you can hold shift and right-click on the ``HETATM`` to drag it in and out of the screen.
55+
To translate the atom in and out of the screen, hold shift while center-clicking and dragging.
56+
57+
.. figure:: /_static/images/moving_ori.gif
58+
:alt: Moving the ORI token in PyMOL by clicking and dragging it with the mouse
59+
60+
Moving the ORI token in PyMOL by clicking and dragging it with the mouse.
61+
62+
63+
Recommendations for ORI Token Placement
64+
---------------------------------------
65+
ORI tokens specify the center of mass of the designed region of the protein, but how do you determine where that should be?
66+
67+
One method of doing this is to estimate where the center of mass of the designed region should be relative to your input structure and then generate several ORI tokens (20-30) in a sphere around that area.
68+
Whether you want to homogeneously or randomly sample different locations within that sphere and how far apart you want the different ORI tokens to be will depend on your specific design problem.
69+
If you have the computational resources, you can generate several designs for each ORI token placement and then filter the results.
70+
71+
72+
73+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
## Using the pipelines.py script
22

3-
3+
<!-- This example is to explain how to modify or create your own json/yml files to work with the pipelines.py file-->
44

0 commit comments

Comments
 (0)