Skip to main content
424 commands, introspected from a live PyMOL. Call them through @tenmol/client — e.g. await cmd.color("red", "chainA").

cmd.LockCM

cmd.SafeEvalNS

cmd.Shortcut

cmd.abort

“abort” abruptly terminates execution of the PyMOL command script without executing any additional commands. See also: embed, skip, python

cmd.accept

“accept” is an internal method for handling of session file security.

cmd.add_bond

API-only function to add a bond by atom indices (1-based, same as “index” in cmd.iterate()). To add bonds by atom selection, use cmd.bond() See also: cmd.get_bonds()

cmd.align

“align” performs a sequence alignment followed by a structural superposition, and then carries out zero or more cycles of refinement in order to reject structural outliers found during the fit. “align” does a good job on proteins with decent sequence similarity (identity >30%). For comparing proteins with lower sequence identity, the “super” and “cealign” commands perform better. See also: super, cealign, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur

cmd.alignto

“alignto” aligns all other loaded objects to the target using the specified alignment algorithm. This is a wrapper for “extra_fit”. See also: extra_fit, align, super, cealign, fit, rms, rms_cur, intra_fit

cmd.alphatoall

Expand any given property of the CA atoms to all atoms in the residue

cmd.alter

“alter” changes atomic properties using an expression evaluated within a temporary namespace for each atom. See also: alter_state, iterate, iterate_state, sort

cmd.alter_list

“alter_list” is an unsupported feature.

cmd.alter_state

“alter_state” changes atom coordinates and flags over a particular state and selection using the Python evaluator with a temporary namespace for each atomic coordinate. See also: iterate_state, alter, iterate

cmd.angle

“angle” shows the angle formed between any three atoms. See also: distance, dihedral

cmd.api

API helper function. Get the full function name (incl. module) of given command.

cmd.as_pathstr

cmd.assign_stereo

Assign “stereo” atom property (R/S stereochemistry). Requires either a Schrodinger Suite installation (SCHRODINGER environment variable set) or RDKit (rdkit Python module).

cmd.async_

Run function threaded and show “please wait…” message.

cmd.attach

“attach” adds a single atom on to the picked atom.

cmd.auto_measure

cmd.backward

“backward” moves the movie back one frame. See also: mset, forward, rewind

cmd.bg_color

“bg_color” sets the background color. See also: set_color, ray

cmd.bg_colour

“bg_color” sets the background color. See also: set_color, ray

cmd.block_flush

cmd.bond

“bond” creates a new bond between two selections, each of which should contain one atom. See also: unbond, fuse, attach, replace, remove_picked

cmd.button

“button” can be used to redefine what the mouse buttons do. See also: config_mouse

cmd.cache

“cache” manages storage of precomputed results, such as molecular surfaces.

cmd.callout

Create a new screen-stabilized callout object.

cmd.capture

cmd.cartoon

“cartoon” changes the default cartoon representation for a set of atoms.

cmd.cd

“cd” changes the current working directory. See also: pwd, ls, system

cmd.cealign

“cealign” aligns two proteins using the CE algorithm. See also: align, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur, super

cmd.center

“center” translates the window, the clipping slab, and the origin to a point centered within the atom selection. See also: origin, orient, zoom

cmd.centerofmass

Calculates the center of mass. Considers atom mass and occupancy. See also: get_extent

cmd.check

“check” is unsupported command that may eventually have something to do with assigning forcefield parameters to a selection of atoms.

cmd.clean

Run energy minimization on the given selection, using an MMFF94 force field.

cmd.clip

“clip” alters the positions of the clipping planes. See also: zoom, orient, reset

cmd.cls

“cls” clears the output buffer.

cmd.color

“color” changes the color of objects or atoms. See also: color_deep, set_color, recolor

cmd.color_deep

Unset all object and atom level (not global) color settings and apply given color. See also: color, unset_deep

cmd.colour

“color” changes the color of objects or atoms. See also: color_deep, set_color, recolor

cmd.commands

cmd.config_mouse

“config_mouse” sets the current mouse configuration ring. See also: mouse, button

cmd.contour_sc

cmd.copy

“copy” creates a new object that is an identical copy of an existing object. See also: create

cmd.copy_image

cmd.copy_to

Copies selection to object name (all states) and by default renames chain, segi and ID identifiers to avoid naming conflicts. See also: create, fuse

cmd.count_atoms

“count_atoms” returns a count of atoms in a selection.

cmd.count_discrete

Count the number of discrete objects in selection.

cmd.count_frames

“count_frames” returns the number of frames defined for the PyMOL movie. See also: frame, count_states

cmd.count_states

“count_states” returns the number of states in the selection. See also: frame

cmd.create

“create” creates a new molecule object from a selection. It can also be used to create states in an existing object. See also: load, copy, extract

cmd.curve_new

“curve_new” creates a new curve object.

cmd.cycle_valence

“cycle_valence” cycles the valence on the currently selected bond. See also: remove_picked, attach, replace, fuse, h_fill

cmd.decline

“decline” is an internal method for handling of session file security.

cmd.del_colorection

cmd.delete

“delete” removes objects and named selections See also: remove, delete_states

cmd.delete_states

See also: delete

cmd.deprotect

“deprotect” reverses the effect of the “protect” command. See also: protect, mask, unmask, mouse, editing

cmd.desaturate

Desaturate the colors in the given selection.

cmd.deselect

“deselect” disables any and all visible selections

cmd.dihedral

