Skip to main content
These commands execute arbitrary text or end the session. A typed wrapper around do is a typed wrapper around “run anything”; treat them as a separate, guarded surface.

cmd.alias

“alias” binds routinely-used command inputs to a new command keyword. See also: cmd.extend, api

cmd.do

“do” makes it possible for python programs to issue simple PyMOL commands as if they were entered on the command line.

cmd.extend

“extend” is an API-only function which binds a new external function as a command into the PyMOL scripting language. See also: alias, api

cmd.new_command

cmd.quit

“quit” terminates the program.

cmd.run

“run” executes an external Python script in a local name space, the main Python namespace, the global PyMOL namespace, or in its own namespace (as a module). See also: spawn

cmd.system

“system” executes a command in a subshell under Unix or Windows. See also: ls, cd, pwd