Diamond - How to colorize organic linkers using Copy Style and Paste Style
Diamond can deposit multiple styles of different objects using the command Copy Style from the Edit menu and
transfer ("paste") it to multiple other objects using the Paste Style command.
This article shows how to colorize all atoms of a special molecular fragment including its connecting bonds. This is to emphasize an organic linker in a metal-organic framework (MOF)., here: terephtalic acid.
Note: This requires Diamond version 5.1 or higher.
You can find the sample files here:
COD-1516287-MOF-5-280-K.cif
COD-1516287-MOF-5-280-K-2.diamdoc
COD-1516287-MOF-5-280-K-sky-blue-terephtalate-2.diamdoc
Open the file COD-1516287-MOF-5-280-K-2.diamdoc.
We locate one terephtalic acid fragment in the structure picture where we will copy the style from.
The terephtalic acid fragment in the picture consists of 8 C atoms (where Diamond uses use light grey color by default), 4 H atoms (here: white), and 4 O atoms (here: red).
The 16 bonds are yellow by default. The orientation has been changed from the 001 projection (view along c-axis) to better catch one single terephtalic acid unit by rotation for 45 degrees along the y-axis.
We select the 16 atoms of the terephtalic acid unit. This is done best by capturing them with rectangular selection,
meaning we press down the left mouse button near by one of the fragment's atoms and span a rectangle that includes all atoms and bonds of the fragment.

Alternatively, we can select the atoms of the fragment click by click while holding down the Ctrl key
followed by the new command Select Fragment From Atoms, added in version 5.1 to Diamond (you find it in the Edit -> Extended Selection sub-menu).
We run the command Display -> Atom Designs.
Diamond prompts us to choose to edit the designs of the 16 atom or to edit the the atom group and sites designs. We choose to edit the (individual) designs of the (16) selected atoms.
In the Atom Design dialog we change the fill color (this button is indeterminate because the 16 atoms use different fill colors) to sky blue and confirm with OK.
We repeat this for the 16 bonds using Display -> Bond and Contact Designs (in the prompt, choose for the 16 bonds) and change the bond fill color to sky blue, too.
Now that the 16 selected atoms and 16 selected bonds are all sky blue, we run the command Edit -> Copy Style.
This will show us a small popup window that one atom design and one bond design have been deposited (for use with Paste Style):
We use the new command Edit -> Extended Selection -> Select Symmetry-Related to mark all atoms and bonds
of the remaining terephtalic acid units in the picture that are symmetry-related to the currently selected one as selected:
We finally use the Edit -> Paste Style command to turn all C, H, and O atoms including the bonds between of all terephtalic acid units in the picture to sky blue.
Another popup window informs us which objects (here: atoms and bonds) and how many of them have changed their designs:
After clicking anywhere in the picture (or via Edit -> Unselect), we remove all selection markers.
The oxygen atom in the center of the inorganic building unit remains red, and the polyhedra remain unchanged, too:
|