CIF (.cif)

- Import supports Version 1.1 of the CIF format.
Background & Context
 
   - 
      - MIME type: chemical/x-cif
- 3D molecular model file.
- Used in cheminformatics applications and on the web for storing and exchanging molecule models.
- CIF is an acronym for Crystallographic Information File and Crystallographic Information Framework.
 - Plain text format.
- Extensible self-describing format.
- Developed in 1991 by the International Union of Crystallography.
 
Import
 
   - Import["file.cif"] reads a CIF file and returns its contents as a nested Association.
- Import["file.cif",elem] imports the specified element from a CIF file.
- Import["file.cif",{{elem1,elem2,…}}] imports multiple elements.
- The import format can be specified with Import["file","CIF"] or Import["file",{"CIF",elem,…}].
- See the following reference pages for full general information:
- 
      
      Import import from a file CloudImport import from a cloud object ImportString import from a string ImportByteArray import from a byte array 
Import Elements
 
   - General Import elements:
- 
      
      "Elements" list of elements and options available in this file "Summary" summary of the file "Rules" list of rules for all available elements 
- Data representation elements:
- 
      
      "Data" numerical and textual data, given as a nested Association "Comments" user comments as a list of strings "Molecule" a symbolic representation of the molecule model 
- Import uses the "Data" element by default for the CIF format.
- A "CIF" file consists of one or more named data blocks. The names of the data blocks are the keys of the imported Association.
- Each data block contains named data items, which can be numbers, strings or lists thereof. Each block is represented in the Wolfram Language as an Association.
- It is common for a "CIF" file to only have one data block.
History
Introduced in 2008 (7.0) | Updated in 2025 (14.2)