PyMOL Info/Commands
Links
Manipulating the View
zoom
- Calculates a pseudo-optimal zoom
level for your molecule. This is based on the current view, so rotations
and other manipulations might cause the image to be clipped.
zoom complete=1
- ensures everything will fit in the view
full_screen on
- Go into full screen mode. Alternately,
full
full_screen off
- Get out of full screen mode
bg_color white
- Have fun with the background color
origin selection
or ctrl-shift-middleclick
- Change the origin of rotation
center
- centers the molecule in the frame
center selection
- center about a selection, useful in conjunction with
origin
- you can also use
cent
, and selection
can be a molecule name
set_color color_name, [ float, float, float ]
- Allows you to set your own custom colours beyond those that are predefined
- Standard RGB argument, except values are floats from 0.0 -> 1.0
Ray Tracing
ray
- This will ray trace the current scene for you
set ray_trace_frames=1
- This will turn on ray tracing for all frames in a movie. To turn it off, set it back to 0
set antialias=1
- Turn on antialiasing for ray tracing, makes things look much smoother and better
set orthoscopic=1
- This makes the OpenGL view and the raytraced view match up in space
set ray_trace_fog=0
- Supposedly better for light backgrounds, give it a whirl
Selecting Things
select selname, name x+y+z
- selects all atoms named x, y or z into the group "selname"
select selname, resn x
- selects all residues named x into the group "selname"
select selname, resi 5
- selects residue 5 into the group named "selname"
select selname, resi 7-10
- select a range of residues
select selname, resi 14+16+18
- select individual residues
select bases, name c2+c4+c5+c6+c8+n1+n2+n3+n4+n6+n7+n9+o2+o4+o6
- selects all the atoms of the 4 rna bases (except hydrogens) into the group "bases"
select backbone, name o1p+o2p+o3p+p+c1*+c2*+c3*+c4*+c5*+o2*+o3*+o4*+o5*
- selects all the atoms of the rna backbone (sugar and phosphate) into the group "backbone"
select sugar, name c1*+c2*+c3*+c4*+o2*+o4*
- selects all the atoms of the 4 rna bases (except hydrogens) into the group "bases"
Calculating, Fitting, etc
- Ctrl-Shift-Left Button to select the atom "lb" and Ctrl-Shift-Right Button to select the atom "rb"
dist
from the command prompt will give you the distance between them
- MacPymol uses different combinations to select atoms - try double-right-clicking on atoms
fit model1, model2
- Superimposes
model1
onto model2
and calculates the rmsd - only works if the models
have the exact same atom composition
pair_fit selection1, selection2
- Superimposes
selection1
onto selection2
and calculates the rmsd - this works on
the designated atoms subsets in a model, useful for comparing structures with different sequences, etc (ie
select only phosphate or C-alpha atoms)
Output
png filename
- simply outputs a png image of the current scene to the specified file
Movies
load structure.pdb, mov, x
- this loads
the file structure.pdb into the movie "mov", at frame/state x (where x is
a number >=1). It is not necessary to include x, by default
it will simply load into the next unused frame
mset 1 -30 -1 -45
- Specify the frames for the movie. The above command means the movie will display frames 1->30, then 29->1, then 2->45
mpng moviename
- this will output each frame of the movie as a png file with the base name "moviename" to the working directory
Scripts
@scriptname
- This will run a script from the specified directory
rnaview1.pymol
- Make your RNA look pretty, with colouring based on residue type. First load the RNA, then run this script.
- Uses a cartoon-style backbone
rnaview2.pymol
- Make your RNA look pretty, with colouring based on residue type. First load the RNA, then run this script.
- Uses sticks for the whole molecule
movieload.pymol
- Load a directory full of PDB files into a movie. You edit the first line to be the correct directory for your files.
Patrice-Style Representations
hide all
show cartoon
cartoon loop
- This
sets the cartoon type to "loop". If you want to use "tube" instead, then
you should use "cartoon_tube_radius" below as well
set cartoon_smooth_loops=0
- This allows the path of the cartoon to follow more or less the actual path of the backbone, and not be smoothed out
set cartoon_loop_radius=2.5
- Change this value to taste
set cartoon_loop_quality=100
- Make things prettier, to taste