Skip to content

Commit effec56

Browse files
authored
Fix typos and enhance clarity in inference docs
Corrected typos and improved clarity in the documentation regarding inference settings and file formats.
1 parent bd9a776 commit effec56

File tree

1 file changed

+2
-69
lines changed

1 file changed

+2
-69
lines changed

models/rfd3/docs/intro_inference_calculations.md

Lines changed: 2 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2,81 +2,14 @@
22
In RFdiffusion3 (RFD3), [YAML](https://yaml.org/) or [JSON](https://www.json.org/json-en.html) files are used to specify the **settings** for your inference calculations and [**configuration options**](https://hydra.cc/docs/configure_hydra/intro/) are used to provide other information about your calculation, such as the location and name of the checkpoint file you want to use.
33

44
## Inference Settings
5-
The inference 'settings' are how you constrain your inference calculation, such as specifying portions of the output you wish to have designed (`contig`) and specifying any symmetries that exist in your system (`symmetry`). These settings are stored in either a YAML or JSON file to be interpreted by RFdiffusion3. We will briefly discuss these file formats below and runnable examples of these files can be found in `foundry/models/rfd3/docs`.
5+
The inference 'settings' are how you constrain your inference calculation, such as specifying portions of the output you wish to have designed (`contig`) and specifying any symmetries that exist in your system (`symmetry`). These settings are stored in either a YAML or JSON file to be interpreted by RFdiffusion3. Runnable example sof json and yaml files can be found in `foundry/models/rfd3/docs`.
66

77
Using this type of input specification allows you to define different types of inference calculations all in the same file, and either run all of the calculation types defined in the file or specify the specific calculation you want to run via the command line.
88

99
```{note}
1010
For more information on many of the available options, see {doc}`input`. To see all available options, see [input_parsing.py](https://github.com/RosettaCommons/foundry/blob/production/models/rfd3/src/rfd3/inference/input_parsing.py).
1111
```
1212

13-
### JSON File Format
14-
In a JSON file different groupings of settings are denoted by curly braces (`{}`), colons (`:`) are used to specify the chosen setting for each setting type, and commas are used to separate different settings. Any strings included in the file need to be in quotes.
15-
16-
To start, the contents of the entire file should be surrounded by curly braces. To start a new group of settings you want to use for an inference run, give it a name (in quotes) then use a colon and an open brace to denote that you are starting a new group of settings related to that name:
17-
```json
18-
{
19-
"inference_calculation_1":{
20-
"setting1": "my_setting_1",
21-
}
22-
}
23-
```
24-
25-
If you have more than one inference calculation defined in your JSON file, make sure to add a comma between different groups:
26-
```json
27-
{
28-
"inference_calculation_1":{
29-
"setting1": "my_setting_1",
30-
},
31-
"inference_calculation_2":{
32-
"setting1": "my_setting_1",
33-
}
34-
}
35-
```
36-
Some settings will be one line while others will require defining a dictionary, leading to another set of braces:
37-
```json
38-
{
39-
"inference_calculation_1":{
40-
"string_setting": "my_string_1",
41-
"boolean_setting": true,
42-
"number_setting": -27.4,
43-
"dictionary_setting":{
44-
"key1": 2,
45-
"key2": false,
46-
"key3": "my_string_2, my_string_3"
47-
}
48-
}
49-
}
50-
```
51-
There is no syntax for comments in JSON files - you can't comment out a line or add notes. This results in very skimmable and easy to read file, but might feel limiting for taking notes or troubleshooting.
52-
53-
### YAML File Format
54-
YAML files use indentation to denote different groupings, however **tab characters are not allowed**. Comments in YAML files are denoted with `#` and can be anywhere in the line. List members are denoted using hyphens (`-`) or by enclosing comma-separated items in square brackets (`[]`). For the purposes of RFD3, strings do not need to be inclosed by quotes to be parsed correctly. The inference settings in RFD3 are interpreted as key value pairs, so when you are defining your groups, make sure to use colons (`:`) to denote a relationship between the setting name and the value you want to give it.
55-
56-
To start a set of inference settings, name the group and then include your settings in an indented chunk below it. For multiple inference calculations, go back one indentation level to name the new group and then continue on as before:
57-
```yaml
58-
# Information about what is stored in this YAML file
59-
inference_calculation_1: # Information about calculation 1
60-
# Your settings go here
61-
inference_calculation_2:
62-
# Your settings go here
63-
```
64-
And here's what your YAML file will look like with some settings added:
65-
```yaml
66-
inference_calculation_1:
67-
string_setting: my_string
68-
boolean_setting: true
69-
number_setting: -27.4
70-
list_setting:
71-
- 0.0
72-
- 1.0
73-
- 2.0
74-
dictionary_setting:
75-
key1: value1
76-
key2: value2
77-
key3: value3
78-
```
79-
8013
## Job configurations
8114
Once you have all of the settings you want to use to constrain your inference run in a JSON or YAML file, you can run the job using a command starting with `rfd3 design` and then including different 'configuration options'. You must include the path to the YAML/JSON file that defines your inference run(s) and the output directory:
8215
```bash
@@ -103,4 +36,4 @@ rfd3_example_example_1_0_model_0.json
10336
rfd3_example_example_1_0_model_1.cif.gz
10437
rfd3_example_example_1_0_model_1.json
10538
...
106-
```
39+
```

0 commit comments

Comments
 (0)