“dihedral” shows dihedral angles formed between any four atoms. See also: distance, angle

cmd.dirty

cmd.dirty_wizard

cmd.disable

“disable” turns off display of one or more objects and/or selections. See also: show, hide, enable

cmd.dist

“distance” creates a new distance object between two selections.

cmd.distance

“distance” creates a new distance object between two selections.

cmd.download_chem_comp

cmd.drag

“drag” activates dragging for a selection, enabling the user to manipulate the atom coordinates of the atoms using mouse controls similar to those for controlling the camera.

cmd.draw

“draw” creates an OpenGL-based image of the current frame. See also: ray, png, save

cmd.dss

“dss” defines secondary structure based on backbone geometry and hydrogen bonding patterns.

cmd.dump

The dump command writes the geometry of an isosurface, isomesh, isodot, or map object to a simple text file. Each line contains one vertex in case of representations, or one grid point in case of a map. For surface objects, XYZ coordinates and the normal are exported. Three lines make one triangle (like GL_TRIANGLES). For mesh objects, XYZ coordinates are exported (no normals). The vertices form line strips (like GL_LINE_STRIP), a blank line starts a new strip. See also: COLLADA export

cmd.edit

“edit” picks atoms or a bond for editing. See also: unpick, remove_picked, cycle_valence, torsion

cmd.edit_mode

“edit_mode” switches the mouse into editing mode, if such a mode is available in the current mouse ring.

cmd.editing_ring

Helper function for copy/cut/paste of molecular selections.

cmd.enable

“enable” turns on display of one or more objects and/or selections. See also: show, hide, disable

cmd.ending

“ending” goes to the end of the movie.

cmd.exp_path

cmd.extendaa

API-only function to decorate a function as a PyMOL command with argument auto-completion.

cmd.extra_fit

Like “intra_fit”, but for multiple objects instead of multiple states. See also: align, super, cealign, intra_fit, util.mass_align

cmd.extract

“extract” is simply a shorthand way calling the “create” command with the extract argument activated, so that atoms in the new object are removed from the source object. See also: create

cmd.fab

Build a peptide

cmd.fast_minimize

“fast_minimize” is an unsupported nonfunctional command that may eventually have something to do with doing a quick clean up of the molecular structure.

cmd.fb_action

cmd.fb_mask

cmd.fb_module

cmd.feedback

“feedback” changes the amount of information output by pymol.

cmd.fetch

“fetch” downloads a file from the internet (if possible)

cmd.file_read

cmd.filename_to_objectname

cmd.find_pairs

API only function. Returns a list of atom pairs. Atoms are represented as (model,index) tuples. Can be restricted to hydrogen-bonding-like contacts. WARNING: Only checks atom orientation, not atom type (so would hydrogen bond between carbons for example), so make sure to provide appropriate atom selections.

cmd.finish_object

“finish_object” is used in cases where many individual states are being loaded and it is advantageos to avoid processing them until all states have been loaded into RAM. This function should always be called after loading an object with the finish flag set to zero.

cmd.fit

“fit” superimposes the model in the first selection on to the model in the second selection. Only matching atoms in both selections will be used for the fit. See also: align, super, pair_fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur

cmd.fix_chemistry

“fix chemistry” is an unsupported feature.

cmd.flag

“flag” sets the indicated flag for atoms in the selection and clears the indicated flag for atoms not in the selection.

cmd.fnab

Builds a nucleotide acid from sequence Fragments provided by: Lu, Xiang-Jun, Olson, Wilma K. 3DNA: a software package for the analysis, rebuilding and visualization of three-dimensional nucleic acid structures, Nucleic Acids Research, 32, W667-W675 (2004).

cmd.focal_blur

Creates fancy figures by introducing a focal blur to the image. The object at the origin will be in focus.

cmd.forward

“forward” moves the movie one frame forward. See also: mset, backward, rewind

cmd.fragment

“fragment” retrieves a 3D structure from the fragment library, which is currently pretty meager (just amino acids).

cmd.frame

“frame” sets the viewer to the indicated movie frame. See also: count_states

cmd.full_screen

“full_screen” enables or disables full screen mode.

cmd.fuse

“fuse” joins two objects into one by forming a bond. A copy of the object containing the first atom is moved so as to form an approximately resonable bond with the second, and that copy is then merged with the first object. See also: bond, unbond, attach, replace, fuse, remove_picked

cmd.get

“get” prints out the current value of a setting. See also: set, set_bond, get_bond

cmd.get_angle

“get_angle” returns the angle between three atoms. By default, the coordinates used are from the current state, however an alternate state identifier can be provided.

cmd.get_area

Get the surface area of an selection. Depends on the “dot_solvent” setting. With “dot_solvent=off” (default) it calculates the solvent excluded surface area, else the surface accessible surface. See also: "dot_solvent" setting, "dots" representation (show dots)

cmd.get_assembly_ids

EXPERIMENTAL AND SUBJECT TO CHANGE! Get the list of assembly ids for an object loaded from mmCIF.

cmd.get_atom_coords

“get_atom_coords” returns the 3D coordinates of a single atom.

cmd.get_bond

“get_bond” gets per-bond settings for all bonds which exist between two selections of atoms.

cmd.get_bond_print

cmd.get_bonds

