19

Pymol Molecular Viewer: Pymol command language

  • Upload
    ailis

  • View
    105

  • Download
    0

Embed Size (px)

DESCRIPTION

Pymol Molecular Viewer: Pymol command language. most interaction with PyMOL is via a scripting language, not all functions are available from menus - PowerPoint PPT Presentation

Citation preview

Page 1: Pymol  Molecular Viewer: Pymol command language
Page 2: Pymol  Molecular Viewer: Pymol command language

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 non-protein 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

Page 3: Pymol  Molecular Viewer: Pymol command language

commonly used commands

more in PyMol docs @ http://www.pymolwiki.org/

Page 4: Pymol  Molecular Viewer: Pymol command language

download 1PD8, 1PD9 and 1PDB in PDB format load them into Pymol as objectslog_open log.pmlload 1PD8.pdb, terload 1PD9.pdb, biload 1PDB.pdb, apo

Alignment

align ter, apo align bi, apo

Pymol

Page 5: Pymol  Molecular Viewer: Pymol command language

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 cartoonalter 40-52/, ss='L' # assign residues 40-52 as loop alter 52-65/, ss='S' # assign residues 52-65 as sheet alter 65-72/, ss='H' # assign residues 65-72 as helix rebuild # regenerate the cartoon

Page 6: Pymol  Molecular Viewer: Pymol command language

download 1PD8, 1PD9 and 1PDB in PDB format load them into Pymol as objectslog_open log.pmlload 1PD8.pdb, terload 1PD9.pdb, biload 1PDB.pdb, apo

Alignment align ter, apo align bi, apo Alter Secondary structure alter (ter and (resi 59-60), ss='L' rebuild

Pymol

Page 7: Pymol  Molecular Viewer: Pymol command language

Object (ter, bi and apo) Show car, ter Select 1, resn ALA and name N # Select backbone 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

Page 8: Pymol  Molecular Viewer: Pymol command language

property short examplesymbol e. chemical symbol,select polar, symbol

o+nname n. atom names, select carbons, n.

ca+cb+cg+cdresn r. residue names, select aas, resn

asp+glu+asn+glnresi i. residue numbers, select mults10, resi

1+10+100+1000chain c. chain IDss - secondary structure type, select

allstrs, ss h+s+l+""

Page 9: Pymol  Molecular Viewer: Pymol command language

and, or, not etc. how would you select resid 27 and

resid 28?

property short examplenot s1 ! s1 atoms that are not included in s1and & atoms included in both s1 and s2 or | atoms included in either s1 or s2 in - s1 atoms whose name, resi, resn,

chain match s2 atomslike l. s1 atoms whose name, resi match s2

atoms

Page 10: Pymol  Molecular Viewer: Pymol command language

property short examples1 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 br. s1 Expands selection to complete residues select cmplt, byres near10

neighbor s1 nbr. s1 atoms directly bonded to s1select vic, nbr. resi 10

s1 extend X s1 ? X Extends s1 by X bonds connected to atom in s1select connect_x, near10 extend 3

Page 11: Pymol  Molecular Viewer: Pymol command language

# 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 equivalentselect (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)

Page 12: Pymol  Molecular Viewer: Pymol command language

select residue 301 in ter (name it CO4) show it as stick, zoom at it Save this selection as molecule in file co4-1.pdb

1. select CO4, (ter and resn CO4)2. show stick, CO43. Save co4-1.pdb, co44. load co4-1.pdb, co4 #create new co4 object5. Show surface, co46. show sticks, byres ((ter and ((resn CO4) x; 3.5)))

Pymol

Page 13: Pymol  Molecular Viewer: Pymol command language

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 timedisable, enable

1

Page 14: Pymol  Molecular Viewer: Pymol command language

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

Page 15: Pymol  Molecular Viewer: Pymol command language

# 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

Page 16: Pymol  Molecular Viewer: Pymol command language

1. h_add ter2. select HD, (elem n,o and (neighbor hydro))3. select HA, (elem o or (elem n and not

(neighbor hydro)))4. dist HBD, (co4 and HD), (ter and HA), 3.5

#distant name = (selection1), (selection2), cutoff distant (selections are in the same obj)

5. dist HBA, (co4 and HA), (ter and HB), 3.56. dist X, (ter and (resi 301 and name; C5')),

(ter and (resi 31 and name; CE2)), 4.5

Page 17: Pymol  Molecular Viewer: Pymol command language

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

Page 18: Pymol  Molecular Viewer: Pymol command language

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 aspymol aaa.pml

save the image•ray•png

Page 19: Pymol  Molecular Viewer: Pymol command language