Skip to content

Commit 9c92e6b

Browse files
authored
Merge pull request #363 from OpenFreeEnergy/explore_edit
Add AHFE details to exploring settings how-to
2 parents 4de723c + cc8225d commit 9c92e6b

1 file changed

Lines changed: 46 additions & 23 deletions

File tree

‎cookbook/exploring_protocol_settings.ipynb‎

Lines changed: 46 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@
2525
]
2626
},
2727
{
28-
"metadata": {},
2928
"cell_type": "markdown",
29+
"id": "84d716d6bc428c83",
30+
"metadata": {},
3031
"source": [
3132
"## Sampling and performance settings\n",
3233
"\n",
@@ -52,14 +53,25 @@
5253
"| **Protocol repeats** | The number of independent executions of the protocol. | `protocol_repeats` | `int` |\n",
5354
"\n",
5455
"The appropriate changes to these settings are transformation dependent with no single setting guaranteeing sufficient convergence or accuracy in general. These settings provide a good starting point to investigate the affect of additional sampling. The following example retrieves them from the default settings:"
55-
],
56-
"id": "84d716d6bc428c83"
56+
]
5757
},
5858
{
59-
"metadata": {},
6059
"cell_type": "code",
61-
"outputs": [],
62-
"execution_count": null,
60+
"execution_count": 2,
61+
"id": "921c307e3d1f19b8",
62+
"metadata": {},
63+
"outputs": [
64+
{
65+
"name": "stdout",
66+
"output_type": "stream",
67+
"text": [
68+
"Lambda windows: 11\n",
69+
"Production length per state: 5.0 nanosecond\n",
70+
"Equilibration length per state: 1.0 nanosecond\n",
71+
"Independent repeats: 3\n"
72+
]
73+
}
74+
],
6375
"source": [
6476
"n_repeats = settings.protocol_repeats\n",
6577
"n_windows = settings.lambda_settings.lambda_windows\n",
@@ -70,12 +82,12 @@
7082
"print(f\"Production length per state: {production_length}\")\n",
7183
"print(f\"Equilibration length per state: {equilibration_length}\")\n",
7284
"print(f\"Independent repeats: {n_repeats}\")"
73-
],
74-
"id": "921c307e3d1f19b8"
85+
]
7586
},
7687
{
77-
"metadata": {},
7888
"cell_type": "markdown",
89+
"id": "22b1aa1dd390fd73",
90+
"metadata": {},
7991
"source": [
8092
"### Estimating the computational cost of a protocol\n",
8193
"\n",
@@ -97,14 +109,22 @@
97109
"</div>\n",
98110
"\n",
99111
"So for the default settings the total simulation time is:"
100-
],
101-
"id": "22b1aa1dd390fd73"
112+
]
102113
},
103114
{
104-
"metadata": {},
105115
"cell_type": "code",
106-
"outputs": [],
107-
"execution_count": null,
116+
"execution_count": 3,
117+
"id": "c8b951b79fd1c4bb",
118+
"metadata": {},
119+
"outputs": [
120+
{
121+
"name": "stdout",
122+
"output_type": "stream",
123+
"text": [
124+
"Total simulation time: 198.0 nanosecond\n"
125+
]
126+
}
127+
],
108128
"source": [
109129
"def estimate_rbfe_cost(settings):\n",
110130
" n_repeats = settings.protocol_repeats\n",
@@ -117,8 +137,7 @@
117137
"\n",
118138
"total_sim_time_per_leg = estimate_rbfe_cost(settings)\n",
119139
"print(f\"Total simulation time: {total_sim_time_per_leg}\")"
120-
],
121-
"id": "c8b951b79fd1c4bb"
140+
]
122141
},
123142
{
124143
"cell_type": "markdown",
@@ -390,7 +409,7 @@
390409
},
391410
{
392411
"cell_type": "markdown",
393-
"id": "c1d2e3f4a5b60001",
412+
"id": "881aec55e73c19cd",
394413
"metadata": {},
395414
"source": [
396415
"### Other protocols\n",
@@ -402,16 +421,20 @@
402421
"\n",
403422
"These protocols execute both the `complex` and `solvent` legs within a single transformation, the settings to control the production sampling are then prefixed with the leg name `complex_*` or `solvent_*`.\n",
404423
"\n",
405-
"In addition, each leg has a `*_equil_simulation_settings` object controlling an initial MD simulation used to determine the restraint atoms in the complex and to seed both legs production simulations.\n"
424+
"In addition, each leg has a `*_equil_simulation_settings` object controlling an initial MD simulation used to determine the restraint atoms in the complex and to seed both legs production simulations.\n",
425+
"\n",
426+
"<div alert class=\"alert alert-info\">\n",
427+
"\n",
428+
"**Note:** The **AbsoluteSolvationProtocol** follows the same per-leg settings pattern, but uses the prefixes **vacuum_*** and **solvent_*** rather than **complex_*** and **solvent_*** and the following examples also apply to that protocol.\n",
429+
"\n",
430+
"</div>"
406431
]
407432
},
408433
{
409434
"cell_type": "code",
410435
"execution_count": 8,
411-
"id": "61192c7c",
412-
"metadata": {
413-
"nbsphinx": "hidden"
414-
},
436+
"id": "f6c511b6841b4135",
437+
"metadata": {},
415438
"outputs": [],
416439
"source": [
417440
"import warnings\n",
@@ -423,7 +446,7 @@
423446
{
424447
"cell_type": "code",
425448
"execution_count": 9,
426-
"id": "other-protocol-imports",
449+
"id": "bb9691bd6e6cec83",
427450
"metadata": {},
428451
"outputs": [],
429452
"source": [

0 commit comments

Comments
 (0)