Get a list of (atm1, atm2, order) tuples for bonds with coordinates in the given state (same logic as cmd.get_model()). WARNING: atm1/atm2 are 0-based indices! They enumerate the atoms in the selection and do not necessarily correspond to the “index” atom property. To get a atm1/atm2 to index mapping, you can do: >>> stored.indices = [] >>> cmd.iterate_state(state, selection, “stored.indices.append(index)“) See also: cmd.get_model().bond

cmd.get_bytes

API-only function which exports the selection to a molecular file format and returns it as a binary (“bytes”) string.

cmd.get_chains

Print the list of chain identifiers in the given selection.

cmd.get_cifstr

API-only function which returns a mmCIF string. See also: get_pdbstr

cmd.get_clip

“get_clip” returns the positions of the clipping planes. See also: clip

cmd.get_collada

“get_collada” returns a COLLADA string representing the content currently displayed.

cmd.get_color_index

cmd.get_color_indices

cmd.get_color_tuple

cmd.get_colorection

cmd.get_coords

API only. Get selection coordinates as numpy array.

cmd.get_coordset

API only. Get object coordinates as numpy array.

cmd.get_dihedral

“get_dihedral” returns the dihedral angle between four atoms. By default, the coordinates used are from the current state, however an alternate state identifier can be provided. By convention, positive dihedral angles are right-handed (looking down the atom2-atom3 axis).

cmd.get_distance

“get_distance” returns the distance between two atoms. By default, the coordinates used are from the current state, however an alternate state identifier can be provided.

cmd.get_drag_object_name

cmd.get_editor_scheme

cmd.get_extent

“get_extent” returns the minimum and maximum XYZ coordinates of a selection as an array: [ [ min-X , min-Y , min-Z ],[ max-X, max-Y , max-Z ]]

cmd.get_fastastr

API only. Get protein and nucleic acid sequences in fasta format. Used for saving: PyMOL> save foo.fasta New in PyMOL 2.2: - chain specific keys (key argument) - nucleic acid support

cmd.get_frame

“get_frame” returns the current frame index (1-based) See also: get_state

cmd.get_gltf

“get_gltf” saves a gltf file representing the content currently displayed.

cmd.get_idtf

“get_idft” is under development, but should eventually return an idtf file containing multiple objects and scenes.

cmd.get_modal_draw

cmd.get_model

“get_model” returns a ChemPy “Indexed” format model from a selection.

cmd.get_movie_length

“get_movie_length” returns the number of frames explicitly defined in the movie, not including molecular states. See also: frame, count_states, count_frames

cmd.get_movie_locked

cmd.get_movie_playing

cmd.get_mtl_obj

NOTE: this is an incomplete and unsupported feature. “get_mtl_obj” returns a tuple containing mtl and obj input files for use with Maya.

cmd.get_names

“get_names” returns a list of object and/or selection names. See also: get_type, count_atoms, count_states

cmd.get_names_of_type

“get_names_of_type” will return a list of names for the given type.

cmd.get_object_color_index

cmd.get_object_list

“get_object_list” is an unsupported command that may have something to do with querying the objects covered by a selection.

cmd.get_object_matrix

“get_object_matrix” is an unsupported command that may have something to do with querying the transformation matrices associated with an object

cmd.get_object_settings

“get_object_settings” is an unsupported command

cmd.get_object_state

Returns the effective object state.

cmd.get_object_ttt

“get_object_ttt” is an unsupported command

cmd.get_pdbstr

“get_pdbstr” in an API-only function which returns a pdb corresponding to the atoms in the selection provided and that are present in the indicated state

cmd.get_phipsi

cmd.get_position

“get_position” returns the 3D coordinates of the center of the viewer window.

cmd.get_povray

“get_povray” returns a tuple corresponding to strings for a PovRay input file.

cmd.get_progress

cmd.get_property

Get an object-level property

cmd.get_property_list

Get all properties for an object (for a particular state) as a list

cmd.get_raw_alignment

“get_raw_alignment” returns a list of lists of (object,index) tuples containing the raw per-atom alignment relationships

cmd.get_renderer

Prints OpenGL renderer information.

cmd.get_sasa_relative

Calculates the relative per-residue solvent accessible surface area and optionally labels and colors residues. The value is relative to full exposure of the residue, calculated by removing all other residues except its two next neighbors, if present. Loads a value beteween 0.0 (fully buried) and 1.0 (fully exposed) into the b-factor property, available in “iterate”, “alter” and “label” as “b”. See also: get_area with "load_b=1" argument.

cmd.get_scene_list

cmd.get_scene_message

cmd.get_scene_thumbnail

cmd.get_selection_state

Returns the effective object state for all objects in given selection. Raises exception if objects are in different states.

cmd.get_session

cmd.get_setting_boolean

cmd.get_setting_float

cmd.get_setting_int

cmd.get_setting_legacy

cmd.get_setting_text

cmd.get_setting_tuple

cmd.get_setting_updates

cmd.get_state

“get_state” returns the current state index (1-based) See also: get_frame

cmd.get_str

Like “get_bytes” but return a unicode string.

cmd.get_symmetry

“get_symmetry” can be used to obtain the crystal and spacegroup parameters for a molecule or map.

cmd.get_title

“get_title” retrieves a text string to the state of a particular object which will be displayed when the state is active.

cmd.get_type

“get_type” returns a string describing the named object or selection. See also: get_names

cmd.get_unused_name

cmd.get_version

“get_version” returns a tuple of length six containing text, floating point, and integer representations of the current PyMOL version number, build date as unix timestamp, GIT SHA and SVN code revision so far available.

cmd.get_view

