Chimera input files may contain structures to be displayed, commands or code to be executed, or other data. The command open reads local files and fetches data from the Web. 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) with a specified model-ID 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).
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. 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.
Other than a local file, a filename can specify data to be retrieved over the Web: