Chimera Commands Index

Usage:
open [ noprefs ] [ nowildcard ] [ model-ID ] [ filename1 filename2 ... ]

Usage:
( close | ~open ) ( model-spec | all | session )

The command open reads local files and fetches data from the Web. Chimera input files may contain structures to be displayed, commands or code to be executed, or other data. Any resulting models in Chimera are assigned the specified model-ID number, or if none is specified, the lowest number(s) available. When multiple models are opened with a single command, model-ID should not be specified unless there is some reason to assign all of the models the same number.

Various attributes of newly opened molecules can be customized in the New Molecules preferences (see also set autocolor). The noprefs keyword indicates that a user's New Molecules preferences should not be applied. This prevents inconsistent behavior of command files and demos potentially caused by the different preferences settings of different users.

If a model is closed and another model opened with the same model number, none of the transformations applied to the previous model are applied to the newly opened model. The transformation matrix of one model can be applied to another model using matrixcopy.

The command close or ~open removes structures and other data: model(s) specified by number, or all models (everything listed in the Model Panel), or the session (all models, plus data without associated model numbers, such as 2D labels and sequence alignments). Closing a session shows the Rapid Access interface.

See also: read, runscript, split, start, Rapid Access, Fetch by ID, the Open File dialog

Local Files

A filename is generally a pathname to a local file, either absolute or relative to the current working directory. The working directory can be changed with cd. A pathname may start with "~" to indicate the user's home directory. Multiple files can be specified by including * (wild card), ? (single-character wild card), and/or square-bracketed character ranges in a filename. Such filename expansion or globbing is on by default, but can be turned off with the nowildcard keyword. If no filename is supplied, a dialog for browsing the filesystem will appear.

Any of the registered file types can be opened.

A file type can be specified by a suffix that is part of the filename or by prefix:filename, where prefix is not part of the filename. If a prefix and a suffix are both given, the prefix overrides the suffix. Filenames, prefixes, and suffixes are case-sensitive. Unrecognized prefixes are assumed to be part of the filename. For many of the registered file types, files that are gzipped (as indicated by .gz following the regular filename) are recognized and opened. Similarly, compressed files (as indicated by .Z) can be recognized and opened for many input types if gzip is on the user's execution path (can be run by entering gzip at the system command line). PDB format is the default input type.

Files from the Web

Other than a local file, a filename can specify data to be retrieved over the Web. Fetched files can be cached locally and reused as needed depending on the Fetch preferences and PDB preferences.