“get_view” returns and optionally prints out the current view information in a format which can be embedded into a command script and can be used in subsequent calls to “set_view”. If a log file is currently open, get_view will not write the view matrix to the screen unless the “output” parameter is 2. See also: set_view

cmd.get_viewport

“get_viewport” returns and optionally prints out the screen viewport size

cmd.get_vis

cmd.get_volume_field

EXPERIMENTAL AND SUBJECT TO CHANGE - DO NOT USE API only. Get the raw data of a map or volume object.

cmd.get_volume_histogram

API ONLY. Get min, max, mean, stdev and histogram of a map or volume object as a list of length bins + 4.

cmd.get_vrml

“get_vrml” returns a VRML2 string representing the content currently displayed.

cmd.get_wizard

cmd.get_wizard_stack

cmd.gradient

“gradient” creates a gradient object from a map object. See also: load, isomesh

cmd.group

“group” creates or updates a group object: a container for organizing objects into a hierarchy. See also: ungroup, order, "group_auto_mode" setting

cmd.group_sc

cmd.h_add

“h_add” adds hydrogens onto a molecule based on current valences. See also: h_fill

cmd.h_fill

“h_fill” removes and replaces hydrogens on the atom or bond picked for editing. See also: edit, cycle_valence, h_add

cmd.h_fix

“h_fix” is an unsupported command that may have something to do with repositioning hydrogen atoms.

cmd.help

“help” prints out the online help for a given command.

cmd.help_setting

Print documentation for a setting.

cmd.hide

“hide” turns off atom and bond representations. See also: show, enable, disable

cmd.id_atom

“id_atom” returns the original source id of a single atom, or raises and exception if the atom does not exist or if the selection corresponds to multiple atoms.

cmd.identify

“identify” returns a list of atom IDs corresponding to the ID code of atoms in the selection.

cmd.index

“index” returns a list of tuples corresponding to the object name and index of the atoms in the selection.

cmd.indicate

“indicate” shows a visual representation of an atom selection.

cmd.interrupt

cmd.intra_fit

“intra_fit” fits all states of an object to an atom selection in the specified state. It returns the rms values to python as an array. See also: fit, rms, rms_cur, intra_rms, intra_rms_cur, pair_fit

cmd.intra_rms

“intra_rms” calculates rms fit values for all states of an object over an atom selection relative to the indicated state. Coordinates are left unchanged. The rms values are returned as a python array. See also: fit, rms, rms_cur, intra_fit, intra_rms_cur, pair_fit

cmd.intra_rms_cur

“intra_rms_cur” calculates rms values for all states of an object over an atom selection relative to the indicated state without performing any fitting. The rms values are returned as a python array. See also: fit, rms, rms_cur, intra_fit, intra_rms, pair_fit

cmd.invert

“invert” inverts the stereo-chemistry of atom (pk1), holding attached atoms (pk2) and (pk3) immobile.

cmd.ipython_image

cmd.is_dict

cmd.is_error

cmd.is_gui_thread

cmd.is_list

cmd.is_ok

cmd.is_sequence

cmd.is_string

cmd.is_tuple

cmd.isodot

“isodot” creates a dot isosurface object from a map object. See also: load, isomesh

cmd.isolevel

“isolevel” changes the contour level of a isodot, isosurface, or isomesh object.

cmd.isomesh

“isomesh” creates a mesh isosurface object from a map object. See also: isodot, load

cmd.isosurface

“isosurface” creates a new surface object from a map object. See also: isodot, isomesh, load

cmd.iterate

“iterate” iterates over an expression within a temporary namespace for each atom. See also: iterate_state, alter, alter_state

cmd.iterate_state

“iterate_state” is to “alter_state” as “iterate” is to “alter” See also: iterate, alter, alter_state

cmd.join_states

The reverse of split_states. Create a multi-state object from a selection which spans multiple objects.

cmd.label

“label” labels one or more atoms in a selection by evaluating an Python expression referencing properties for each atom.

cmd.label2

cmd.load

“load” can by used to read molecules, crystallographic maps and other volumetric data, PyMOL sessions, and some other types of content. See also: save, load_traj, fetch

cmd.load_brick

cmd.load_callback

“load_callback” is used to load a generic Python callback object. These objects are called every time the screen is updated and can be used to trigger OpenGL rendering calls (such as with PyOpenGL).

cmd.load_cgo

“load_cgo” is used to load a compiled graphics object, which is actually a list of floating point numbers built using the constants in the $PYMOL_PATH/modules/pymol/cgo.py file.

cmd.load_coords

API only. Load selection coordinates. CHANGED IN VERSION 1.7.3: This used to be the load_coordset function. load_coordset may load coordinates in different order (original order from PDB file) than load_coords (atom sorted order).

cmd.load_coordset

API only. Load object coordinates. Loads them in the original atom order (order from PDB file for example), not in the atom property sorted order (like cmd.iterate, cmd.load_coods, etc.). See also: cmd.load_coords

cmd.load_embedded

“load_embedded” loads content previously defined in the current PyMOL command script using the “embed” command.

cmd.load_map

cmd.load_model

“load_model” reads a ChemPy model into an object

cmd.load_mtz

Load a MTZ file as two map objects (fofc, 2fofc) or if amplitudes and phases column names are given, as one map object.

cmd.load_object

“load_object” is a general developer function for loading Python objects into PyMOL.

cmd.load_png

“load_png” loads and displays a PNG file from disk.

cmd.load_raw

API-only function for loading data from memory.

