Show Menu

Pymol_Basic Cheat Sheet (DRAFT) by

This is a draft cheat sheet. It is a work in progress and is not finished yet.

Set up

Set working directory
cd C:\Use­rs\...
Load pdb file from pdb website
fetch 1ubq
Load pdb file from local disk
load 1ubq.pdb

Log files

new log file
log_open file_n­ame.pml
save and quit log file
record the view coordinate
run a log as a script
resume log file = run then edit at the end
append log file = edit at the end without running


select select­­io­n­_­name, select­­io­n­_­ex­­pre­­ssion
select carbon­_beta, n. cb
select select­­io­n­_­na­me=­ (selection expres­­sion)
select carbon­_beta = (n; cb)
logical operator: and (/), not, or. !order of precedence --> use ()

Selection - single word

All atoms
No atoms
All hydrogen atoms
All atoms from HETATM record

Porperty selector identi­fiers

Atom by chemical symbol
ex: Oxygen = O
Atom/n­ucleic acid by code
ex: Cα = ca, Cβ = cb
Aa/nucleic acid by code
ex: Asparagine = asp / adenosine = a
residue identifier (1-9999)
PDB chain identifier (check in PDB file if letter or number ID)
Secondary structure:
α helix = 'H', β strand = "­S", Loop = 'L'
carbon α : first carbon bond to the side chain
carbon β : second carbon bond to the side chain

selection macros

start by "­/": start from the top of the hierarchie (objec­t-name)
end by "­/": start from the bottom of the hierarchie (name-id)
// :skip one level of hierarchie
ex: select lys, /helix­_al­pha­///lys
select all the residue of lysine from the object "­hel­ix_­alp­ha"


show the selection as this diplay type
show_as lines, select­ion­_name­ow_­as(­"­lin­es", "­sel­ect­ion­_na­me")
add this display type of the selection
show lines, select­ion­_name­ow(­"­lin­es", "­sel­ect­ion­_na­me")
hide this display type of the selection
hide lines, select­ion­_name
cmd.hi­de(­"­lin­es", "­sel­ect­ion­_na­me")
color the selection
coloc color_­name, select­ion­_name
zoom on the selection
zoom select­ion­_name
Show (S button) - Hide (H button) - Color (C button)
display type: lines, ribbon, cartoon, stick, label, nonbonded, mainchain, sidechain

Structure modifi­cation

adds hydrogens in the approp­riate places

get inform­ation

count the number of atome of the selection
count_­atoms select­ion­_name

selection algebra

Selects atoms that are not included in s1
not s1
! s1
Selects atoms included in both s1 and s2
s1 and s2
s1 & s2
Selects atoms included in either s1 or s2
s1 or s2
s1 | s2
Selects atoms in s1 whose identi­fiers name, resi, resn, chain and segi all match atoms in s2
s1 in s2
s1 in s2
Selects atoms in s1 whose identi­fiers name and resi match atoms in s2
s1 like s2
s1 l. s2
Selects all atoms whose van der Waals radii are separated from the van der Waals radii of s1 by a minimum of X Angstroms.
s1 gap X
s1 gap X
Selects atoms with centers within X Angstroms of the center of any atom in s1
s1 around X
s1 a. X
Expands s1 by all atoms within X Angstroms of the center of any atom in s1
s1 expand X
s1 e. X
Selects atoms in s1 that are within X Angstroms of the s2
s1 within X of s2
s1 w. X of s2
Expands selection to complete residues
byres s1
br. s1
Expands selection to complete objects
byobject s1
bo. s1
Selects atoms directly bonded to s1
neighbor s1
nbr. s1