Transcript Slide 1
most interaction with PyMOL is via a scripting language, not all functions are available from menus keyword followed optionally by one or more comma-separated arguments, e.g. color red, hetatm – colors all nonprotein atoms red, color red – all atoms are red in most cases 1st argument is specific to command used, while the 2nd argument is the name of the object/selection, e.g. show spheres, resi 1 commonly used commands more in PyMol docs @ http://www.pymolwiki.org/ Pymol download 1PD8, 1PD9 and 1PDB in PDB format load them into Pymol as objects log_open log.pml load 1PD8.pdb, ter load 1PD9.pdb, bi load 1PDB.pdb, apo Alignment align ter, apo align bi, apo - PDB files having ss from programs like DSSP PyMOL has reasonably fast ss assignment using dss selection To change assignments manually, the best way is to use the alter command as follows: show cartoon alter 40-52/, ss='L' alter 52-65/, ss='S' alter 65-72/, ss='H' rebuild # regenerate # assign residues 40-52 as loop # assign residues 52-65 as sheet # assign residues 65-72 as helix the cartoon Pymol download 1PD8, 1PD9 and 1PDB in PDB format load them into Pymol as objects log_open log.pml load 1PD8.pdb, ter load 1PD9.pdb, bi load 1PDB.pdb, apo Alignment align ter, apo align bi, apo Alter Secondary structure alter (ter and (resi 59-60), ss='L' rebuild Object (ter, bi and apo) Show car, ter Select 1, resn ALA # Select backbone and name N nitrogens from alanine residues Show spheres, 1 Select 2, resi 1:20 #select residues 1-20 Show sticks, 2 select 3, elem O and not name OH # Select all oxygen atoms except hydroxyls property symbol short example chemical symbol,select polar, symbol e. o+n name n. atom names, select carbons, n. ca+cb+cg+cd resn r. residue names, select aas, resn asp+glu+asn+gln resi i. residue numbers, select mults10, resi 1+10+100+1000 chain ss c. - chain ID secondary structure type, select allstrs, ss h+s+l+"" and, or, not etc. how would you select resid 27 and resid 28? property short example not s1 and or ! s1 & | atoms that are not included in s1 atoms included in both s1 and s2 atoms included in either s1 or s2 in - s1 atoms whose name, resi, resn, chain match s2 atoms like l. s1 atoms whose name, resi match s2 atoms property short example s1 around X s1 a. X atoms with centers within X Angstroms of the center of any atom in s1 select near10, resi 10 around 5 s1 expand X s1 e. X Expands s1 by all atoms within X Angstroms of the center of any atom in s1 select near10x, near10 expand 3 s1 within X of s2 s1 w. X of s2 Selects atoms in s1 that are within X Angstroms of the s2 byres s1 Expands selection to complete residues br. s1 select cmplt, byres near10 neighbor s1 nbr. s1 atoms directly bonded to s1 select vic, nbr. resi 10 s1 extend X s1 ? X Extends s1 by X bonds connected to atom in s1 select connect_x, near10 extend 3 # selects atoms that are part of chain a, but not # residue number 125. select chain a and (not resi 125) # The following two selections are equivalent select (name cb or name cg1 or name cg2) and chain A select name cb+cg1+cg2 and chain A # PyMOL will expand its logical selection out # from the innermost parentheses byres ((chain a or (chain b and (not resi 125))) around 5) 1. 2. 3. 4. 5. 6. select residue 301 in ter (name it CO4) Pymol show it as stick, zoom at it Save this selection as molecule in file co4-1.pdb select CO4, (ter and resn CO4) show stick, CO4 Save co4-1.pdb, co4 load co4-1.pdb, co4 #create new co4 object Show surface, co4 show sticks, byres ((ter and ((resn CO4) x; 3.5))) PyMOL creates an object-name to locate data when you load a data file. Making selections is a way of pointing to a subset of that data. Selections are in parentheses in control panel. When you delete a selection-name, the data are still found under the object-name, but the data are no longer organized as the selection. In contrast, after you delete an object, you must reload the data to have access to it again. delete PyMOL can hold several objects at the same time disable, enable 1 Named selections are static. Only atoms that exist at the time the selection is defined are included in the selection, even if atoms which are loaded subsequently fall within the selection criterion 2 # EXAMPLE 1: Show hydrogen bonds between protein # and ligands (which must have hydrogens) load 1PD8.pdb,ter CO4 as a ligand h_add ter select don, (elem n,o and (neighbor hydro)) select acc, (elem o or (elem n and not (neighbor hydro))) dist HBA, (co4 and acc),(ter and don), 3.2 dist HBD, (co4 and don),(ter and acc), 3.2 delete don delete acc hide (hydro) hide labels,HBA hide labels,HBD 1. 2. 3. 4. 5. 6. h_add ter select HD, (elem n,o and (neighbor hydro)) select HA, (elem o or (elem n and not (neighbor hydro))) dist HBD, (co4 and HD), (ter and HA), 3.5 #distant name = (selection1), (selection2), cutoff distant (selections are in the same obj) dist HBA, (co4 and HA), (ter and HB), 3.5 dist X, (ter and (resi 301 and name; C5')), (ter and (resi 31 and name; CE2)), 4.5 bg white set bg_rgb, [120, 12, 30] set dash_width, 5 set dash_radius, 10 label (resi 301 and name; o3'), "CO4" label (resi 31 and name; CA), “Phe31” set label_font_id, 10 set label_color, red PyMOL script – text file with commands, each at one line *.pml useful feature: get_view command run script from PyMOL: @log.pml or from command line as pymol aaa.pml save the image •ray •png