cmd.load_traj

“load_traj” reads trajectory files. Most of the trajectory formats listed here are supported: http://www.ks.uiuc.edu/Research/vmd/plugins/molfile/ See also: load

cmd.loadable

cmd.loadall

Load all files matching given globbing pattern

cmd.lock

cmd.lock_attempt

cmd.lock_without_glut

cmd.log

“log” writes a command to the log file (if one is open). text and/or alt_text must include the terminating line feed. See also: log_open, log_close

cmd.log_close

“log_close” closes the current log file (if one is open). See also: log, log_open

cmd.log_open

“log_open” opens a log file for writing. See also: log, log_close

cmd.look_at

“look_at” modifies a rotation of an object (or view) so that its forward (z axis) faces the center of a target object.

cmd.ls

List contents of the current working directory. See also: cd, pwd, system

cmd.madd

“madd” extends the existing movie specification using the same syntax as mset. See also: mset, mdo, mplay, mclear

cmd.map_double

“map_double” resamples a map at twice the current resolution.

cmd.map_generate

“map_generate” generates a map object from a PDB object or selection and reflection data. Experimental use with caution.

cmd.map_halve

“map_halve” resamples a map at half the current resolution. See also: map_double

cmd.map_new

“map_new” creates a map object using one of the built-in map generation routines. This command not yet fully supported.

cmd.map_sc

cmd.map_set

“map_set” provides a number of common operations on and between maps. See also: map_new

cmd.map_set_border

“map_set_border” is a function (reqd by PDA) which allows you to set the level on the edge points of a map See also: load

cmd.map_trim

“map_trim” is an unsupported command that may have something to do with reducing the extent of a map to cover just a single selection of atoms.

cmd.mappend

“mappend” associates additional command line operations with a particular movie frame. These “generalized movie commands” will be executed every time the numbered frame is played. See also: mset, madd, mdo, mplay, mstop

cmd.mask

“mask” makes it impossible to select the indicated atoms using the mouse. This is useful when you are working with one molecule in front of another and wish to avoid accidentally selecting atoms in the background. See also: unmask, protect, deprotect, mouse

cmd.matrix_copy

“matrix_copy” copies a transformation matrix from one object to another. See also: matrix_reset, align, fit, pair_fit

cmd.matrix_reset

“matrix_reset” resets the transformation for an object. See also: matrix_copy, align, super, fit, pair_fit

cmd.matrix_transfer

“matrix_copy” copies a transformation matrix from one object to another. See also: matrix_reset, align, fit, pair_fit

cmd.mclear

“mclear” clears the movie frame image cache.

cmd.mcopy

“mcopy” copies key frames and movie commands Usage like “mmove”. See also: mmove, mdelete, minsert

cmd.mdelete

“mdelete” removes frames from camera view and object motions. See also: minsert, mmove

cmd.mdo

“mdo” defines (or redefines) the command-line operations associated with a particular movie frame. These “generalized movie commands” will be executed every time the numbered frame is played. See also: mset, mplay, mstop

cmd.mdump

“mdump” dumps the current set of movie commands as text output. See also: mplay, mset, mdo, mclear, mmatrix

cmd.mem

“mem” Dumps current memory state to standard output. This is a debugging feature, not an official part of the API.

cmd.meter_reset

“meter_reset” resets the frames per secound counter.

cmd.middle

“middle” goes to the middle of the movie.

cmd.minimize

“fast_minimize” is an unsupported nonfunctional command that may eventually have something to do with minimization.

cmd.minsert

“minsert” adds frames into camera view and object motions. See also: mdelete, mmove, madd

cmd.mmatrix

“mmatrix” sets up a matrix to be used for the first frame of the movie.

cmd.mmove

“mmove” moves key frames and movie commands See also: mcopy, mdelete, minsert

cmd.morph

Creates an interpolated trajectory between two or multiple conformations. If the two input objects are not the same, match them based on sequence alignment. This command supports two methods: rigimol and linear. RigiMOL is an incentive feature and only available to official PyMOL sponsors. Linear morphing is quick and robust but likely to produce distorted intermediates.

cmd.mouse

“mouse” cycles through the mouse modes defined in the current mouse configuration ring.

cmd.move

“move” translates the camera about one of the three primary axes. See also: turn, rotate, translate, zoom, center, clip

cmd.move_on_curve

“move_on_curve” moves an object along a curve.

cmd.mplay

“mplay” starts the movie. See also: mstop, mset, mdo, mclear, mmatrix

cmd.mpng

“mpng” writes movie frames as a series of numbered png files. See also: png, save

cmd.mse2met

Mutate selenomethionine to methionine

cmd.mset

“mset” sets up a relationship between molecular states and movie frames. This makes it possible to control which states are shown in which frame. See also: madd, mdo, mplay, mclear

cmd.mstop

“mstop” stops playing of the movie. See also: mplay, mset, mdo, mclear, mmatrix

cmd.mtoggle

“mtoggle” toggles playing of the movie.

cmd.multifilenamegen

cmd.multifilesave

For a selection that spans multiple molecular objects and/or states, save each object and/or state to a separate file. Takes a filename argument with placeholders: {name} : object name {state} : state number {title} : state title {num} : file number {} : object name (first) or state (second)

cmd.multisave

“multisave” will save a multi-entry PDB file. Every object in the given selection (pattern) will have a HEADER and a CRYST (if symmetry is defined) record, and is terminated with END. Loading such a multi-entry PDB file into PyMOL will load each entry as a separate object. This behavior is different to the “save” command, where a multi-object selection is written “flat” to a PDB file, without HEADER or CRYST records.

