How to open .CIF files on Linux

To open .CIF files on Linux, use Open Babel to open/convert .cif files (it supports CIF read/write).

Step-by-step instructions

  1. Use Open Babel to open/convert .cif files (it supports CIF read/write).
  2. If a viewer you use refuses the file, check whether the CIF is valid against IUCr syntax/specification and correct formatting issues before retrying.
  3. If you have Wolfram Language installed, import the .cif using its CIF format support.

Alternative methods

  • Open .CIF in a browser-based viewer if desktop apps fail.
  • Try opening .CIF on Linux with a secondary app to rule out app-specific issues.
  • Convert .CIF only with trusted tools when direct opening is not possible.

Common issues

Mercury (or another viewer) will not read the CIF

Many CIF readers are strict: small syntax errors, malformed loops, missing required items, or nonstandard formatting can cause import to fail.

  1. Open the file in a CIF editor/validator (CCDC suggests enCIFer) and correct any reported issues.
  2. If you received the file via email/web download, re-download it to ensure it is complete and not truncated.
  3. If needed, try parsing/converting the file with Open Babel to confirm it is readable and to produce a cleaned output.

The file opens as plain text and looks “unreadable”

CIF is a text-based interchange format; without a crystallography-aware app you will see tags, loops, and numeric tables rather than a 3D structure view.

  1. Open the .cif in a CIF-capable viewer/editor (for example, Mercury) to visualize structures and metadata.
  2. If your goal is conversion, use Open Babel to write the data into a format your target tool accepts.

Wrong file association (double-click opens the wrong app)

Your OS may associate .cif with a generic editor or an unrelated program, preventing the expected crystallography workflow.

  1. Use “Open with” and select a CIF-capable program (for example, Mercury) for this file.
  2. Optionally set the chosen program as the default for .cif files so future double-clicks open correctly.

Data appears incomplete or missing after import

A CIF may omit certain data items, use a different dictionary context, or contain only partial information expected by a specific tool or workflow.

  1. Check the CIF against IUCr CIF specifications to understand which data items are present/required for your use case.
  2. Ask the source for a complete/exported CIF intended for interchange (rather than an internal or partial export).

Security note

CIF files are usually plain-text scientific data (not a script format), but they should still be treated as untrusted input because complex file parsers can have vulnerabilities; prefer opening unknown CIFs in well-maintained scientific tools and keep them updated.

Back to .CIF extension page