Chimera Commands Index

Usage:
open [ noprefs ] [ model | pdb | object ] [ model_number ] [ filename ]

Usage:
( close | ~open ) model_number

Usage:
( close | ~open ) ( all | session )

Open reads local files or fetches by ID over the Web.

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.

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.

The filename is generally a pathname to a local file, absolute or relative to the current working directory (which can be changed with cd). If filename is omitted, a dialog for specifying the name and location will appear. Any of the registered file types can be opened.

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. 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, filename can be the database identifier of a file to be retrieved over the Web and opened:

Internet connectivity is required to fetch files over the Web.

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, split, start, the Open File dialog, Fetch by ID, the close function in the Model Panel