cmd.mview

“mview” stores camera and object matrices for use in movie interpolation. See also: mplay, mset, mdo, mclear, mmatrix

cmd.object_sc

cmd.order

“order” changes the ordering of names in the control panel. See also: set_name, group

cmd.orient

“orient” aligns the principal components of the atoms in the selection with the XYZ axes. See also: zoom, origin, reset

cmd.origin

“origin” sets the center of rotation about a selection. If an object name is specified, it can be used to set the center of rotation for the object (for use in animation and editing). See also: zoom, orient, reset

cmd.overlap

“overlap” is an unsupported command that sums up [(VDWi + VDWj) - distance_ij]/2 between pairs of selected atoms.

cmd.pair_fit

“pair_fit” fits matched sets of atom pairs between two objects. See also: fit, rms, rms_cur, intra_fit, intra_rms, intra_rms_cur

cmd.paste

cmd.pbc_unwrap

Unwrap molecules or atoms from PBC box so that they don’t jump across periodic boundaries.

cmd.pbc_wrap

Wrap molecules into PBC box.

cmd.phi_psi

“phi_psi” return the phi and psi angles for a protein atom selection.

cmd.pi_interactions

Find pi-pi and pi-cation interactions. Identical to cmd.distance(…, mode=5, label=0) See also: distance

cmd.png

“png” saves a PNG format image file of the current display. See also: mpng, save

cmd.pop

“pop” provides a mechanism of iterating through an atom selection atom by atom, where each atom is sequentially assigned to the named selection.

cmd.pretty

cmd.protect

“protect” protects a set of atoms from tranformations performed using the editing features. This is most useful when you are modifying an internal portion of a chain or cycle and do not wish to affect the rest of the molecule. See also: deprotect, mask, unmask, mouse, editing

cmd.protonate

“protonate” adds hydrogens with pH-dependent protonation states. When pdb2pqr is available, uses PROPKA for per-residue pKa prediction. Otherwise, falls back to textbook pKa values for standard titratable residues. Unlike “h_add” which fills all open valences, “protonate” considers pKa values to determine which atoms should be protonated at the given pH. Heavy atoms and their visual settings (colors, representations) are See also: h_add, h_fill

cmd.pseudoatom

“pseudoatom” adds a pseudoatom to a molecular object, and will creating the molecular object if it does not yet exist.

cmd.publication

cmd.push_undo

“push_undo” stores the current conformations of objects in the selection onto their individual undo rings. Notice: This command is only partly implemented in open-source PyMOL. See also: undo, redo

cmd.pwd

Print current working directory. See also: cd, ls, system

cmd.python_help

You have asked for help on a Python keyword which is available from within the PyMOL command language. Please consult the official Python documentation at http://www.python.org for detailed information on Python keywords. You may include Python blocks in your PyMOL command scripts, but do note that multi-line blocks of Python in PyMOL command files will require explicit continuation syntax in order to execute properly (see below). See also: extend, run, @

cmd.ramp_new

“ramp_new” creates a color ramp based on a map potential value or based on proximity to a molecular object. See also: ramp_update, load, color, create, slice, gradient

cmd.ramp_update

“ramp_update” updates range and/or color of a color ramp. See also: ramp_new

cmd.ray

“ray” creates a ray-traced image of the current frame. This can take some time (up to several minutes, depending on image complexity). See also: draw, png, save

cmd.read_mmodstr

“read_mmodstr” reads a macromodel format structure from a Python string.

cmd.read_molstr

“read_molstr” reads an MDL MOL format file as a string

cmd.read_pdbstr

“read_pdbstr” in an API-only function which reads a pdb file from a Python string. This feature can be used to load or update structures into PyMOL without involving any temporary files.

cmd.read_sdfstr

“read_sdfstr” reads an MDL MOL format file as a string

cmd.read_xplorstr

“read_xplorstr” in an API-only function which reads an XPLOR map from a Python string. This feature can be used to bypass temporary files.

cmd.ready

cmd.rebond

Discard all bonds and do distance based bonding.

cmd.rebuild

“rebuild” forces PyMOL to recreate geometric objects in case any of them have gone out of sync. See also: refresh

cmd.recolor

“recolor” forces reapplication of colors to existing objects. See also: color, set_color

cmd.recolour

“recolor” forces reapplication of colors to existing objects. See also: color, set_color

cmd.redo

“redo” reapplies the conformational change of the object currently being edited. See also: undo, push_undo

cmd.reference

cmd.refresh

“refresh” causes the scene to be redrawn as soon as the operating system allows it to be done. See also: rebuild

cmd.refresh_wizard

“refresh_wizard” is in unsupported internal command.

cmd.reinitialize

“reinitialize” reinitializes the program by deleting all objects and restoring the default program settings.

cmd.remove

“remove” eleminates the atoms in a selection from their respective molecular objects. See also: delete

cmd.remove_picked

“remove_picked” removes the atom or bond currently picked for editing. See also: attach, replace

cmd.rename

“rename” creates new atom names which are unique within residues. See also: alter

cmd.replace

“replace” replaces the picked atom with a new atom. See also: remove, attach, fuse, bond, unbond

cmd.replace_wizard

“replace_wizard” is an unsupported internal command.

cmd.reset

