Cerius2 Modeling Environment



6       Managing Models and Sessions

Among the many functions that you use the Visualizer to perform are management of the Cerius2 session and of the models with which you work.

This section explains

This section tells you how to load and save structure files and how to manage Cerius2 models and sessions:

Loading model structure files

Handling multiple models

Saving model structure files

Working with Cerius2 sessions

Table 4. Finding information about managing models and sessions

If you want to know about: Read:
Controls in the model manager.   The model manager.  
Finding files with file browsers in control panels.   Loading model structure files.  
Mouse buttons and keyboard use.   Mouse and Keyboard Actions.  
Model databases supplied by MSI.   Models supplied by MSI.  
Building models.   Building Models.  
Labeling and annotating models.   Labeling and annotating models.  
Printing models.   Printing models and graphs.  
Saving models.   Saving individual models.  
Saving only part of a model.   Saving part of a model.  
Saving all models in a Cerius2 session.   Saving the current session.  
Model data.   What is saved as a model.  
File formats.   File Formats.  
Making your own directories.   Making custom directories.  
The current model.   Specifying the current model.  
Model spaces, adding and removing.   Creating, clearing, and deleting model spaces.  
Naming models.   Renaming models.  
Model visibility.   Controlling model visibility and the display mode.  
Displaying a model in the model window.   Controlling model visibility and the display mode.  
Moving a model or part of a model between model spaces.   Moving models between model spaces.  
Non-Cerius2 applications.   Copying models to and from other applications.  
Reinitializing Cerius2.   Starting a new session.  
Resuming a Cerius2 session.   Loading a previously saved session.  
Saving preferences.   Using saved sessions as preferences settings.  
Customizing the Cerius2 interface.   Customizing the Interface.  
Running Cerius2 from scripts contained in log files.   Controlling Cerius2 from scripts.  


Loading model structure files

Why read this section

This section tells you how to bring one or more models that are stored on disk into your current Cerius2 session. These can be models supplied with Cerius2 by MSI (see Models supplied by MSI) or models that you or someone else built and saved earlier (Saving individual models).

Related information

Building models is explained in Building Models and demonstrated in Introducing Cerius2. Saving models is discussed under Saving model structure files. File formats are presented in File Formats.

You should already know...

The basics of starting Cerius2 and using its interface are demonstrated in Introducing Cerius2 and described in The Cerius2 Interface.

Loading models

