12
$\begingroup$

When I open a CIF file of a crystal structure in a typical molecular editor like Avogadro, then I just see a few symmetry-unique atoms scattered around the unit cell. But I don't see the full molecule with all its bonds. What is the easiest way to extract one individual molecular image with all its bonds from a cif file?

The two problems are:

  1. Some atoms are not shown at all if they are not symmetry-unique.
  2. Even if all the atoms are shown, then chemical bonds may go between the images in different unit cells, so that bonds are not properly displayed within the unit cell.

Let me show a screenshot below:

Avogadro screenshot

What I would like to happen is that the part with the orange atoms is moved up one unit cell, so that the carbon atoms attach to the blue nitrogen atoms shown at the top. Similarly all the scattered hydrogens have to be moved to different unit cells so that they attach to the atoms properly. This is clearly not a trivial task but it is something that would be needed whenever a CIF file is opened.

$\endgroup$
2
  • 1
    $\begingroup$ Could you give a link to the CIF file (if it's publicly available)? $\endgroup$
    – marcin
    Jul 22 '20 at 9:54
  • $\begingroup$ See if the VESTA package works. I have noticed that it usually shows atoms from adjacent unit cells to make the bonds visible. $\endgroup$
    – PBH
    Oct 19 at 1:30
11
$\begingroup$

This is due to an unfortunate code-change in some versions of Open Babel. AFAIK, versions 3.0 and later have a heuristic to detect if the CIF contains a molecule, or is a traditional solid-state crystal structure (e.g., NaCl, YBCO, etc.). These versions are used by the latest development versions of Avogadro (1.93 / 1.94 at the moment).

Based on your screenshot, it looks like you're using Avogadro 1.x. There isn't a great way to back-fix this, since I'm not maintaining that code. (I'd much rather just get 2.0 finished and out the door.)

There are two work-arounds:

  • Convert with Open Babel (e.g., CML, MDL, etc.) and read in that
  • Use "fill unit cell" to get all atoms, and build a super-cell if needed.

The patch is here #1823, although it would probably be a pain to apply the patch, rebuild Avogadro 1.x with the older versions of Open Babel it uses, etc.

$\endgroup$
10
$\begingroup$

A command line package I use very often to convert between structure formats (and other things) is c2x. You can download the code from their website, and a quick "c2x --formats" suggests that it supports both cif files and xyz files.

$\endgroup$
1
  • 1
    $\begingroup$ Thanks! I guess this is similar to OpenBabel. What I am wondering is which programs have the specific capability of locating one molecule in a CIF file even if it is distributed among different unit cells in the crystal structure. $\endgroup$
    – Felix
    Jul 21 '20 at 15:54
9
$\begingroup$

I tried out a few programs. It seems like Jmol and Molden do resolve the CIF structure and directly show me one molecule with all its bonds without requiring any further input.

Other programs like Avogadro or a command-line conversion with OpenBabel just produce the raw data of atoms scattered in the unit cell.

$\endgroup$
8
$\begingroup$

If you're not tethered to Avogadro

You can use Mercury to change the system size by going to calculate, packing, and adjusting the cell size.

$\endgroup$
6
$\begingroup$

If one has access to CCDC's Mercury app, the unique molecules (Z') can be easily written as mol2 or xyz files by the Save As option.

Of course, this requires completely written CIF file (with metadata). Often times, some codes lazily output all coordinates in the unit cell.

$\endgroup$
2
  • $\begingroup$ gogo: Our % answered as fallen below 90%, can you turn this comment into an answer please? $\endgroup$ Jul 28 '20 at 0:38
  • 1
    $\begingroup$ Updated the answer, Nike. $\endgroup$
    – gogo
    Aug 12 '20 at 3:07
5
$\begingroup$

In the case of Avogadro, the process is really straightforward. Go to

File -> Save As

In the pop-up window, you can save the data as .xyz or .mol (among many others) types.

$\endgroup$
1
  • 2
    $\begingroup$ Hi, thanks for the quick reply! My problem is: Avogadro just shows me a few symmetry-unique atoms scattered around the unit cell. If I save this as xyz, then I still only have the symmetry unique atoms and I don't see the molecule with all its proper bonds. $\endgroup$
    – Felix
    Jul 21 '20 at 15:04
5
$\begingroup$

If the content of the .cif in question is fairly molecule-like, my recommendation are the cod-tools collection by the Crystallography Open Database. These may be obtained directly from their web site; if you use Debian 10/buster or Ubuntu 18.10LTS and higher, you equally find them in the the repositories (DebiChem tracker).

A typical extraction follows the pattern of

codcif2sdf input.cif > output.sdf

to write a new record (v2000 style). This works quite well, not only for .cif by the COD, but equally from other databases (including .cif the CSD file by CCDC if you forgot the direct export of .mol2 from the database), too. The cod-tools collection shines especially with unit cells of higher space group symmetries where a small number of unique atoms suffice to put the molecule together.

On occasion, an adjustment of bond orders may be necessary; e.g. in triazines like this one by COD where all six aromatic bonds between carbon and nitrogen are as double, instead as an aromatic bond.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.