Skip to content

Commit d031b9d

Browse files
authored
Add files via upload
1 parent e3e0b19 commit d031b9d

5 files changed

Lines changed: 1786 additions & 0 deletions
Lines changed: 278 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,278 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"# **The Molecular Treasure Hunt: Part 1: In the beginning - making your life easier and preparing your input files carefully**"
8+
]
9+
},
10+
{
11+
"cell_type": "markdown",
12+
"metadata": {},
13+
"source": [
14+
"*An Ångstrom sized adventure by Sarah Harris (Leeds Physics) and Geoff Wells (UCL Pharmacy)*"
15+
]
16+
},
17+
{
18+
"cell_type": "markdown",
19+
"metadata": {},
20+
"source": [
21+
"\"*It's a dangerous business, going out your door. You step onto the road, and if you don't keep your feet, there's no knowing where you might be swept off to.*\" J.R.R. Tolkien, The Fellowship of the Ring."
22+
]
23+
},
24+
{
25+
"cell_type": "markdown",
26+
"metadata": {},
27+
"source": [
28+
"# References and weblinks\n",
29+
"These are links to software used for preparing docking files, running the docking and visualising the output.\n",
30+
"\n",
31+
"## Autodock Vina:\n",
32+
"\n",
33+
"For version 1.1.0: O. Trott, A. J. Olson. AutoDock Vina: improving the speed and accuracy of docking with a new scoring function, efficient optimization and multithreading, Journal of Computational Chemistry 2010, 31, 455-461. doi:10.1002/jcc.21334\n",
34+
"Download: http://vina.scripps.edu/download.html\n",
35+
"\n",
36+
"For version 1.2.0: J. Eberhardt, D. Santos-Martins, A.F. Tillack, S. Forli. AutoDock Vina 1.2.0: New Docking Methods, Expanded Force Field, and Python Bindings. Journal of Chemical Information and Modeling 2021, 61, 8, 3891–3898. doi:10.1021/acs.jcim.1c00203\n",
37+
"\n",
38+
"\n",
39+
"## Open Drug Discovery Toolkit:\n",
40+
"Incorporating openbabel\n",
41+
"\n",
42+
"N. M. O'Boyle, M. Banck, C. A. James, C. Morley, T. Vandermeersch, G. R. Hutchison. Open Babel: An open chemical toolbox. Journal of Cheminformatics, 2011, 3, 33. doi:10.1186/1758-2946-3-33\n",
43+
"\n",
44+
"M. Wójcikowski, P. Zielenkiewicz, P. Siedlecki. Open Drug Discovery Toolkit (ODDT): a new open-source player in the drug discovery field. Journal of Cheminformatics 2015, 7, 26. doi:10.1186/s13321-015-0078-2\n",
45+
"\n",
46+
"\n",
47+
"## UCSF Chimera:\n",
48+
"\n",
49+
"E. F. Pettersen, T. D. Goddard, C. C. Huang, G. S. Couch, D. M. Greenblatt, E. C. Meng, T. E. Ferrin. UCSF Chimera - a visualization system for exploratory research and analysis. J Comput Chem 2004, 25, 1605-12. doi:10.1002/jcc.20084\n",
50+
"\n",
51+
"**This is not preinstalled, so you need to download it!**\n",
52+
"\n",
53+
"Download: https://www.cgl.ucsf.edu/chimera/download.html\n",
54+
"\n",
55+
"\n",
56+
"### MGL Tools (integrated within Chimera):\n",
57+
"S. Forli, R. Huey, M. E. Pique, M. Sanner, D. S. Goodsell, and A. J. Olson Computational protein-ligand docking and virtual drug screening with the AutoDock suite. Nat Protoc. 2016, 11, 905–919. doi:10.1038/nprot.2016.051\n",
58+
"\n",
59+
"\n",
60+
"## DataWarrior (fun for chemists - but optional for everyone else!!):\n",
61+
"\n",
62+
"Thomas Sander, Joel Freyss, Modest von Korff, Christian Rufener. DataWarrior: An Open-Source Program For Chemistry Aware Data Visualization And Analysis. J Chem Inf Model 2015, 55, 460-473, doi:10.1021/ci500588j\n",
63+
"\n",
64+
"**This is not preinstalled, so you need to download it!**\n",
65+
"\n",
66+
"Download: http://www.openmolecules.org/datawarrior/download.html\n",
67+
"\n",
68+
"## Editorial Notes: \n",
69+
"You may want to save a pdf version of this notebook for your records. You can do this from the File > Download as > PDF via Latex menu."
70+
]
71+
},
72+
{
73+
"cell_type": "markdown",
74+
"metadata": {},
75+
"source": [
76+
"# What we hope to learn\n",
77+
"The focus of these notebooks (and associated code) is the evaluation of ligand binding to multiple protein structures. The workflow is designed to make this as user friendly as possible, but in order to achieve this your files should ideally be organised and set up very carefully. This is a research project, so it is not a simple exercise that you can work through blindly. You need to think about:\n",
78+
"\n",
79+
"- Your initial biological question or hypothesis.\n",
80+
"- How your protein/receptor may interact with ligands at the atomic level (always look carefully at your structures and complexes using Chimera - we really mean at every possible stage!).\n",
81+
"- The thermodynamics, the computational and chemical steps you perform during your analysis, how these may be interrelated and the approximations that are made.\n",
82+
"- The significance of what your results might mean e.g. are you trying to design a drug, or understand a biological interaction, or think about the physical interactions and dynamics that influence molecular recognition.\n",
83+
"\n",
84+
"All of these points are important to getting the most out of your project!\n",
85+
"\n",
86+
"You may feel that you only understand one or two of these areas, but by going through this process you should hopefully appreciate the spectrum of different disciplines that are necessary to address the problem as a whole. You should also know that the most difficult problems are solved through collaboration with people from different disciplines and by combining theoretical studies such as this with experimental observations.\n",
87+
"\n",
88+
"**You do not need to know or understand everything!!! This project is about finding out - not about what you might already know!! It has been the same for us while we wrote it.**\n",
89+
"\n",
90+
"## Protein targets you could dock against\n",
91+
"As long as your protein conformers are properly aligned (we tell you how to do this below), you have the freedom to dock against structures from, for example:\n",
92+
"\n",
93+
"- an MD trajectory\n",
94+
"- NMR conformers\n",
95+
"- Variants or mutants of a protein\n",
96+
"- Subtypes of a particular receptor\n",
97+
"- X-ray crystal structures from different sources, species, of different resolutions or obtained after re-refinement (e.g. PDB-redo)\n",
98+
"- Cryo-EM structures at 'atomistic' resolution\n",
99+
"\n",
100+
"**Caveat**: when you come to analyse your results in Part 5 ('Saving Your Greatest Hits') we have the option of 'animating' our docking results for particular ligands to see how protein conformation affects binding. In order to do this your protein structures should contain **exactly** the same atoms and atom types (so the files should preferably come from the same source e.g. an MD trajectory or an ensemble from an NMR experiment or careful choice of your protein conformers!). This is a limitation, but we are thinking about ways to get around it.\n",
101+
"\n",
102+
"\n",
103+
"# Preparing our input files\n",
104+
"First of all we need to check that the protein files that we are working with contain all of the necessary information for the docking and scoring calculations. We are also going to define a single grid box that describes where on or within the protein our ligands will be 'allowed' to dock (often a cavity or groove or an experimentally observed binding pocket). Therefore our proteins must be very carefully aligned to make sure that this box is always in the right place.\n",
105+
"\n",
106+
"We use Chimera to prepare and visualise our input and output structures because they have been designed to be compatible with Autodock Vina. In fact, if you explore the Tools menu in Chimera you will see that you can run simple single docking calculations using the Surface/Binding Analysis > Autodock Vina menu. You may wish to use one of your protein structures and ligands to explore this. However, this quickly becomes impractical with multiple protein conformations and many ligands, so the automated approach that we use here is important for feasibility.\n",
107+
"\n",
108+
"We will use some of this Chimera/Autodock Vina functionality to build our docking 'gridbox' configuration file a little later in this notebook. \n",
109+
"\n",
110+
"\n",
111+
"## Prerequisites for your protein .pdb files\n",
112+
"Your protein files **must** be protonated i.e. have H atoms added. This might be necessary if your protein conformer(s) came from a crystal structure which do not resolve hydrogen atoms. We discuss how to add hydrogen atoms below if this is necessary. If you have a series of structures from an NMR experiment or a series of protein conformers from a molecular dynamics (MD) simulation, the protein structures should already be protonated.\n",
113+
"\n",
114+
"## How to align your protein structures\n",
115+
"You can align proteins using Chimera as follows:\n",
116+
"\n",
117+
"- Open Chimera.\n",
118+
"- Open your pdb files (all of them!) using the File > Open menu.\n",
119+
"- If necessary you can protonate your pdb files at this stage by using the Tools > Structure Editing > AddH menu and following the instructions.\n",
120+
"\n",
121+
"Chimera will ask you a lot of annoying questions. Just agree to everything, unless you think you know better. If you have done something ambitious, like including post-translational modifications (e.g. glycosylation or phosphorylation sites), cofactors, metal coordination sites, etc. then it is likely that you will have to think carefully at this stage. \n",
122+
"\n",
123+
"- Align your files using the Tools > Structure Comparison > Match Maker.\n",
124+
"- From the Match Maker menu pick the protein that you would like to use as the template then select all of the other structures to align to it (using cntrl-click to select them).\n",
125+
"- Click OK to align the structures.\n",
126+
"- You will then need to save each structure into a separate pdb file, you can do this by opening the File > Save PDB menu.\n",
127+
"- Enter a file name for the first file that you would like to save and select the matching file from the Save Models list. Make sure that the 'Save relative to model:' box is ticked. Then click on Save at the bottom of the window.\n",
128+
"- You will need to do this for each file in turn giving each file a new name and picking the next model in the sequence to save.\n",
129+
"- It would be a **very** good idea to give your pdb files a consistent name e.g. myprotein_00.pdb for the first file then myprotein_01.pdb for the second etc. if they come from a group of related (MD or NMR) stuctures. This will make life much easier later!!\n",
130+
"\n",
131+
"If you are fortunate enough to have many more protein conformers, e.g. around 100, then you will need an automated method to protonate and/or align pdb files. This is possible within Chimera, but we haven't done it for you. However, for you to be lucky enough to have this amount of protein receptor dynamics information, then you have probably obtained this from an MD simulation. If this is the case, then the MD simulation software will have it's own facilties for performing the alignment, that are far more computationally efficient (which becomes increasingly important for large data sets). And of course your structures must already be chemically correct (e.g. protontated) for the simulation to have been peformed."
132+
]
133+
},
134+
{
135+
"cell_type": "code",
136+
"execution_count": null,
137+
"metadata": {},
138+
"outputs": [],
139+
"source": [
140+
"import sys\n",
141+
"import os\n",
142+
"from glob import glob"
143+
]
144+
},
145+
{
146+
"cell_type": "code",
147+
"execution_count": null,
148+
"metadata": {},
149+
"outputs": [],
150+
"source": [
151+
"#This defines our receptor structures (all of these files happen to have the same prefix, the starting structure (xal structure) is xxx_00.pdb)\n",
152+
"receptor_filenames = glob('../receptor/*.pdb')\n",
153+
"receptor_filenames.sort()\n",
154+
"print(receptor_filenames)\n",
155+
"print(\"Number of proteins is\", len(receptor_filenames))"
156+
]
157+
},
158+
{
159+
"cell_type": "markdown",
160+
"metadata": {},
161+
"source": [
162+
"## How to define and visualise your protein receptor binding site (the 'gridbox')\n",
163+
"We will use Chimera to help us define the position and size of the space on or within the protein structures into which we will dock our ligands:\n",
164+
"\n",
165+
"- First open one or more of your protein structures in Chimera using the File > Open menu\n",
166+
"- Then open the Tools > Surface/Binding Analysis > Autodock Vina menu\n",
167+
"- Tick the box 'Resize search volume using button 2' (this is the middle button of your mouse - change this using the dropdown menu if you have a minimalist mouse or a laptop trackpad!)\n",
168+
"- When you press the middle button of your mouse in the molecule display window you will see a green edged box appear.\n",
169+
"- You can rotate the protein using the left button of your mouse and resize the box using the middle button. To adjust the box size and position, place your cursor over the side of the box you wish to move and press the middle button of your mouse while you drag the box to make it bigger or smaller. **This might take some practice and a bit of trial and error!**\n",
170+
"- It may be helpful to show the protein in a surface representation as you do this so that you can check that the gridbox covers all of your binding site (you need to know where your binding site is!!)\n",
171+
"- Your gridbox should be large enough to cover your binding site (and a margin either side), but large box sizes will slow your calculations down (a lot!) and may result in ligands binding at multiple sites (which you might not want).\n",
172+
"- As you adjust the box size and position you will see that the numbers for the center and size of the gridbox will change in the Chimera Autodock Vina window.\n",
173+
"- It is a **good idea** to load in a few of your protein structures to check that your grid box covers the binding site in all of your protein conformers!\n",
174+
"- Once you are happy with your gridbox you can read off the numbers for the grid center (these are x, y and z coordinates) and the grid size (these are x, y and z dimensions in Å). These numbers should be inserted below e.g. the center_x number should be the first grid center value and the size_x value should be the first grid size number.\n",
175+
"- When you have done this you can execute the piece of code below!\n",
176+
"\n",
177+
"### What to do if you don't know where your binding site is\n",
178+
"You have a few options:\n",
179+
"\n",
180+
"- You could run a docking calculation using the whole protein by making your gridbox cover the entire volume of the protein (this could be very slow and result in poor sampling of the search space, but there is a version of Autodock Vina that is optimised for this type of calculation called qvina-w). This approach is called 'blind docking'.\n",
181+
"- You could use a webserver to identify cavities within your protein that may be potential ligand binding sites. For example FTMap (https://ftmap.bu.edu/login.php), is a web server that provides you with information on how a series of probe ligands are predicted to interact with your protein. The clusters of sites that the probes occupy can help you to identify potential binding sites on your protein. This will provide you with a pdb file that you can download and visualise using Chimera. You can then try to match your grid box position with the location of the probe ligand clusters.\n",
182+
"- You could use software to identify cavities within your protein that may be potential ligand binding sites. Examples include fpocket (https://github.com/Discngine/fpocket) a command line program, or CAVER (https://caver.cz/) a Pymol plugin. You will need to read the manuals, webpages and articles if you wish to use these approaches.\n",
183+
"- You could use the sites at which co-factors or substrates bind to your protein (e.g. ATP binding sites in molecular motors or kinase enzymes). You may be able to infer the location of substrate or ligand binding sites from bioinformatics, mutation studies or by analogy with related proteins."
184+
]
185+
},
186+
{
187+
"cell_type": "markdown",
188+
"metadata": {},
189+
"source": [
190+
"## Where to put your files\n",
191+
"Your aligned protein files should be in a folder called 'receptor' in the parent folder for all of your docking calculations for a particular protein (the parent folder is the one below this one!).\n",
192+
"The conf.txt file that we make in the next part will also be stored here."
193+
]
194+
},
195+
{
196+
"cell_type": "code",
197+
"execution_count": null,
198+
"metadata": {},
199+
"outputs": [],
200+
"source": [
201+
"#We write out our docking configuration file here - this is read by Autodock Vina and defines the gridbox and some other parameters\n",
202+
"#It is called conf.txt\n",
203+
"\n",
204+
"center_x = 7.3\n",
205+
"center_y = 17.7\n",
206+
"center_z = 1.5\n",
207+
"size_x = 15\n",
208+
"size_y = 17\n",
209+
"size_z = 17\n",
210+
"#Probably best not to play around with these unless you know what you are doing!\n",
211+
"energy_range = 4\n",
212+
"exhaustiveness = 20\n",
213+
"#Fixing the number of docked poses to 1 (num_modes = 1) will give us only the lowest energy docked conformation of each ligand in our output file\n",
214+
"num_modes = 1\n",
215+
"\n",
216+
"with open(\"../receptor/conf.txt\",'w') as contents:\n",
217+
" contents.write(\"center_x = \" + str(center_x) + '\\n' + \"center_y = \" + str(center_y) + '\\n' + \"center_z = \" + str(center_z) + '\\n' + '\\n' + \"size_x = \" + str(size_x) + '\\n' + \"size_y = \" + str(size_y) + '\\n' + \"size_z = \" + str(size_z) + '\\n' + '\\n' + \"energy_range = \" + str(energy_range) + '\\n' + \"exhaustiveness = \" + str(exhaustiveness) + '\\n' \"num_modes = \" + str(num_modes) + '\\n')"
218+
]
219+
},
220+
{
221+
"cell_type": "markdown",
222+
"metadata": {},
223+
"source": [
224+
"Your conf.txt file that contains the grid box information and a few other parameters will look like this:"
225+
]
226+
},
227+
{
228+
"cell_type": "code",
229+
"execution_count": null,
230+
"metadata": {
231+
"scrolled": true
232+
},
233+
"outputs": [],
234+
"source": [
235+
"with open(\"../receptor/conf.txt\", 'r') as f:\n",
236+
" for line in f:\n",
237+
" print(line)\n",
238+
"f.close()"
239+
]
240+
},
241+
{
242+
"cell_type": "markdown",
243+
"metadata": {},
244+
"source": [
245+
"The first part is finished. You are now ready to move on to Part 2, which is the biggest step in your journey!\n",
246+
"\n",
247+
"\"*And here I have found what I sought not indeed, but finding I would possess for ever. For it is above all gold and silver, and beyond all jewels. Neither rock, nor steel, nor the fires of Morgoth, nor all the powers of the Elf-kingdoms, shall keep from me the treasure that I desire.*\" J.R.R. Tolkien, The Silmarillion.\n",
248+
"\n",
249+
"It is very important to prepare carefully before any big adventure!\n",
250+
"\n",
251+
"Sarah and Geoff\n",
252+
"\n",
253+
"(an \"out-of-office studios\" $O^{3}S$ production)"
254+
]
255+
}
256+
],
257+
"metadata": {
258+
"kernelspec": {
259+
"display_name": "Python 3 (ipykernel)",
260+
"language": "python",
261+
"name": "python3"
262+
},
263+
"language_info": {
264+
"codemirror_mode": {
265+
"name": "ipython",
266+
"version": 3
267+
},
268+
"file_extension": ".py",
269+
"mimetype": "text/x-python",
270+
"name": "python",
271+
"nbconvert_exporter": "python",
272+
"pygments_lexer": "ipython3",
273+
"version": "3.10.16"
274+
}
275+
},
276+
"nbformat": 4,
277+
"nbformat_minor": 4
278+
}

0 commit comments

Comments
 (0)