Open reads the contents of the file filename into Chimera. If filename is omitted, a dialog for specifying the name and location will appear. Any of the registered file types can be opened.
Input files may contain structures to be displayed, commands or code to be executed, or other data. A file of data to be displayed in the graphics window is opened as model model_number. Model_number should not be preceded by #. If model_number is omitted, the lowest available number is used.
If the keyword model or pdb is given, filename will be read as a PDB-format file; if the keyword object is used, filename will be read as a VRML file.
Alternatively, 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. Prefixes and suffixes are overridden by the model, pdb, or object keyword. If a prefix and a suffix are both given, the prefix overrides the suffix. Filenames, prefixes, and suffixes are case-sensitive. Unrecognizable prefixes are assumed to be part of the filename. Files that are gzipped (as indicated by .gz following the regular filename) are recognized and opened. PDB format is the default input type.
Filename is generally a pathname to a file or the name of a file in the current working directory. To change the working directory, use cd.
In some cases, filename can be the database identifier of a file to be retrieved and opened:
The command close or ~open closes (removes) structures and other data. Models and submodels can be specified for closing by model_number. The keyword all can be used to close all open models (all data with associated model numbers; everything listed in the Model Panel). The keyword session additionally specifies data without associated model numbers, such as 2D labels and sequence alignments.
Various attributes of newly opened molecules can be customized in the New Molecules preferences (see also set autocolor).
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.
See also: load, read, source, delete, start, Fetch by ID, the close function in the Model Panel