Organic crystals#

Organic crystals are molecular crystals, such as amino acids, drugs and aromatic hydrocarbons. They load from CIF files like any other crystal, hydrogen atoms included, and work with every simulation. The built-in library has one, Pentacene (C22H14).

This example uses glycine from the Crystallography Open Database (COD), entry 2310002. It builds the structure, as in Inorganic crystals, then simulates Bloch images (Dynamic diffraction (Bloch wave)) down the same axis, [001], at three sample thicknesses:

from pyemaps import Crystal, EMC, showBloch

if __name__ == '__main__':
    gly = Crystal.from_cif('2310002.cif')

    # A 2 x 2 x 1 block of cells, with z along [001] and x along b,
    # perpendicular to it.
    mx = gly.generateMxtal(cellbox=[[0, 0, 0], [2, 2, 1]],
                           xz=[[0, 1, 0], [0, 0, 1]])
    gly.writeXYZ(mx)

    images = gly.generateBloch(disk_size=0.04,
                               sample_thickness=(500, 1500, 500),
                               em_controls=EMC(zone=(0, 0, 1), cl=300))
    showBloch(images)

A molecular crystal’s unit cell is large, so its reflections are close together. A small disk_size keeps the disks apart, and a long camera length (cl, in mm) spreads them over the detector.

Glycine molecules down [001], and Bloch images at 500, 1000 and 1500 Å thick

α-Glycine. Top left: the molecules of the generateMxtal block, completed where the cell edges cut them and drawn as balls and sticks in Jmol’s colors. The others: the Bloch images, with the square root of the intensity shown.#

Paracetamol (COD 2104364, form I), simulated in the same way:

Paracetamol form I down [001], and Bloch images at 500, 1000 and 1500 Å thick

Paracetamol form I. Two of the block’s 16 molecules straddle its corners, with less than half of each inside, and are left out of the drawing.#

The ball-and-stick drawings aren’t made by pyEMAPS. To view a structure in 3D, open its .xyz file in a viewer such as Jmol.