“reset” restores the rotation matrix to identity, sets the origin to the center of mass (approx.) and zooms the window and clipping planes to cover all objects. Alternatively, it can reset object matrices.

cmd.resume

“resume” executes a log file and opens it for recording of additional commands. See also: log, log_close

cmd.rewind

“rewind” goes to the beginning of the movie.

cmd.rms

“rms” computes a RMS fit between two atom selections, but does not tranform the models after performing the fit. See also: fit, rms_cur, intra_fit, intra_rms, intra_rms_cur, pair_fit

cmd.rms_cur

“rms_cur” computes the RMS difference between two atom selections without performing any fitting. See also: fit, rms, intra_fit, intra_rms, intra_rms_cur, pair_fit

cmd.rock

“rock” toggles Y axis rocking.

cmd.rotate

“rotate” rotates the atomic coordinates of atoms in a selection about an axis. Alternatively, it modifies the matrix associated with a particular object or object state.

cmd.safe_alpha_list_eval

cmd.safe_eval

cmd.safe_list_eval

cmd.save

“save” writes content to a file. See also: load, get_model

cmd.scene

“scene” saves and restores scenes. A scene consists of the camera view, all object activity information, all atom-wise visibilities, all atom-wise colors, all representations, the global frame index, and may contain a text message to display on playback. See also: view, set_view, get_view

cmd.scene_order

“scene_order” changes the ordering of scenes. See also: scene

cmd.scene_recall_message

cmd.sculpt_activate

“sculpt_activate” enables sculpting for the given object. The current geometry (bond lengths, angles, etc.) of the given state is remembered as the reference geometry. See also: sculpt_iterate, sculpt_deactivate

cmd.sculpt_deactivate

“sculpt_deactivate” deactivates sculpting for the given object and clears the stored restraints. See also: sculpt_activate

cmd.sculpt_iterate

“sculpt_iterate” performs a simple energy minimization of atomic coordinates based on the geometry restraints which were defined with the “sculpt_activate” invocation and which are selected in the “sculpt_field_mask” setting. Sculpting currently supports local geometry restraints and vdw repulsion, but no solvation or electrostatic effects. See also: commands: sculpt_activate, sculpt_deactivate, settings: "sculpting" setting, all "sculpt_*" settings

cmd.sculpt_purge

“sculpt_purge” is an unsupported feature.

cmd.select

“select” creates a named atom selection from a selection-expression. See also: delete

cmd.select_list

API only. Select by atom indices within a single object. Returns the number of selected atoms.

cmd.selection_sc

cmd.set

“set” changes global, object, object-state, or per-atom settings. See also: get, set_bond

cmd.set_atom_property

Set an atom-level property See also: set_property, iterate, alter

cmd.set_bond

“set_bond” changes per-bond settings for all bonds which exist between two selections of atoms.

cmd.set_color

“set_color” defines a new color using the red, green, and blue (RGB) color components. See also: recolor

cmd.set_colorection

cmd.set_colour

“set_color” defines a new color using the red, green, and blue (RGB) color components. See also: recolor

cmd.set_dihedral

“set_dihedral” changes the dihedral angle formed between the four bonded atoms provided. The atoms must be acyclic.

cmd.set_discrete

Convert discrete to non-discrete object or vice versa.

cmd.set_frame

cmd.set_geometry

“set_geometry” changes PyMOL’s assumptions about the proper valence and geometry of atoms in the selection. See also: remove, attach, fuse, bond, unbond

cmd.set_key

“set_key” binds a specific python function to a key press. New in PyMOL 1.6.1: second argument can also be a string in PyMOL command syntax. See also: button, alias

cmd.set_name

“set_name” changes the name of an object or selection.

cmd.set_object_color

cmd.set_object_ttt

“set_object_ttt” is an API-only function which sets the TTT matrix (view transformation) for an object. When a movie is defined and the object has key frames for object motions, then the key frames take priority and update the TTT matrix while the movie is playing. Unlike a homogenous matrix where the last row is always [0,0,0,1], a TTT matrix may have a pre-translation vector in the last row. See also: cmd.transform_object, cmd.matrix_reset

cmd.set_property

Set an object-level property See also: get_property, get_property_list, set_atom_property

cmd.set_raw_alignment

API only. Create an alignment object from lists of indices. See also: cmd.get_raw_alignment

cmd.set_scene_message

cmd.set_session

cmd.set_state_order

API only. Set the order of states for an object.

cmd.set_symmetry

“set_symmetry” defines or redefines the crystal and spacegroup parameters for a molecule or map object.

cmd.set_title

“set_title” attaches a text string to the state of a particular object which can be displayed next to the object name when that state is active. This is useful for display the energies of a set of conformers.

cmd.set_view

“set_view” sets viewing information for the current scene, including the rotation matrix, position, origin of rotation, clipping planes, and the orthoscopic flag. See also: get_view

cmd.set_vis

cmd.set_wizard

cmd.set_wizard_stack

cmd.show

“show” turns on representations for objects and selections. See also: hide, enable, disable

cmd.show_as

“as” turns on and off atom and bond representations. See also: show, hide, enable, disable

cmd.show_help

cmd.simple

cmd.slice_new

“slice_map” creates a slice object from a map object. See also: isomesh, isodot, load

cmd.smooth

“smooth” performs a window average of coordinate states. See also: load_traj

cmd.sort

“sort” reorders atoms in the structure. It usually only necessary to run this routine after an “alter” command which has modified the names of atom properties. Without an argument, sort will resort all atoms in all objects. See also: alter

