ChimeraX docs icon

Command: runscript

runscript  script  arguments

The runscript command allows running a Python script (.py) or ChimeraX command script (.cxc) with file pathname script and any needed command-line arguments. Substituting the word browse for the pathname brings up a file browser window for choosing the name and location of the script interactively. The arguments are passed to the Python script as sys.argv[1], sys.argv[2], etc., or substituted into the ChimeraX command script for $1, $2, etc. The --script startup option calls this command.

See also: alias, open and its forEachFile option

UCSF Resource for Biocomputing, Visualization, and Informatics / June 2022