Skip to content

Commit 163ca44

Browse files
authored
Merge pull request #25 from fjclark/bugfix_abfe_typo
Fix typos in ABFE setup tutorial
2 parents 9d89713 + b70a9fa commit 163ca44

File tree

2 files changed

+19
-9
lines changed

2 files changed

+19
-9
lines changed

04_fep/03_ABFE/01_setup_abfe.ipynb

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,13 @@
659659
" lam_vals=lam_vals_discharge_free, \n",
660660
" perturbation_type=\"discharge_soft\")\n",
661661
"\n",
662-
"free_discharge_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(restraint.system,\n",
662+
"# Assuming that you've already prepared \"free_system\", which is just the ligand in a box of water, \n",
663+
"# and marked the ligand to be decoupled, as shown earlier in this notebook. To set up a ligand\n",
664+
"# in a water box, see the introductory tutorials.\n",
665+
"free_discharge_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(free_system,\n",
663666
" free_discharge_protocol,\n",
664667
" engine='somd',\n",
665-
" restraint=restraint,\n",
668+
" restraint=None, # Restraints not needed.\n",
666669
" work_dir='output/free_discharge')\n",
667670
"\n",
668671
"lam_vals_vanish_free = [0.000, 0.028, 0.056, 0.111, 0.167, 0.222, 0.278, 0.333, 0.389, 0.444, \n",
@@ -672,10 +675,12 @@
672675
" lam_vals=lam_vals_vanish_free,\n",
673676
" perturbation_type=\"vanish_soft\")\n",
674677
"\n",
675-
"free_vanish_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(restraint.system,\n",
678+
"# As noted above, we assumed that you've already prepared \"free_system\" (the ligand in a box\n",
679+
"# of water) and marked the ligand to be decoupled.\n",
680+
"free_vanish_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(free_system,\n",
676681
" free_vanish_protocol,\n",
677682
" engine='somd', \n",
678-
" restraint=restraint,\n",
683+
" restraint=None, # Restraints not needed.\n",
679684
" work_dir='output/free_vanish')\n",
680685
"```\n",
681686
"\n",

04_fep/03_ABFE/01_setup_abfe.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ The price paid for greater generality is that these calculations are generally h
8787

8888
In some ways ABFE calculations are simpler than RBFE calculations, in that we do not need to align and merge two ligands. However, ABFE calculations require receptor-ligand restraints (shown by the red dotted lines above) to prevent sampling issues. To obtain converged free energies of binding without restraints, we would have to be sure that the ligand was sampling outside the binding site as soon as the unbound state became comparable in free energy to the bound state, and that we were correctly estimating the ratios of the sizes of the simulation box to the binding site; in practice, this is not generally feasible.
8989

90-
There are several varieties of receptor-ligand restraints, including [distance-to-bound configuration (DBC) restraints](https://pubs.acs.org/doi/full/10.1021/acs.jctc.8b00447), [restraints on coarse variables derived by finding the optimal rotation which minimises the complex's RMSD with respect to a reference structure](https://pubs.acs.org/doi/full/10.1021/acs.jctc.7b00791), and [multiple distance restraints](https://pubs.acs.org/doi/10.1021/acs.jctc.3c00139).
90+
There are several varieties of receptor-ligand restraints, including [distance-to-bound configuration (DBC) restraints](https://pubs.acs.org/doi/full/10.1021/acs.jctc.8b00447), [restraints on coarse variables derived by finding the optimal rotation which minimises the complex's RMSD with respect to a reference structure](https://pubs.acs.org/doi/full/10.1021/acs.jctc.7b00791), and [multiple distance restraints](https://pubs.acs.org/doi/10.1021/acs.jctc.3c00139).
9191

9292
Here, we will use the set of receptor-ligand restraints originally proposed by [Boresch et al.](https://pubs.acs.org/doi/full/10.1021/jp0217839), because they are simple to implement, very widely used, and the only restraints currently supported by BioSimSpace. These restrain all 6 relative external degrees of freedom (three translational and three rotational) of the ligand with respect to the receptor. This is done by imposing harmonic restraints on one distance, two angles, and three dihedral angles defined by three anchor points in the protein (P1-3) and three in the ligand (L1-3):
9393

@@ -450,10 +450,13 @@ free_discharge_protocol = BSS.Protocol.FreeEnergy(runtime=6*BSS.Units.Time.nanos
450450
lam_vals=lam_vals_discharge_free,
451451
perturbation_type="discharge_soft")
452452

453-
free_discharge_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(restraint.system,
453+
# Assuming that you've already prepared "free_system", which is just the ligand in a box of water,
454+
# and marked the ligand to be decoupled, as shown earlier in this notebook. To set up a ligand
455+
# in a water box, see the introductory tutorials.
456+
free_discharge_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(free_system,
454457
free_discharge_protocol,
455458
engine='somd',
456-
restraint=restraint,
459+
restraint=None, # Restraints not needed.
457460
work_dir='output/free_discharge')
458461

459462
lam_vals_vanish_free = [0.000, 0.028, 0.056, 0.111, 0.167, 0.222, 0.278, 0.333, 0.389, 0.444,
@@ -463,10 +466,12 @@ free_vanish_protocol = BSS.Protocol.FreeEnergy(runtime=6*BSS.Units.Time.nanoseco
463466
lam_vals=lam_vals_vanish_free,
464467
perturbation_type="vanish_soft")
465468

466-
free_vanish_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(restraint.system,
469+
# As noted above, we assumed that you've already prepared "free_system" (the ligand in a box
470+
# of water) and marked the ligand to be decoupled.
471+
free_vanish_fe_calc = BSS.FreeEnergy.AlchemicalFreeEnergy(free_system,
467472
free_vanish_protocol,
468473
engine='somd',
469-
restraint=restraint,
474+
restraint=None, # Restraints not needed.
470475
work_dir='output/free_vanish')
471476
```
472477

0 commit comments

Comments
 (0)