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: rbfe_tutorial/cli_tutorial.md
+63-56Lines changed: 63 additions & 56 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,63 +1,66 @@
1
1
# Relative Free Energies with the OpenFE CLI
2
2
3
-
This tutorial will show how to use the OpenFE command line interface to get
4
-
free energies -- with no Python at all! This will work for simple setups, but you
5
-
may need to use the Python interface for more complicated setups.
3
+
This tutorial will show how to use the OpenFE CLI (Command Line Interface) to calculate
4
+
free energies - with no Python at all! This CLI works for simple setups, but you
5
+
may need to use the Python API for more complicated setups.
6
6
7
7
The entire process of running the campaign of simulations is split into 3
8
8
stages, each of which corresponds to a CLI command:
9
9
10
-
1. Setting up the necessary files to describe each of the individual
11
-
simulations to run
10
+
1. Setting up the files necessary to run each of the simulations
12
11
2. Running the simulations
13
-
3. Gathering the results of separate simulations into a single table
12
+
3. Gathering the results of the simulations into a single table
14
13
15
-
To work through this tutorial, start out with a fresh directory. You can download the tutorial materials (including this file) using the command:
14
+
To work through this tutorial, start out with a fresh directory. You can download the tutorial materials (including these instructions) using the command:
16
15
17
16
```bash
18
17
openfe fetch rbfe-tutorial
19
18
```
20
19
21
-
Then when you run `ls`, you should see that your directory has this file,
22
-
`cli_tutorial.md`, a notebook called `python_tutorial.ipynb`, and files with
23
-
the molecules we'll use in this tutorial: `tyk2_ligands.sdf` and
24
-
`tyk2_protein.pdb`.
20
+
Then when you run `ls`, you should see that your directory has:
21
+
22
+
-`cli_tutorial.md`: the file containing these instructions
23
+
-`python_tutorial.ipynb`: a notebook detailing how to do this analysis using the Python API, instead of the CLI shown here.
24
+
-`tyk2_ligands.sdf` and `tyk2_protein.pdb` : files containing the molecules we'll use in this tutorial.
25
25
26
26
## Setting up the campaign
27
27
28
-
The CLI makes setting up the simulation very easy -- it's just a single CLI
28
+
The CLI makes setting up the simulation very easy - it's just a single CLI
29
29
command. There are separate commands for relative binding free energy (RBFE)
30
30
and relative hydration free energy setups (RHFE).
31
31
32
32
For RBFE campaigns, the relevant command is `openfe plan-rbfe-network`. For
33
33
RHFE, the command is `openfe plan-rhfe-network`. They work mostly the same,
34
34
except that the RHFE planner does not take a protein. In this tutorial, we'll
35
-
do an RBFE calculation. The only difference for RBFE is in the setup stage --
35
+
do an RBFE calculation. The only difference for RHFE is in the setup stage -
36
36
running the simulations and gathering the results are the same.
37
37
38
-
To run the command, we do the following:
39
-
* Read all the ligands from the SDF by giving
40
-
the option `-M tyk2_ligands.sdf`. You can also use `-M` with a directory, and
41
-
it will load all molecules found in any SDF or MOL2 file in that directory.
42
-
* Pass a PDB of the protein target (TYK2) with `-p tyk2_protein.pdb`.
43
-
* Instruct `openfe` to output files into a directory called `network_setup`
@@ -79,16 +82,18 @@ This opens an interactive viewer. You can move the ligand names around to get a
79
82
better view of the structure, and if you click on the edge, you will see the
80
83
mapping for that edge.
81
84
82
-
The files that describe each individual simulation we will run are located in the
83
-
`transformations` subdirectory. Each JSON file represents a single alchemical
84
-
leg to run, and contains all the necessary information to run that leg. A
85
-
single RBFE between a pair of ligands requires running two legs of an alchemical cycle (JSON files):
86
-
one for the ligand in solvent, and one for the ligand complexed with the
87
-
protein. The results from these two simulations can then be combined to obtained a single $\Delta\Delta G$ relative binding free energy value. Filenames indicate ligand names as taken from the SDF; for example,
88
-
the file `easy_rbfe_lig_ejm_31_complex_lig_ejm_42_complex.json` is the leg
85
+
The files that describe each individual simulation we will run are located within
86
+
`network_setup/transformations/`. Each JSON file represents a single alchemical
87
+
leg to run and contains all the necessary information to run that leg.
88
+
Filenames indicate ligand names as taken from the SDF; for example, the file
89
+
`easy_rbfe_lig_ejm_31_complex_lig_ejm_42_complex.json` is the leg
89
90
associated with the tranformation of the ligand `lig_ejm_31` into `lig_ejm_42`
90
91
while in complex with the protein.
91
92
93
+
A single RBFE between a pair of ligands requires running two legs of an alchemical cycle (JSON files):
94
+
one for the ligand in solvent, and one for the ligand complexed with the
95
+
protein. The results from these two simulations can then be combined to obtained a single $\Delta\Delta G$ relative binding free energy value.
96
+
92
97
Note that this specific setup makes a number of choices for you. All of
93
98
these choices can be customized in the Python API. Here are the specifics on
94
99
how these simulation are set up:
@@ -103,13 +108,15 @@ how these simulation are set up:
103
108
104
109
## Customize your campaign setup
105
110
106
-
OpenFE contains many different options and methods for setting up a simulation campaign.
107
-
The options can be easily accessed and modified by providing a settings
111
+
OpenFE contains many different options and methods for setting up a simulation campaign.
112
+
The options can be easily accessed and modified by providing a settings
108
113
file in the `.yaml` format.
109
-
Let's assume you want to exchange the LOMAP atom mapper with the Kartograf
114
+
Let's assume you want to exchange the LOMAP atom mapper with the Kartograf
110
115
atom mapper and the Minimal Spanning Tree
111
116
Network Planner with the Maximal Network Planner, then you could do the following:
117
+
112
118
1. provide a file like `settings.yaml` with the desired changes:
119
+
113
120
```yaml
114
121
mapper:
115
122
method: kartograf
@@ -119,6 +126,7 @@ network:
119
126
```
120
127
121
128
2. Plan your rbfe network with an additional `-s` flag for passing the settings:
0 commit comments