Bold text means that these files and/or this information is provided.
Italicized text means that this material will NOT be conducted during the workshop
fixed width text means you should type the command into your terminal
If you want to try making files that already exist (e.g., input files), write them to a different directory! (mkdir my_dir)
In addition to following this sample docking problem, the user is encouraged to review the Rosetta user guide including the section on ligand-centric movers for use with RosettaScripts.
https://www.rosettacommons.org/docs/latest/
This small-molecule docking tutorial will go over how to prep and run small-molecule docking in Rosetta. For the remainder of this tutorial, the term "ligand" refers to small-molecules: in other words, this is not protein-protein docking.
Standard ligand docking: from your tutorial directory, cd into ligand_docking/1_vanilla_docking/
Determining the binding conformation of a small-molecule ligand within a pre-defined pocket.
The experimental data for this tutorial is derived from: Chien, E. Y. T. et al. Structure of the human dopamine D3 receptor in complex with a D2/D3 selective antagonist. Science 330, 1091-5 (2010).
This particular D3/eticlopride protein-ligand complex was used as a target in the GPCR Dock 2010 assessment, the results of which are discussed here: Kufareva, I. et al. Status of GPCR modeling and docking as reflected by community-wide GPCR Dock 2010 assessment. Structure 19, 1108-1126 (2011).
If you are interested in more information on the performance of Rosetta in modeling and docking D3/GPCRs in general, please consult Nguyen, E. D. et al. Assessment and challenges of ligand docking into comparative models of g-protein coupled receptors. PLoS One 8, (2013).
Dopamine is an essential neurotransmitter that exhibits its effects through five subtypes of dopamine receptors, important members of class A G-protein coupled receptors (GPCRs). Both subtype two (D2R) and subtype three (D3R) function via inhibition of adenylyl cyclase, and modulation of these two receptors has clinical applications in treating schizophrenia. However, the high degree of binding site conservation between D2R and D3R makes it difficult to generate pharmacological compounds that selectively bind to one but not the other. Today, we will examine how eticlopride, a D2R/D3R antagonist, binds to human D3R.
For the purposes of this exercise we will model a ligand / protein complex with a published structure, eticlopride bound to D3R (PDB: 3PBL), allowing us to compare our modeled poses with the native structure. For this tutorial we will use the crystal structure of DR3. Although, in reality it is more likely you will not have a published structure, and will have to create a comparative model for the protein (see the RosettaCM tutorial), but the steps in this tutorial will apply to both.
For this exercise, we will be preparing our input files in the protein_prep/ and ligand_prep/ folders. The modeling will be done in the docking/ folder. The scripts/ folder contains helpful ligand docking scripts that we will be using during this tutorial (you should never be copying files to or from this folder). All necessary files are also prepared in the answers/ directory in case you get stuck.
Navigate to the ligand docking directory where you will find the ligand_prep/, protein_prep/, docking/, and answers/ folders
cd ~/rosetta_workshop/tutorials/ligand_docking/1_vanilla_dockingChange into the protein_prep/ directory with the cd command
cd protein_prep The clean_pdb.py script will allow you to automatically download a PDB file and clean it of information other than the desired protein coordinates. The 'A' option tells the script to obtain chain A only. The full crystal structure consists of two monomers.
python2.7 ~/rosetta_workshop/rosetta/tools/protein_tools/scripts/clean_pdb.py 3PBL AThere are two output files generated by clean_pdb.py: 3PBL_A.pdb contains the single chain A of the protein structure and 3PBL_A.fasta contains the corresponding sequence. 3PBL_A.pdb is the receptor structure we will be using for docking, copy this file into the docking directory.
cp 3PBL_A.pdb ../docking
Note: This structure has a T4-lysozyme domain instead of the third cytoplasmic loop. The T4-lysozyme is a stabilizing feature to aid in crystallography. Normally, we would truncate this lysozyme segment and perform loop modeling (as discussed in the RosettaCM tutorial) to regenerate the intracellular loop. However in the interest of time, we will keep the lysozyme containing structure because the eticlopride binding site is far from the intracellular domain.
Next, we will prepare the ligand files. Most of these files are already prepared for you in the interest of time, but the steps are explained.
cd into the directory named ligand_prep/
cd ../ligand_prep In the directory, you will find a pair of already prepared files: eticlopride.sdf and eticlopride_conformers.sdf
Note: You can also find the ligand file from this particular PDB structure by going to the 3PBL page and scrolling down to the "Small Molecules" section. From there, you can click "Download SDF File" under the ETQ identifier.
eticlopride_conformers.sdf: This is a set of conformations for eticlopride generated outside of Rosetta. The downloaded ligand eticlopride.sdf file contains only the single conformation found in the PDB so we must expand the library to properly sample the conformational space. We also need to add hydrogen atoms to the model since they are not resolved in the crystal structure. Feel free to open the file in Pymol and use the arrow keys in the bottom right of the window to scroll through the different conformations:
pymol eticlopride_conformers.sdf
This particular conformational library was generated using the Meiler lab BioChemicalLibrary (BCL). The BCL is a suite of tools for protein modeling, small molecule calculations, and machine learning. If you are interested in licensing the BCL, please visit http://www.meilerlab.org/bclcommons or ask one of the instructors. The BCL conformer generator tool is described in "BCL::Conf: small molecule conformational sampling using a knowledge based rotamer library" (Kothiwale, Mendenhall, Meiler 2015) Other methods of ligand conformer generation include OpenEye, MOE and web-servers such as Frog 2.1 or DG-AMMOS. The generated libraries will differ depending on the chosen method.
Type
~/rosetta_workshop/rosetta/main/source/scripts/python/public/molfile_to_params.py -h
to learn more about the script for generating the params file.
Type the following ('\' simply means this is all typed on a single line)
~/rosetta_workshop/rosetta/main/source/scripts/python/public/molfile_to_params.py \
-n ETQ -p ETQ --conformers-in-one-file eticlopride_conformers.sdf
Note: You may encounter a warning about the number of atoms in the residue. This is okay as Rosetta is merely telling you that the ligand has more atoms than an amino acid.
Three total files will be generated: ETQ.params contains the necessary information for Rosetta to process the ligand, ETQ.pdb contains the first conformation, and ETQ_conformers.pdb contains the rest of the conformational library. I would highly suggest walking through one of these params files while looking at the corresponding PDB structure in a graphics program (Pymol, Chimera, MOE, your favorite).
If you use the tail command on ETQ.params, you will notice the PDB_ROTAMERS property line that tells Rosetta where to find the conformational library. Make sure this line has ETQ_conformers.pdb as the property.
tail ETQ.params Now that we have the necessary files for ligand docking, we can copy them over to the docking directory.
cp ETQ* ../dockingNow we want to make our final preparations in the docking directory.
Change to the docking/ directory
cd ../dockingConcatenate the ligand and protein pdb files together into one pdb file
cat 3PBL_A.pdb ETQ.pdb > 3PBL_A_ETQ.pdbOpen up our prepared pdb file to examine the receptor / ligand complex
pymol 3PBL_A_ETQ.pdbTip: 'all->A->preset->ligand sites->cartoon' will help you visualize the protein/ligand interface. The "Action" button is denoted by a single letter "A" in Pymol.
Since this is a rudimentary exercise, we will start with the ligand in the known protein binding site. In practical application, it is unlikely that we will know the exact location of the binding site. Therefore we may need to try multiple starting locations, defining a starting point using the StartFrom mover or manually place the ligand into an approximate region using Pymol.
Next we need to make sure we have the proper RosettaScripts XML file, input options file, and "crystal complex" (the correct answer for comparison) in our directory. These files are provided to you as dock.xml, options.txt, and crystal_complex.pdb
Run the docking study:
~/rosetta_workshop/rosetta/main/source/bin/rosetta_scripts.linuxgccrelease \
@options.txt -nstruct 5
This should take a few minutes at most, as we are using a reduced number of output structures. Feel free to generate more if you want, but we do provide an example of 500 models in the answers/docking/out/.
One other metric to keep an eye on is the Transform_accept_ratio. This is the fraction of Monte Carlo moves that were accepted during the low resolution Transform grid search. If this number is zero or very low, the search space may be too restrictive to allow for proper sampling AKA the binding pocket is too small for the ligand to fit into.
In benchmarking examples when we have a correct crystal structure, ligand_rms_no_super_X will give us the RMSD difference between our model ligand and the crystal structure ligand given in crystal_complex.pdb. This is an important metric when benchmarking how well your models correlate to reality. When the crystal structure is unknown, we can also calculate model RMSDs using the best scoring structure as the "true answer".
Use pymol to visually compare your best-scoring model and worse-scoring model with the crystal structure provided in crystal_complex.pdb. Best scoring models will have negative scores. The "all->A->preset->ligand sites->cartoon" setting in Pymol is ideal for visualizing interfaces. What interactions were successfully predicted by Rosetta?
The visualize_ligand.py script in the scripts directory is a useful shortcut for doing quick visualizations of protein-ligand interfaces. It takes in a PDB and generates a .pse Pymol session by applying common visualization settings. The example below shows the command lines for using this script on the 0001 model but you are free to try it on any one (or more!) of your models.
python ~/rosetta_workshop/tutorials/ligand_docking/1_vanilla_docking/scripts/visualize_ligand.py \
3PBL_A_ETQ_0001.pdb
pymol 3PBL_A_ETQ_0001.pseSince we generated such a small number of structures, it is unlikely to capture all the possible binding modes that you would expect to encounter in an actual docking run. In the 1_vanilla_docking/answers/docking/out/ directory, there are 500 models pre-generated using the exact same protocol. We will look at an example of how we can analyze this dataset.
cd into this directory
cd ~/rosetta_workshop/tutorials/ligand_docking/1_vanilla_docking/answers/docking/out/In addition to the 500 structures here, you will find the score.sc, a score_vs_rmsd.csv file, a rmsds_to_best_model.data, and several .png image files.
score.sc: summary score file for the 500 structures as outputted by Rosetta
score_vs_rmsd.csv: a comma separated file with the filename in the first column, total_score for the complex in the second column, the interface score in the third column, and ligand RMSD to the native structure in the fourth column.
These values are generated directly from the scorefile using the interface_delta_X score and the ligand_rms_no_super_X columns. This can be done with awk commands, but we provided extract_scores.bash script to do this. This is a very specific script made for extracting useful information in ligand docking experiments. However, the script can be easily customized for extracting other information from Rosetta score files. If you have any in-depth questions about how it works or how to modify it, feel free to ask. To see how it in action, run:
~/rosetta_workshop/tutorials/ligand_docking/1_vanilla_docking/scripts/extract_scores.bash \
score.sc
To determine the best scoring output model, we sort the output scorefile by interface_delta_X (column 48 in ./out/score.sc) and use the model with the lowest score. In the pre-generated outputs here, it is 3PBL_A_ETQ_0211.pdb model, but is easy to check with simple awk commands. The line below sorts by column number corresponding to interface_delta_X score, prints out the interface score and the model ID, head prints the top 10 lines of the output. You should have 3PBL_A_ETQ_0211.pdb as the best scoring model.
cd ../ # should be ligand_docking/1_vanilla_docking/answers/docking/
sort -nk 48 ./out/score.sc | awk '{print $48,$NF}' | head
Using the best scoring model as our new 'native', we want to calculate the RMSD to this. We will use a Rosetta Script similar to the docking to do this only replacing the native structurein the XML.
Another convenient way to specify inputs is to point to a file containing a list of all the models you want to run. On the command line, this is run with a -in:file:l in the options file.
ls out/3PBL_A_ETQ_*pdb > listof_outputs
~/rosetta_workshop/rosetta/main/source/bin/rosetta_scripts.linuxgccrelease \
@ calculate_rmsd_to_best_model.options
We now have the rmsd_to_best_model.sc file and want to get the score vs. rmsd similar to above located in the out/ directory.
cd out/
The script produces the rmsd_to_best_model.sc file that you can open in any text editor. Feel free to ask questions if you would like to discuss more of how to customize this script for your own applications. Now go back to the pre-generated model directory:
~/rosetta_workshop/tutorials/ligand_docking/1_vanilla_docking/scripts/extract_scores.bash \
rmsd_to_best_model.sc
In this case, we have the correct answer based on the crystal structure so we can examine a score vs rmsd plot to see if the better scoring models are indeed closer to the native ligand binding mode. Open up the plot with the following command:
gthumb score_vs_crystal_rmsd_plot.png
If gthumb command is not found on your local workstation, try using the following:
open score_vs_crystal_rmsd_plot.png
eog score_vs_crystal_rmsd_plot.png
On the X-axis you will see the ligand RMSD to the ligand in the crystal structure. On the Y-axis you will see the interface delta X score in Rosetta Energy Units. Notice the general correlation between RMSD and Rosetta Score, with a large cluster of highly accurate and low scoring models in the lower left hand corner.
In practical applications, we would not have the crystal structure for comparison. However, we can treat the best scoring model as the native model and see if we generate a similar funnel. This is one application of how we might use the calculate_ligand_rmsd.py script discussed earlier. Once we identify a desired "best model", we can run the script to generate the rmsds_to_best_model.data. Some scripting may be required to put the information from multiple files together, depending on which software package you choose to graph with. To identify the best scoring model for this example, I selected the top 200 models based on the best overall score and then identified the best model by interface score. The best model for these plots is 3PBL_A_ETQ_0347.pdb. Open up the first plot with:
gthumb score_vs_low_rmsd_plot.png
If gthumb command is not found on your local workstation, try using the following:
open score_vs_low_rmsd_plot.png
eog score_vs_low_rmsd_plot.png
Again, we see a cluster of good scoring models near the best scoring model with a general downward trend further away. We can zoom in on the cluster in the lower left hand corner to get an even better picture.
gthumb score_vs_low_rmsd_zoom_plot.png
open score_vs_low_rmsd_zoom_plot.png
eog score_vs_low_rmsd_zoom_plot.png
We see the same overall trend in this cluster, suggesting that the top scoring models in this run are likely to be good predictors of the true ligand binding position.
Finally, and very importantly, take look at some structures. To sort the CSV file by interface score and take the top twenty, type:
sort -t, -nk3 score_vs_rmsd.csv | head -n 20
These should all be very low RMSD models. To compare a certain structure to the native in Pymol, use:
pymol 3PBL_A_ETQ_0211.pdb ../crystal_complex.pdb
I used 3PBL_A_ETQ_0211.pdb as the sample structure because it is one of the best scoring models, but feel free to examine any model you like. Do not forget the ligand site preset mode for visualizing interfaces or use the visualize_ligand.py script to generate pymol sessions. If you like, we can also look at some of the poor scoring models to see exactly what went wrong. To find the top 20 worse models by interface score:
sort -t, -nk3 score_vs_rmsd.csv | tail -n 20
3PBL_A_ETQ_0424.pdb should come up as a poor scoring, high RMSD structure. When we open it up in Pymol, we can see that the ligand binding direction is flipped 180 degrees compared to the native position. This can happen when there is an extended binding pocket, but in this case, the Rosetta score was able to discern the difference between these models.
pymol 3PBL_A_ETQ_0424.pdb ../crystal_complex.pdbCongratulations, you have performed RosettaLigand docking study! Now use your docked models to generate hypotheses and test them in the wet lab!