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
Copy file name to clipboardExpand all lines: models/rfd3/docs/intro_inference_calculations.md
+2-69Lines changed: 2 additions & 69 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,81 +2,14 @@
2
2
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.
3
3
4
4
## 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`.
6
6
7
7
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.
8
8
9
9
```{note}
10
10
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).
11
11
```
12
12
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
-
80
13
## Job configurations
81
14
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:
0 commit comments