A Chimera session (the state of Chimera during use)
can be saved and restored.
A session file consists of Python code that reconstitutes
the state of Chimera
by displaying data and performing other operations.
Molecular coordinate and sequence alignment data are included in the
session file; however, volume data files must still
be present to restart a session in which they were open.
When a session with volume data is restarted,
the user may be queried about file location(s)
if the data or the session file have been moved since the session was saved.
Ways to save a session:
Ways to restart a session:
If a session includes a structure that has duplicate atom names within
the same residue, it will not restore correctly.
Opening a session will not close any existing models.
File... Close Session
can be used to clear the contents of the existing session
without exiting from Chimera.
Opening a session file creates a compiled version of the file
(binary) with the same name except *.pyc instead of *.py.
The binary speeds up session restoration and will be used (if present)
even when the *.py file has been specified. Further, opening the
*.pyc file directly will start the session even if the *.py file
has been deleted. However, keeping the *.py file is recommended:
- the *.py file will work with subsequent versions of python,
whereas the *.pyc file will only work with the same version of python
that generated it
- the *.py file can be viewed and edited with a text editor, whereas
the binary *.pyc file cannot
- while *.py files are transferable among different types of computers,
*.pyc files generated on one system may not be read correctly on another
If models are already open when a session file is read, a user will be
given the option to close the existing session (models and other data)
before restoring the session from the file. Otherwise, the sessions
will be merged.
When sessions are merged,
models in the incoming session will be assigned new ID numbers.
Regardless of how models were moved beforehand,
a session will always restore in the position in which it was saved.
It may be helpful in some cases to reset model positions
right before merging in a session.
Models opened from individual data files can be reset to their original
positions with the command
reset (without arguments).
Models restored from a session file
can be reset to their positions when the session was saved
with reset session-start.
What Sessions Include
The following are saved in session files:
- display status, colors, and styles
of atoms, bonds, ribbons, and
- atomic coordinates, incorporating changes such as from
or bond rotation
- status of other model types:
volume and VRML
(except a VRML model opened from a file that is then moved
before the session is saved)
- window size, model translation/rotation, and global scale
- positions of clipping planes,
- viewing parameters:
center of rotation method,
- camera mode and
(however, the camera mode will not be restored if it is
or if Chimera was already in
prior to session restoration)
- standard labels and
including distance monitors
- PDB headers and residue secondary structure assignments
- atomic B-factor, occupancy, radius,
- color definitions (see
and aliases (see alias)
- saved positions (see
positions saved explicitly plus the position at the time of the save,
- selections, current and saved
- information from
- the status of
- sequence alignments open in
and their regions and associations
- the status of most tools, including the
and Side View
- preferences settings
preferences file can be changed between saving and restarting
preferences file is being used (an issue
when there are different preferences files in different locations
and a session file has been moved from its original location)
UCSF Computer Graphics Laboratory / January 2008