Select the File/Load Model... menu item (from the main control panel's menu bar) to access the Load Model control panel:

Finding model file(s)

Navigate the directory structure and find the desired file(s):

The current directory is printed on the popup when it is in its inactive state.

For example, when the File Format popup is set to MSI, *.msi is listed in the filename text entry box (as a filename filter) and only filenames that end with .msi are shown in the file selector list box.

You can also use the filename text entry box to specify a file, directory, or pathname or to set up your own filename filter. Valid UNIX wildcards and operators are allowed.

Where to put the loaded model

To choose the target model space, set Model Space to CURRENT or NEW (see Handling multiple models for information on model spaces).

Note

If you load a model from a file into an already-occupied model space, all the contents of that model space are considered to be one model.  

Loading the model file(s)

There are several ways of selecting and loading the desired file(s):

or:

Select its name file selector list box (the name becomes highlighted) and then click the LOAD button.

or:

Enter its name in the filename text entry box. (Enter means to type in the name and then press <Enter> or click the LOAD button.)

To select several model files, click the first filename and then drag to select several contiguous filenames, and/or <Shift> click to select a range of contiguous filenames, and/or <Ctrl> click to add a noncontiguous filename. Selected filenames are highlighted.

To deselect filenames, <Ctrl> click to deselect individual filenames or simply click to start again with a single filename.

The mouse/keyboard combinations for selecting and deselecting filenames (which are the same in any control panel that contains a file selector list box) are all described under Mouse actions.

Example

A tutorial example of loading models can be found in Reading in additional models.

Additional controls

You can change how files of a particular format are interpreted as they are read in. For example, whether to use any periodic information contained in the file, whether the number of hydrogen atoms is to be checked and corrected, whether and how to fill in possible missing bonds, etc.

To access these additional controls, click the Preferences... button in the Load Model control panel, which gives access to the Load Preferences control panel. The controls displayed in this panel depend on what the File Format popup in the Load Model control panel is set to.

Additional information

Please see the on-screen help for details on the functioning of each control in the Load Model control panel and the Load Preferences control panel.

Models supplied by MSI

Cerius2 supplies databases for a wide range of types of molecules and materials. These databases are contained in subdirectories of the Cerius2-Models directory (accessible from your run directory during Cerius2 sessions). These subdirectories include models of catalysts, ceramics, metals, minerals, molecular crystals, monomers, organics, polymers, sorbates, and others.

File formats

Many file formats besides the MSI format (see File Formats) can be imported if you need to use model files obtained from other programs or databases. However, transfer of all model data cannot be guaranteed when reading files that are not in MSI format.


Handling multiple models

Why read this section

Cerius2 can hold many models at one time, each in its own model space. This section tells you how to work with several models that are present simultaneously in the same Cerius2 session. The number of models allowed depends only on your computer's memory limitations.

Finding information

This section includes information on:

Basic model management tasks

Moving models between model spaces

Related information

Building models is explained in Building Models and demonstrated in Introducing Cerius2. Loading models is discussed under Loading model structure files.

You should already know...

The basics of starting Cerius2 and using its interface are demonstrated in Introducing Cerius2 and described in The Cerius2 Interface.

Basic model management tasks

Why read this section

When you have several models present simultaneously in the same Cerius2 session, you need to know how to make a model be "current" so you can work with it. You may also want to know how to display one or more models, name models, open a new model space in order to load or build another model, etc.

Finding information

This section includes information on:

Creating, clearing, and deleting model spaces

Specifying the current model

Selecting model spaces

Controlling model visibility and the display mode

Renaming models

Sorting model table entries

The model manager

The model manager is part of the main control panel. When a Cerius2 session is started with an empty model space (the usual default startup), the model manager looks like:

Additional information

Please see the on-screen help for details on the functioning of each control in the model manager.

Creating, clearing, and deleting model spaces

Model spaces are added automatically to accommodate models loaded from files or generated by application modules. For instance, when you use the Load Model control panel to read in a model from disk (Loading model structure files), the model is added by default to a newly created model space or (if it is completely empty) to the current model space.

When do you need to add model spaces?

However, for example, builders have no way of knowing when you may want to start a new model. They therefore assume that you want to continue modifying an existing model until you inform them otherwise.

Creating an empty model space

To add an empty model space, click the add model space tool in the model manager. The new model space's name is added at the bottom of the model table.

Clearing a model space

You may want to replace an existing model with a new one or perhaps realize you've built or loaded an incorrect model. Clearing a model space removes the model but allows its now-empty space to remain in the model manager.

To clear a model space, click the clear model space tool in the model manager. If no model space(s) are selected (Selecting model spaces), the current (Specifying the current model) model space is cleared.

For many models, you can also select (Selecting atoms and groups of atoms) all the atoms of the current model and delete them (Deleting atoms and bonds) to clear the current model space. (Nonatomic information, if any, is not removed by this method.)

Deleting a model space

If you want to delete both the model and the space that contains it, click the delete model space tool in the model manager. If no model space(s) are selected (Selecting model spaces), the current (Specifying the current model) model space is deleted. The last remaining model space cannot be deleted.

Example

A tutorial example of adding and deleting model spaces is found under Managing multiple models.

Specifying the current model

The current model is the one to which display, calculation, file, and other operations are applied.

Setting the current model

To specify that a certain model be current, click the current model indicator (diamond-shaped button) to the left of its name in the model table. The current model is identified by a red diamond; all other diamonds are greyed out.

Alternatively, you can press <Ctrl> on the keyboard and click any atom in the desired model with the left mouse button.

The current model is always visible in the model window, as the only model in the model window, in the lower left corner of a multi-paned model window displaying many models in grid or border mode (Controlling model visibility and the display mode), or as one of the models displayed in overlay mode (Controlling model visibility and the display mode).

Example

A tutorial example of handling multiple models is found under Managing multiple models.

Selecting model spaces

You can select one or more model spacess:

Selecting models

To select model spaces, click the model ID number(s) in the model table, using the left mouse button. A single click selects only one model. You can select more than one model or change what is selected:

The mouse button and keyboard combinations for selecting and deselecting model names (which are the same as for selecting filenames from file selector list boxes in control panels) are described under Mouse actions. Mouse operations are also described in the on-screen help (see On-screen help) for the model manager.

Controlling model visibility and the display mode

When you have several models in your Cerius2 session, you may want to view only the current model, or you may also want to view one or more of the noncurrent models. You may display them in individual model window panes or overlay them all in the main model window.

Which models are visible

Use the visibility indicators (square buttons) to the right of the model names to control which models are visible.

You can also:

and/or:

The current model is always (implicitly) visible, and its colored visibility indicator looks flat by default. To make it remain explicitly visible even after some other model is made current, click its visibility indicator so that it appears pyramidal.

How they are displayed

The overlay mode, grid mode, and border mode display tools control how the model spaces are displayed in the model window:

Examples

A tutorial example of handling multiple models is found under Managing multiple models.

The following picture shows a model table with one current model that is implicitly visible (ID = 8), several visible models (IDs 4, 5, 7, 8), several invisible models (IDs 6, 9, 10), several selected model spaces (IDs 5, 6, 9), and one model that is being renamed (ID = 10), with scrolling needed to see the whole list):

