Crystal Impact Home  
  About version 5 New functions Feature tour Download  

Diamond Version 5 User Manual: Structure files

Opening and importing structure files

In this article:
Opening structure files
Multiple structure descriptions in one file
Importing data from a file
Loading another structure from a file
File Import Assistant
Opening a recently used picture

Previous article: File formats
Next article: Inserting structure data into a document


Overview

Both Diamond's native data as well as foreign formats are opened in principally the same way. The automatic file type recognition of Diamond decides whether the structural data need to be converted. For details which foreign file formats are supported by Diamond in what way, see the article "File formats". For more informations how files can be opened in Diamond, see "Opening Structure Files".

An alternative to open the whole file content as Diamond document is to import data from a file. This is especially useful, if the file is a non-Diamond (foreign) format and contains more than one structure data set. Then you create a Diamond document that is blank at the beginning (no structures, no pictures) and import only the structure data set(s) of interest into the Diamond document.

If a data file contains descriptions of more than one (crystal) structure only, a list of all descriptions in that file is offered, where you can select one or more structures to open. Read the article "Multiple Structure Descriptions in One File" how to proceed.

An optional File Import Assistant can guide you step-by-step through file format recognition and conversion and if and how to create structure pictures.

You can re-open recently opened files or re-access recently edited or viewed structure pictures.


Opening structure files

Diamond offers several ways to open a structure file, independent from its file format. "Opening" here means that the entire content of the file is loaded into a Diamond document, whereas there other options (described below) to selectively pick only part of structure data from a file into a Diamond document.

Using the File Open dialog

The usual way to open a file in Diamond - as in common MS Windows applications - is to use the File Open dialog. This dialog is opened by

·       choosing the Open command from the File menu,

·       pressing the key combination ("hotkey") Ctrl+O,

·       or by pushing the (here: red marked) button in the standard toolbar: File Open toolbar button

In the File Open dialog, you can change to other directories or (network) drives and even rename files or create new subdirectories. The File formats combo box can be used to select files with specific extensions only (e.g. "CIF").

Using the Recent File List
Previously opened files are stored in the "Recent File List". You will find a maximum number of eight file names at the bottom of the File menu to get faster access to previously opened files. In the Recent File List, you will also find files which have been saved previously with another name. You can change the maximum number of files in the list of "most recently used files" on the Desktop page of the Options dialog, available from the Tools -> Options command. The default number is eight, the maximum 16.

Using a file name as parameter or
Double-clicking a Diamond structure file

When you start Diamond, you can specify a file name to be opened as first structure document. Normally this method is used indirectly by the Windows Explorer when you double-click a diamdoc file. If Diamond is still running, a second window for that file will be opened.

Using Drag & Drop
You can drag a file from the Explorer or from the list of the Search Files to the desktop of Diamond desktop. This will then automatically open a window with the opened file.

Using the Diamond Start Page
By default, when you start the Diamond application, it comes up with the so-called Start page, presenting a list of recently opened or saved files ("most recently used files") and a list of recently used structure pictures.

Independent from the way you have opened the file, the format will be recognized automatically, and the file will be converted to a temporary Diamond file if needed.

For more informations, how far foreign file formats are supported, read the article "File formats".


Multiple structure descriptions in one file

Diamond documents as well as many of the foreign format structure files may contain data for more than just one (crystal or molecular) structure only. The following screenshot shows the structure list for the sample file "PCD-VxOy.diamdoc" containing 20 structure data sets from "Pearson's Crystal Data", here sorted for space group numbers:

Screenshot of structure list of PCD-VxOy.diamdoc sample file containing 20 compounds

The structure list is shown in the upper part of the Diamond document window and may be collapsed to a structure info bar showing a short summary of the currently selected structure data set only. See also: "The Diamond User Interface".


Importing data from a file

Version 5 of Diamond has new commands Import and Export in the File menu, which complement the Open and Save commands, rsp.

While the several ways to open a file described above open the document entirely, that means all structures and pictures (as far as defined, unlikely when opening a foreign format file), the Import command in the File menu creates an empty document and runs the functionality that is already available from the Insert From File command since version 4. In principle this works like opening the "New Document" dialog by running the command New from the File main menu and there choosing the option "Insert data set(s) from a file".

The import from a file is not limited to a single file but you can choose multiple files to import data from.

In the first step of the Import command, the common Windows File Open dialog (but with title "Import Structures From File") is shown where you choose a file.

After OK, a new blank Diamond document is created and the Insert From File Assistant is called where you confirm the (automatically detected) file format and choose which structure data to import (if there are multiple structure data sets).

The new document will be named with the imported file's title (title.diamdoc). You can change the document name later using the File -> Save Document As command.

The procedure of inserting selected or all data from a file or all data from all (multiple) files is described in the article "Inserting structure data into a document".


Loading another structure from a file

This describes how to load another structure from a file that contains multiple structure descriptions, typically a foreign format file but may be also a Diamond document with multiple structures and pictures.

The other structure can be inserted into the current document using the command Structure -> Insert From File, which is described in the article "Inserting structure data into a document".]

To load the other structure into a new (separate) Diamond document, use the File -> Import command instead (see above).


File Import Assistant

This part of this article describes the (optional) data import assistant, which automatically detects the file format (that you can confirm or change) and guides you through the conversion of the file and offers options if and how to start picture(s) for the imported structure data set(s).

By default this assistant will appear when you open or import data from a foreign-format file. To switch the assistant off (and to run the format recognition automatically and the file conversion in the background), set the checkmark Do not show this assistant again on the last page of the assistant or clear the checkmark Show File Import Assistant on the Assistants page (tab) of the Options dialog (from the Tools menu).

The File Import Assistant uses several pages for the recognition and conversion of the foreign-format data and if and how to create pictures for the converted structure data sets each.

While the first page is just a welcome page, the second page starts an automatic file format recognition and shows the result in the combobox File format as well as the number of structure datasets found in the input file. If the automatic recognition of the format failed or if it chose a wrong format, you can change to a different format from the dropdown list of the combobox.

To start the actual conversion of structure data from the input file using the chosen file format, press the Next button. If there are multiple structure data sets or it is a structure data set with a lot of input parameters, you will likely see the progress window of the file converter. You may cancel the file conversion, if it is too lengthy for you.

Note: This progress window also appears, if you have disabled the File Import Assistant, so you have the chance to cancel the file conversion anyway.

If successfull, the actual file conversion has brought you to the third page of the File Import Assistant, where you define, if to create a picture object for the converted structure data each and if to start from blank pictures or from pictures created automatically or by a user-defined building and design scheme. The advantages of manual, assisted, and automatic picture creation are described in "Automatic vs. manual picture creation" and the following articles.

On the last page of the File Import Assistant you have the chance to switch off the assistant for the next time. If you set the checkmark at Do not show this assistant again, the File Import Assistant will not be used the next time when Diamond needs to convert structure data from a foreign format input file. Instead Diamond will run the format recognition and import of structure data sets automatically. You can reactivate the display of the File Import Assistant any time later on the Assistants page of the Tools/Options dialog.

Press the Finish button to complete the import/conversion of structure data from the input file.


Opening a recently used picture

You can directly open a "recently used" picture. This works in principle like with the "recent file list" described above in Opening Structure Files with the difference that the recently used picture is directly shown in the picture edit view, whereas opening via the recent file list comes up with the picture that was edited or viewed when the file was saved the latest time.

The "recently used pictures" are available from the Recent Pictures buffer window or Recent Pictures table on the Diamond Start Page. More details about accessing recently used pictures can be found in the article "Recent pictures".


Previous article: File formats
Next article: Inserting structure data into a document