├── PETase.pml └── README.md /PETase.pml: -------------------------------------------------------------------------------- 1 | # PETase enzyme, PDB: 6ANE, DOI:1016/j.bpj.2018.02.005 2 | # To load this script in pyMol: @path/to/PETase.pml 3 | 4 | # @C:\Master\Biochemistry\Seminar\PETase-seminar\petase-6ane.pml 5 | 6 | reinit 7 | 8 | fetch 6ane, async=0 9 | 10 | remove solvent 11 | 12 | select cb, chain B 13 | extract cb2, cb 14 | remove (not cb2) 15 | 16 | color grey60, all 17 | color orange, ss s 18 | color cyan, ss h 19 | center cb2 20 | zoom center, 25 21 | 22 | select disulfur, resn cys 23 | show sticks, disulfur 24 | color yellow, disulfur 25 | 26 | select active_site, resi 133+210+179+181 27 | show sticks, active_site 28 | color red, active_site and name o* # color all oxygens red 29 | color blue, active_site and name n* # color all nitrogens blue 30 | color white, active_site and name c* # color the backbone white 31 | color gray, /cb2/B/B/ILE`181 and name c* 32 | 33 | set_view (\ 34 | 0.864366233, -0.441162348, 0.241324633,\ 35 | 0.264376014, 0.806920886, 0.528186977,\ 36 | -0.427746534, -0.392746031, 0.814107955,\ 37 | 0.000309704, 0.000068523, -153.611953735,\ 38 | -22.551441193, -60.176387787, 7.473945141,\ 39 | 127.907264709, 175.507461548, -20.000000000 ) 40 | 41 | scene main, store 42 | set scene_buttons, 1 43 | 44 | set_view (\ 45 | -0.900617003, 0.152062714, 0.407130867,\ 46 | 0.026284888, 0.954131782, -0.298224062,\ 47 | -0.433805972, -0.257884443, -0.863305032,\ 48 | -0.000168642, 0.000421539, -141.283905029,\ 49 | -18.818548203, -59.395500183, 8.551980019,\ 50 | 124.326545715, 162.127166748, -20.000000000 ) 51 | 52 | scene behind, store 53 | set scene_buttons, 2 54 | 55 | set_view (\ 56 | 0.846338809, -0.319467604, -0.426192343,\ 57 | 0.372464001, -0.217008650, 0.902313471,\ 58 | -0.380749285, -0.922406256, -0.064672224,\ 59 | 0.000586160, 0.000082206, -58.367843628,\ 60 | -22.139692307, -57.820175171, 18.346393585,\ 61 | 34.214847565, 80.315002441, -20.000000000 ) 62 | 63 | scene top, store 64 | set scene_buttons, 3 65 | 66 | set_view (\ 67 | -0.970464230, 0.222098544, -0.094116926,\ 68 | 0.106157504, 0.743596911, 0.660138130,\ 69 | 0.216601789, 0.630651116, -0.745216787,\ 70 | -0.000372091, 0.000405911, -49.356021881,\ 71 | -27.043807983, -46.735347748, 21.098249435,\ 72 | 40.517169952, 70.649299622, -20.000000000 ) 73 | 74 | scene active_site1, store 75 | set scene_buttons, 4 76 | 77 | set_view (\ 78 | 0.211347789, 0.111788981, 0.970991254,\ 79 | -0.642921507, 0.764161468, 0.051962562,\ 80 | -0.736188591, -0.635257661, 0.233375162,\ 81 | -0.000215679, 0.000520362, -50.970176697,\ 82 | -29.169898987, -46.358890533, 18.876108170,\ 83 | 42.134197235, 67.566360474, -20.000000000 ) 84 | 85 | scene active_site2, store 86 | set scene_buttons, 5 87 | 88 | # Movie 89 | 90 | # It creates a movie from the selected scenes 91 | 92 | mset 1x1000 # 30 fps x 30 seconds 93 | 94 | mview store, 1, scene=main 95 | mview store, 250, scene=behind 96 | mview store, 450, scene=top 97 | mview store, 750, scene=active_site1 98 | mview store, 900, scene=active_site2 99 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # pyMol Cookbook 2 | 3 | pyMol cookbook and quick notes by **Matteo Paolieri** for Protein Crystallography course at the University of Cologne, MS Chemistry, January 2021. 4 | 5 | ## License 6 | 7 | [![CC BY 4.0][cc-by-shield]][cc-by] 8 | 9 | This work is licensed under a [Creative Commons Attribution 4.0 International License][cc-by]: _you must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use._ 10 | 11 | [cc-by]: http://creativecommons.org/licenses/by/4.0/ 12 | [cc-by-shield]: https://img.shields.io/badge/License-CC%20BY%204.0-lightgrey.svg 13 | 14 | ## Table of Contents 15 | * [License](#license) 16 | * [Misc](#misc) 17 | * [Distances](#distances) 18 | * [Coloring](#coloring) 19 | * [Movies and scenes](#movies-and-scenes) 20 | * [Rendering](#rendering) 21 | * [Useful selections](#useful-selections) 22 | * [Protein stability](#protein-stability) 23 | * [Example](#example) 24 | * [Resources](#resources) 25 | 26 | ## Misc 27 | 28 | `@path/to/file` load the script (plain text) 29 | 30 | `reinit` clear and delete everything 31 | 32 | `fetch 6ane, async=0` download the pdb and wait 33 | 34 | `fetch 1w2i, type=2fofc, async=0` download the 2fofc electron density map 35 | 36 | `get_symmetry object-name-or-selection` gives you a tuple of 7 elements: (a,b,c), (α,β,γ) and space group name as e.g. "P212121" 37 | 38 | [Supercell](https://pymolwiki.org/index.php/Supercell) can display multiple copies of the unit cell. 39 | 40 | --- 41 | 42 | `isomesh mesh1, 1w2i_2fofc, 1.0, active_site, carve=1.6` show electron density map. 43 | 44 | `mesh` is just a name you give. 45 | 46 | `isomesh var_name, ED_data, map_scale, what-residue-put-here, carving` carve cuts out the stuff not related to your active site 47 | 48 | --- 49 | 50 | `set surface_color, gray70` 51 | 52 | `set seq_view, 1` to turn the sequence viewer on. 53 | 54 | `remove solvent` remove solvent (water molecules) 55 | 56 | `remove Foo` remove one selection 57 | 58 | `copy target`, source copy one selection 59 | 60 | `hide everything, (chain B)` hide chain B. 61 | 62 | `hide all` 63 | 64 | `extract Foo, chain A+B+E+F+G` extract the selected chains and call the group `Foo` 65 | 66 | Select every beta sheet *beside* B and A. 67 | 68 | ``` 69 | select Asp385, resi 385 70 | show sticks , Asp385 71 | ``` 72 | 73 | show sticks, br. Foo show Foo as sticks (`br` is by residue). 74 | 75 | Select Asp385 and show it as sticks. 76 | 77 | ## Distances 78 | 79 | One way to measure distances: `Wizard->measure distance` 80 | 81 | Also, you can click on an object, and get e.g. ``#/1w2i/C/A/FMT`1092/C``, so you can say "measure the distance from the residue 2". `mode=2` is the polar mode. 82 | 83 | ``` 84 | dist polar1, resi 1092, resi 20, mode=2 85 | ``` 86 | 87 | 88 | ### Coloring 89 | 90 | Select a chain, color it as cyan and then show it as sticks. 91 | 92 | ``` 93 | select sheetC, (not sheetB) and (not sheetA) and ss s 94 | color purple, sheetC 95 | ``` 96 | 97 | `util.cbc(selection='(all)',first_color=7,quiet=1,legacy=0,_self=cmd)` color all by chains, to see what chains you have 98 | 99 | `color white, all` color everything white 100 | 101 | `color grey70` is a good color 102 | 103 | `color grey, ss h #h` color all alpha helix 104 | 105 | `color purple, ss s #s` color all beta sheets 106 | 107 | ``` 108 | select cpE, chain E 109 | color cyan, cpE 110 | show sticks, cpE 111 | ``` 112 | 113 | You can also click on an obect, see its code and color only it by using that specific path. 114 | 115 | ``` 116 | color gray70, all 117 | color blue, /ca/A/A/TRP`158 # color blue just the W158 in chain A 118 | ``` 119 | 120 | 121 | ### Movies and scenes 122 | 123 | ``` 124 | # Set a scene (maybe after a "set_view"...) 125 | 126 | scene electron_density, store 127 | set scene_buttons, 1 128 | 129 | # Movie 130 | 131 | # It creates a movie from the selected scenes 132 | 133 | mset 1x1000 # 30 fps x 33 seconds 134 | 135 | mview store, 1, scene=main 136 | mview store, 250, scene=behind 137 | mview store, 450, scene=top 138 | mview store, 750, scene=active_site1 139 | mview store, 900, scene=active_site2 140 | ``` 141 | 142 | To export a movie: `File > Export Movie As...` 143 | 144 | ### Rendering 145 | 146 | `ray 1920,1080` renders current view in FullHD 147 | 148 | ### Useful selections 149 | 150 | ``` 151 | # Select Asp385 and color atoms accordingly 152 | 153 | select Asp385, resi 385 154 | show sticks , Asp385 155 | 156 | select aspzoom, Asp385 expand 5 # select stuff around Asp385 157 | color red, aspzoom and name o* # color all oxygens red 158 | color blue, aspzoom and name n* # color all nitrogens blue 159 | color white, aspzoom and name c* # color the backbone white 160 | center aspzoom 161 | zoom center, 25 162 | ``` 163 | 164 | ### Protein stability 165 | 166 | Main things to check for protein stability: 167 | 168 | - Hydrophobic core (show as spheres; apolar AA) 169 | - Salt bridges 170 | - Disulfide bridges 171 | 172 | In general: 173 | 174 | **Salt bridge** (ionic bond): 175 | * AA Acids: Asp+Glu 176 | * AA Basics: Arg+Lys 177 | 178 | ``` 179 | select basic, resn arg+lys 180 | select acid, resn asp+glu 181 | 182 | show sticks, basic 183 | show sticks, acid 184 | 185 | color red, basic and name o* 186 | color blue, basic and name n* 187 | color pink, basic and name c* 188 | 189 | color red, acid and name o* 190 | color blue, acid and name n* 191 | color pink, acid and name c* 192 | 193 | dist name, basic, acid, mode=2 194 | ``` 195 | 196 | **π-π interaction** (weak) 197 | 198 | ``` 199 | select aromatics, (resn phe+tyr+trp+his) 200 | show sticks, aromatics 201 | color pink, aromatics 202 | ``` 203 | 204 | **Solvent interaction** 205 | 206 | ``` 207 | show spheres, solvent # or sticks, etc... 208 | ``` 209 | 210 | **Disulfide bonds** 211 | 212 | ``` 213 | # We have R-S-S-R'. Cys can make them. 214 | 215 | select disulfur, resn cys 216 | show sticks, disulfur 217 | color yellow, disulfur 218 | ``` 219 | 220 | **Dipole interactions** 221 | 222 | It is an interaction between aromatics (Trp, Tyr, Phe) and (Arg, Lys) 223 | 224 | ``` 225 | select aromatics, resn tyr+trp+phe 226 | select arglys, resn arg+lys 227 | color pink, aromatics 228 | 229 | show sticks, aromatics 230 | show sticks, arglys 231 | 232 | color red, arglys and name o* 233 | color blue, arglys and name n* 234 | color pink, arglys and name c* 235 | 236 | color red, aromatics and name o* 237 | color blue, aromatics and name n* 238 | color pink, aromatics and name c* 239 | 240 | dist name, arglys, aromatics, mode=2 241 | ``` 242 | 243 | **Hydrophobics** 244 | 245 | ``` 246 | # Tom Stout, 08/05/2004 247 | # https://pymolwiki.org/index.php/Show_hydrophobics 248 | 249 | show cartoon, all 250 | color gray, all 251 | 252 | select hydrophobes,(resn ala+gly+val+ile+leu+phe+met) 253 | show sticks, (hydrophobes and (!name c+n+o)) 254 | color orange,hydrophobes 255 | disable hydrophobes 256 | set cartoon_smooth_loops,0 257 | ``` 258 | 259 | ## Example 260 | 261 | [Here](PETase.pml) you can find an example (PETase enzyme) that summarize many useful commands reported here. Just import in pyMol (`@path/to/script.pml`) and see it. 262 | 263 | ## Resources 264 | 265 | * [PyMol wiki](https://pymolwiki.org/index.php/Main_Page) 266 | 267 | 268 | 269 | 270 | 271 | --------------------------------------------------------------------------------