Renaming models

Newly created empty model spaces are given the name Model#, where # is the serial ID number of the model space. Models loaded from disk into an empty model space are given a name based on the structure file name. If a model has or is given the same name as an existing model, the name is suffixed with _1, _2, _3, etc.

You can rename models by clicking the existing name, then typing a new one and pressing <Enter> (or clicking somewhere else on a control panel).

Example

An example of renaming a model is given under Reading in more models.

Sorting model table entries

To assist you in browsing through the models stored in the model table, the model manager provides four sort-criteria controls. These controls enable you to sort model table entries according to model ID number, current model status, model name, or visibility.

Sorting criteria

To select the criteria by which models in the model table are sorted, select the appropriate control:

Moving models between model spaces

Finding information

This section includes information on:

Copying whole models from one model space to another

Moving parts of models from one model space to another

Copying models to and from other applications

Copying whole models from one model space to another

You can copy the contents of some other model space to the current model space:

Copying to the current model space

The simplest way to copy a whole model to a new model space is to make sure the desired model is current, then select (in order) the Edit/Copy and Edit/Paste menu items. A new model space is created automatically.

If you have the display in border mode (How they are displayed) anyway, make sure the correct model is current (Specifying the current model). Then simply click in empty space within a border pane whose contents you want to copy and drag the cursor into the current model space's display pane (lower left of the model manager). (Clicking an atom in a border pane selects that atom, Selecting atoms in several models.)

You can also select all atoms in a model and use cut (or copy) and paste (Moving parts of models from one model space to another) to move entire sets of atoms from one space to another. (Nonatomic information, if any, is not copied by this method.)

Example

A tutorial example of copying model-space contents from one space to another can be found under Copying models from one model space to another.

Moving parts of models from one model space to another

You can also copy or move parts of models from one model space to another (or within the same model space) using atom selection (Selecting atoms and groups of atoms) and editing techniques (for how to specify the current model, see Specifying the current model):

Important

In addition to the selected atoms, any bonds and hydrogen bonds between the selected atoms and linkages on selected atoms are copied into the paste buffer. Other information, such as monitors and subunit or chain information (if present) is not copied into the paste buffer.  

Copying models to and from other applications

The cut- or copy-and-paste operations described in the previous section make use of your computer's clipboard. Thus, applications that can work with information stored in the system clipboard can make use of these structural elements (as does Cerius2). This enables you to cut and paste structural elements back and forth between Cerius2 and other applications such as Insight® II, ISIS/Draw, ChemDraw, Catalyst®, and Open Inventor-based applications on SGI systems that have the Molecular Inventor Execution-Only Environment (molinv_eoe) installed. However, other applications may not be able to use all the information associated with Cerius2 structural elements.

Timeout period