cmd.space

“space” selects a color palette (or color space). See also: color

cmd.spawn

“spawn” launches a Python script in a new thread which will run concurrently with the PyMOL interpreter. It can be run in its own namespace (like a Python module, default), a local name space, or in the global namespace. See also: run

cmd.spectrum

“spectrum” colors atoms with a spectrum of colors based on an atomic property.

cmd.spheroid

“spheroid” averages trajectory frames together to create an ellipsoid-like approximation of the actual anisotropic motion exhibited by the atom over a series of trajectory frames.

cmd.splash

cmd.split_chains

Create a single object for each chain in selection See also: split_states

cmd.split_states

“split_states” separates a multi-state molecular object into a set of single-state molecular objects. See also: join_states

cmd.stereo

“stereo” activates or deactives stereo mode.

cmd.super

“super” performs a residue-based pairwise alignment followed by a structural superposition, and then carries out zero or more cycles of refinement in order to reject outliers. See also: align, pair_fit, fit, rms, rms_cur, intra_rms, intra_rms_cur

cmd.symexp

“symexp” creates all symmetry-related objects for the specified object that occur within a cutoff about an atom selection. See also: load

cmd.symmetry_copy

“symmetry_copy” copies symmetry information from one object to another.

cmd.sync

“sync” is an API-only function which waits until all current commmands have been executed before returning. A timeout can be used to insure that this command eventually returns. See also: frame

cmd.technical

cmd.test

“dump” is an unsupported internal command.

cmd.toggle

“toggle” toggles the visibility of a representation within a selection. See also: show, hide

cmd.torsion

“torsion” rotates the torsion on the bond currently picked for editing. The rotated fragment will correspond to the first atom specified when picking the bond (or the nearest atom, if picked using the mouse). See also: edit, unpick, remove_picked, cycle_valence

cmd.transform_object

“transform_object” in an API-only function which applies a transformation matrix to an object. If setting “matrix_mode” > 0 and selection is empty, then this function operates on the TTT (movie) matrix. See also: cmd.transform_selection, cmd.set_object_ttt, cmd.matrix_reset

cmd.transform_selection

“transform_selection” transforms the atomic coordinates of a selection.

cmd.translate

“translate” translates the atomic coordinates of atoms in a selection. Alternatively, is modifies the matrix associated with a particular object or object-state.

cmd.translate_atom

cmd.turn

“turn” rotates the camera about one of the three primary axes, centered at the origin. See also: move, rotate, translate, zoom, center, clip

cmd.unblock_flush

cmd.unbond

“unbond” removes all bonds between two selections. See also: bond, fuse, remove_picked, attach, detach, replace

cmd.undo

“undo” restores the previous conformation of the object currently being edited. See also: redo, push_undo

cmd.ungroup

“ungroup” removes an object from a group object, returning it to the top level. See also: group

cmd.uniquify

Make identifier unique with respect to reference selection.

cmd.unlock

cmd.unmask

“unmask” reverses the effect of “mask” on the indicated atoms. See also: mask, protect, deprotect, mouse

cmd.unpick

“unpick” deletes the special “pk” atom selections (pk1, pk2, etc.) used in atom picking and molecular editing. See also: edit

cmd.unset

“unset” clears a setting and restores its default value. WARNING: The behavior for global settings changed in PyMOL 2.5. Previously, “unset settingname” would set the global value of “settingname” to zero/off instead of the default value. To set a setting to zero, do “set settingname, 0”. See also: unset_deep, set, set_bond

cmd.unset_bond

“unset_bond” removes a per-bond setting for a given set of bonds.

cmd.unset_deep

Unset all object, object-state, atom, and bond level settings. Note: Does currently NOT unset atom-state level settings. Check for atom-state level settings with: PyMOL> iterate_state 1, *, print(list(s)) Unset e.g. atom-state level “label_screen_point” (index 728) with: PyMOL> alter_state 1, *, del s[728]

cmd.update

“update” transfers coordinates from one selection to another. See also: load

cmd.usalign

“usalign” performs a TM-align structural superposition of two protein structures. Unlike “align” and “super”, it uses TM-score optimization, which is length-independent and more suitable for comparing proteins with different lengths or low sequence identity. Only CA of proteins and C4’ of nucleic acids are considered for alignment. See also: align, super, cealign, pair_fit, fit

cmd.valence

“valence” modifies the valences of all existing bonds formed between two atom selections. See also: unbond, fuse, attach, replace, remove_picked

cmd.vdw_fit

“vdw_fit” is an unsupported feature.

cmd.view

“view” saves and restore camera views. See also: scene, set_view, get_view

cmd.viewport

“viewport” changes the size of the graphics display area.

cmd.volume

“volume” creates a volume object from a map object. See also: map_new, isosurface, isomesh, volume_color, volume_ramp_new

cmd.volume_color

Set or get the volume colors.

cmd.volume_panel

Open an interactive volume ramp panel

cmd.volume_ramp_new

Register a named volume ramp which can be used as a preset when creating or coloring volumes. The name will appear in the internal menu at “A > volume” and “C”. See also: volume, volume_color

cmd.window

“window” controls the visibility of PyMOL’s output window

cmd.wizard

“wizard” launches on of the built-in wizards. There are special Python scripts which work with PyMOL in order to obtain direct user interaction and easily peform complicated tasks.

cmd.write_html_ref

cmd.zoom

“zoom” scales and translates the window and the origin to cover the atom selection. See also: origin, orient, center