Transferring large models between Cerius2 and other applications can take up to a minute or more. Cerius2 is configured to wait up to 3 min for information pasted from other applications to complete transfer. However, transferring large models or structural elements from Cerius2 to other applications may fail if the other application's timeout value is not increased. The default timeout period for most applications' paste operations is 5-30 s, depending on the operating system. If you have problems pasting large models from Cerius2 to other compatible programs, you can usually increase the other application's timeout value by adding an entry to the .Xdefaults file in your home directory. For example, to increase the timeout value for SGI's InPerson application add the following entry:


InPerson*selectionTimeout:       180000

This changes the default selection timeout value to 180000 ms (3 min). The default value for Cerius2 is 180000, but you can also change it in your .Xdefaults file, using this format:


Cerius2*selectionTImeout:       180000


Saving model structure files

Why read this section

This section tells you how to save one or more models that are in your current Cerius2 session, to store them on disk. You will probably want to save models that you have built or modified and may want to use again. You should save your model before running any calculation or performing other activities that might change its conformation, if the original conformation of your model is important.

Finding information

This section includes information on:

Saving individual models

Saving all models

Related information

Building models is explained in Building Models and demonstrated in Introducing Cerius2. Loading models is discussed under Loading model structure files. File formats are presented in File Formats.

You should already know...

The basics of starting Cerius2 and using its interface are demonstrated in Introducing Cerius2 and described in The Cerius2 Interface.

Use of the file selection list box and other file selector controls to navigate the directory structure is presented in detail under Finding model file(s).

How to make a model be the current one is described under Basic model management tasks.

Saving individual models

Making custom directories

You may want to create your own directories or subdirectories in which to save models. For example, you may want to save models relating to a specific project together or save related models as a database.

To do so, go to a UNIX shell window (not the one from which you are currently running Cerius2), cd to the desired parent directory, and create your subdirectory with the UNIX mkdir command. (This can be done at any time.) For example:


>	cd ~/CeriusRuns

>	mkdir myModels
Alternatively, you can use the the text window and prefix a ! to the UNIX commands (Text window).

Saving the current model

Select the File/Save Model... menu item (from the main control panel's menu bar) to access the Save Model control panel. This control panel is used to save the current (Basic model management tasks) model.

Use the file selector controls in the Save Model control panel to move through the file system to the directory in which you want to save the current model. (Newly created directories appear in the file selector list box when the appropriate parent directory is opened or reopened with the file selector controls or when the control panel is opened.)

After selecting the appropriate directory, specify a name for the structure file by typing that name in the file name entry box, then press <Enter> or click the SAVE button.

A warning helps prevent you from accidentally overwriting existing structure files. (You may choose and enter an existing filename if you want to overwrite an existing structure file.)

Example

A tutorial example of saving one model is given on Saving a model.

Additional controls

You can save files in a non-Cerius2 format. Some formats allow a choice of formatting options. To set them, click the Preferences... pushbutton to accesses the Save Preferences control panel. The controls displayed in this panel depend on what the Save format popup in the Save Model control panel is set to.

Saving part of a model

If you want to save only part of a model, select the desired part (Selecting atoms and groups of atoms), cut or copy it and paste it into a new model space (Moving parts of models from one model space to another), and save the new model.

Additional information

Please see the on-screen help for details on the functioning of each control in the Save Model control panel and the Save Preferences control panel.

What is saved as a model

Model data that can be saved to file include atom coordinates (Cartesian, fractional, or internal), element type, charge, bonding connectivity, crystal unit cell, crystal symmetry, occupancy, and temperature factors. The exact combinations depend on the format you select from the Save Format popup in the Save Model control panel. The default MSI file format holds all model data.

File formats

Cerius2 has its own model-file format (.msi format) capable of storing every detail of any model in the Cerius2 modeling environment. You should always store your model files using the .msi format unless you want to exchange them with databases, other molecular modeling applications, or your own programs.

Many file formats besides the .msi format (see File Formats) can be written if you need to transfer model files to other programs or databases. However, transfer of all model data cannot be guaranteed when writing files that are not in .msi format.

Saving all models

To conveniently save all models in the current session, save the session rather than its individual models (Saving the current session).


Working with Cerius2 sessions

Why read this section

This section tells you what Cerius2 sessions are and how to start, resume, and save them. It is useful if you, for example, want to:

Finding information

This section includes information on:

Starting a new session

Saving the current session

Loading a previously saved session

Using saved sessions as preferences settings

You should already know...

The basics of starting Cerius2 and using its interface are demonstrated in Introducing Cerius2 and described in The Cerius2 Interface.

Use of the file selection list box and other file selector controls to navigate the directory structure is presented in detail under Finding model file(s).

What is a session?

A Cerius2 session consists of all the models and data with which you are currently working, as well as application preferences that you have specified.

Starting a new session

Reinitializing Cerius2

To start a new session, select the File/New Session menu item. Clicking Confirm in the message window that appears reinitializes Cerius2, which is equivalent to quitting and restarting Cerius2.

Important

All unsaved models and data are lost when you start a new session, and settings in control panels are returned to their defaults.  

Saving the current session

You can save the current Cerius2 session at any time. After you do so, you can then resume that session at some later time (as described under Loading a previously saved session), either later while you are still running Cerius2 or after exiting and restarting Cerius2.

Making custom directories

You may want to create your own directory or subdirectory in which to save your session.

To do so, go to a UNIX shell window (not the one from which you are currently running Cerius2), cd to the desired parent directory, and create your subdirectory with the UNIX mkdir command. (This can be done at any time.) For example:


>	cd ~/CeriusRuns

>	mkdir tutorialSession
Saving the current session

Select the File/Save Session... menu item (from the main control panel's menu bar) to access the Save Session control panel. This control panel is used to save the current session.

Use the file selector controls in the Save Session control panel to move through the file system to the directory in which you want to save the current model. (Newly created directories appear in the file selector list box when the appropriate parent directory is opened or reopened with the file selector controls or when the control panel is opened.)

After selecting the appropriate directory, specify a name for the session file by typing that name in the file name text entry box, then press <Enter> or click the SAVE button.

A warning helps prevent you from accidentally overwriting existing session and model files. (You may choose and enter an existing filename if you want to overwrite an existing session file.)

What is saved as a session

A saved session consists of a session file (.mss file extension) and a set of standard MSI-format structure (model) files. When you save a session, one model is written in the specified directory for each occupied model space. The session file contains application preferences, customizations, any cross-model linkages, and references to the saved structure files.

Related information

Saving individual models is described in Saving model structure files.

Loading a previously saved session

You can resume a previously saved Cerius2 session at any time.

What resuming a session does

When you load a saved session, the current session is reinitialized (i.e., unsaved models and data are lost and settings return to their defaults), all models referenced by the resumed-session file are loaded into model spaces, and application preferences are set to the values indicated in the resumed-session file.

Resuming a session

Select the File/Load Session... menu item (from the main control panel's menu bar) to access the Load Session control panel. This control panel is used to load the session you want to resume.

Use the file selector controls in the Load Session control panel to move through the directory system to find the session you want to resume.

Either double-click the name of the desired session file or select the desired session file and click the LOAD button. You can also enter its name in the session name text entry box.

Important

Any unsaved models and data in your current session are lost when you resume a saved session, and settings in control panels are returned to the values (if any) set in the resumed-session file or to their defaults.  

What next?

You can now resume work from the point at which you saved the session you just loaded.

Related information

Loading individual models is described in Loading model structure files.

Using saved sessions as preferences settings

If you often need to change many settings before starting your work, you can load only the application preferences from a saved session file.

Saving preferences in a session file

Nondefault application settings are saved when you save a session (What is saved as a session). (However, not all applications save all nondefault control settings when a session is saved.)

You may want to start up one of your typical sessions by changing all settings as desired, in the absence of any models. Then you can save this "empty" session.

Although you can load only the preferences from any session file, saving an empty session may, depending on how you work, decrease disk space requirements.

Loading only preferences from a saved session

Before loading or building any models, load your preferences by:

or:

Warning

Loading an empty session file or loading only the preferences from any session file removes all models and associated data from your current session. Therefore, you need to load the session file before building or loading any models.  

Related information

Information on controlling Cerius2 from prerecorded command scripts is given in Controlling Cerius2 from scripts.

Other customization activities are covered in Customizing the Interface.




Last updated April 08, 1999 at 05:05PM Pacific Daylight Time.
Copyright © 1999, Molecular Simulations Inc. All rights reserved.