teaching and education\(\def\hfill{\hskip 5em}\def\hfil{\hskip 3em}\def\eqno#1{\hfil {#1}}\)

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767

EwaldSphere: an interactive approach to teaching the Ewald sphere construction

CROSSMARK_Color_square_no_text.svg

aDepartment of Chemistry and Polymer Science, University of Stellenbosch, Matieland, 7600, South Africa
*Correspondence e-mail: ljb@sun.ac.za

Edited by J. M. García-Ruiz, Instituto Andaluz de Ciencias de la Tierra, Granada, Spain (Received 2 August 2018; accepted 12 September 2018; online 11 October 2018)

EwaldSphere is a Microsoft Windows computer program that superimposes the Ewald sphere construction onto a small-molecule single-crystal X-ray diffractometer. The main objective of the software is to facilitate teaching of the Ewald sphere construction by depicting our classical description of the X-ray diffraction process as a three-dimensional model that can be explored interactively. Several features of the program are also useful for introducing students to the operation of a diffractometer. EwaldSphere creates a virtual reciprocal lattice based on user-defined unit-cell parameters. The Ewald sphere construction is then rendered visible, and the user can explore the effects of changing various diffractometer parameters (e.g. X-ray wavelength and intensity, goniometer angles, and detector distance) on the resulting diffraction pattern as captured by a virtual area detector. Additional digital resources are provided, including a simple but comprehensive program manual, a PowerPoint presentation that introduces the essential concepts, and an Excel file to facilitate calculation of lattice dhk spacings (required for the presentation). The program and accompanying resources are provided free of charge, and there are no restrictions on their use.

1. Introduction

Directly upon learning of von Laue's ground-breaking discovery of X-ray diffraction by crystals (Friedrich et al., 1912[Friedrich, W., Knipping, P. & Laue, M. (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 303-322.]; von Laue, 1912[Laue, M. von (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 363-373.]), Ewald devised the concept of the reciprocal lattice and introduced a relatively simple construction based on the `sphere of reflection' (Ewald, 1913[Ewald, P. P. (1913). Phys. Z. 14, 465-472.], 1969[Ewald, P. P. (1969). Acta Cryst. A25, 103-108.]). The Ewald sphere construction is still the standard model employed by most crystallographers to visualize the geometry of a diffraction experiment. Despite its simplicity, the Ewald sphere construction, as it pertains to a real-world diffraction experiment, is difficult to teach in a way that students do not find intimidating. This is because the fundamental concepts such as lattice planes and Miller indices, the Bragg construction, the reciprocal lattice, and the Ewald sphere construction are generally described in two dimensions, and it is left to the student to extrapolate to the third dimension.

A solid grasp of the three-dimensional Ewald sphere construction is essential to any crystallographer's understanding of a diffraction experiment. Ideally, it should be possible for the crystallographer to observe an experiment while envisaging the geometrical models that we use to explain diffraction; these are difficult to visualize because (i) the constructions are hypothetical and (ii) X-rays are invisible to the human eye. While it is relatively easy to locate two-dimensional descriptions of the Ewald sphere construction in books and on numerous web sites, the author is aware of only two resources that illustrate the concept dynamically in three dimensions. One of these consists of a short animation of a reciprocal lattice rotating through a semi-transparent Ewald sphere; the video is available on the web sites of the Spanish National Research Council (https://www.xtal.iqfr.csic.es/Cristalografia/index-en.html) and the Laboratory of Crystallography (https://escher.epfl.ch/), which are excellent repositories of various digital teaching aids for crystallography. The other is the cross-platform interactive program XrayView (Phillips, 1995[Phillips, G. N. (1995). Biophys. J. 69, 1281-1283.]), which is designed to teach several basic concepts of X-ray diffraction by crystals, particularly to macromolecular crystallographers.

EwaldSphere was developed to teach the three-dimensional Ewald sphere construction to chemical (i.e. small-molecule) crystallographers. In particular, the program superimposes the Ewald sphere on a virtual model of a small-molecule X-ray diffractometer. Moreover, the program is highly interactive, thus allowing the user to explore the relationship between experimental settings and the resulting diffraction pattern.

2. Assumed prior knowledge

Ideally, before using the software the student should first be introduced to several basic concepts such as unit cells, lattice planes and Miller indices, the Bragg construction/equation, the geometrical relationship between the `real-space' lattice and the reciprocal lattice, and the Ewald sphere construction. Although numerous other sources are available to explain these concepts, the author has created a PowerPoint file (EwaldSphere.pptx) containing suitable introductory material as a preamble to using the software. Where necessary, each slide is accompanied by explanatory notes for the presenter. Owing to the constraints inherent to the use of static projections, the PowerPoint file presents simple two-dimensional explanations of the Bragg equation, the reciprocal lattice and the Ewald (circle) construction. This approach provides adequate preparation for subsequent exploration of the concepts in three-dimensional space by using the EwaldSphere program interactively – i.e. the primary intended purpose of the software.

2.1. The Bragg construction/equation

Familiarity with lattice planes and Miller indices is assumed. It is important for the student to understand that, for diffraction to occur for a particular family of lattice planes, a distinct geometrical relationship must exist between the radiation wavelength, the spacing between successive planes and the angle of incidence, as embodied by the Bragg equation (Slide 2).

2.2. Construction of a two-dimensional reciprocal lattice

This sequence of slides (Slides 2–11) guides the student through the construction of a reciprocal lattice that corresponds to a `real-space' two-dimensional unit cell with dimensions a = 8 Å, b = 6 Å and γ = 110°. The two diagrams are superimposed, sharing a common origin (i.e. the unit-cell origin), and drawn using scales of 1 cm Å−1 for `real space' and 25 cm Å for reciprocal space. Each student should be provided with a sheet of paper (A3 or similar), a pencil, an eraser, a ruler and a protractor. By design, this process is time consuming and somewhat tedious in order to reinforce the following `take home' aspects of the geometrical relationship between the `real-space' and reciprocal-space lattices (Slide 12):

(1) As constructed, the reciprocal lattice is indeed a repeating arrangement of points.

(2) There is a well defined geometrical relationship between the `real-space' lattice and the reciprocal-space lattice.

(3) The reciprocal-lattice points [\bar h \bar k \bar l] are related to hkl by inversion through the origin.

(4) Each reciprocal-lattice point hkl is placed on a vector that emanates from the origin in a direction perpendicular to the (hkl) `real-space' plane, and at a distance of 1/dhk from the origin.

(5) The scale used to draw the reciprocal lattice can be selected arbitrarily (i.e. does not need to have a special relationship to the scale used for the `real-space' lattice).

2.3. The Ewald construction in two dimensions

Slides 15–22 of the PowerPoint file are devoted to showing the Ewald circle (a sphere when the concept is extended to three dimensions) construction in a stepwise progression in complexity. The construction consists of two diagrams that are superimposed: one shows tangible objects in `real space' while the other represents reciprocal-space components, which are hypothetical. An arbitrary scale can be selected for each of these two diagrams of the construction. The following aspects are critical to understanding the construction:

(1) A circle of radius λ−1 is drawn with the crystal at its centre (Slide 15).

(2) The incident beam passes through the centre of the circle (Slide 16).

(3) The origin of the reciprocal lattice is placed where the beam exits the circle (Slide 17).

(4) The orientation of the reciprocal lattice is coupled to the orientation of the crystal, as delineated in §2.2[link] above (Slide 18). Rotation of the crystal about the centre of the Ewald circle results in an equivalent rotation of the reciprocal lattice about the reciprocal-lattice origin (Slide 19).

(5) When the crystal is oriented such that a reciprocal-lattice point hk intersects the Ewald circle (Slide 20), the Bragg equation is satisfied for the set of lattice lines (planes in three dimensions) (hk) oriented at an angle θ relative to the incident beam. By definition, these lattice lines (hk) are perpendicular to the vector from the origin of the reciprocal lattice to the reciprocal lattice point hk.

(6) Since the Bragg construction is satisfied for the lattice lines (hk), a diffracted beam emanating from the crystal will pass through the lattice point hk (Slide 21). For a given orientation of the crystal, it is possible that several reciprocal lattice points may satisfy the Bragg equation simultaneously, thus giving rise to multiple spots on the recorded image (Slide 22).

(7) It follows that the reciprocal lattice can be detected by gradually rotating the crystal, thus sweeping the reciprocal lattice through the Ewald circle (provided that the detector is suitably positioned to record each diffracted beam).

3. The EwaldSphere program

The program consists of a single Windows-compatible executable file named EwaldSphere.exe. It presents the user with a scaled OpenGL (https://www.opengl.org/) model of a first-generation Bruker SMART 1000 single-crystal X-ray diffractometer (utilizing a three-axis `platform' goniometer). The scene can be rotated about the position of the crystal and zoomed using the left and right mouse buttons, respectively. Although the primary objective of the software is to simulate the Ewald sphere construction, it can also be used to demonstrate some aspects of using a diffractometer. Since the functions of all of the controls are described in the comprehensive manual, only some of the more salient features of the program are discussed below. A screen capture of the program window is shown in Fig. 1[link].

[Figure 1]
Figure 1
The main window of EwaldSphere, showing a `real-space' model of a three-circle diffractometer on which is superimposed the reciprocal-space model of the Ewald sphere construction. The user can interact with the program by changing various parameters that are available via the main menu (top), the crystal centring control panel (left) and the instrument settings control panel (bottom).

3.1. Crystal centring

The collapsible control panel at the left-hand side of the main window can be used to centre the crystal. A small image of the crystal is shown at the top of the panel, providing the user with a `live' camera view. By default, the crystal is not centred, thus allowing the user to practice and understand the centring process by adjusting the goniometer head; realistic features such as lighting and camera zoom settings are available. Proper simulation of the Ewald sphere construction does not depend on the crystal being centred.

3.2. The program menu

The main menu of the program provides access to three simple dialogue boxes (Fig. 2[link]).

[Figure 2]
Figure 2
Dialogue boxes that can be accessed using the `Tools' menu.
3.2.1. Options

Miscellaneous options can be selected using the `Options' dialogue box (Fig. 2[link]a). The default X-ray beam is 0.5 mm in diameter and the default crystal is smaller than the beam in all dimensions. While these values are true to scale, they make it difficult to see much detail in the region of the crystal, even at maximum magnification of the scene. Unchecking `Realistic Beam' magnifies the beam diameter and crystal dimensions by a factor of 5. The crystal can be elongated to approximate a needle shape, which is useful to demonstrate that certain settings of the goniometer angles can result in parts of the crystal not being irradiated.

3.2.2. Define crystal

A reciprocal lattice needs to be created before any diffraction can occur. The `Reciprocal Lattice' dialogue box (Fig. 2[link]b) allows the user to enter values for the six `real-space' unit-cell parameters, as well as a data resolution limit. When the `Update R.L.' button is pressed, an array of spherical reciprocal lattice points is created for the unit cell as defined. The extent of the array is confined to the resolution limit and the spherical `reflections' are created according to the following criteria: (i) intensities (radii) are assigned randomly, but decrease as a function of resolution, (ii) the Laue symmetry is only centrosymmetric and (iii) there are no systematic absences. Moreover, the orientation of the crystal is randomized relative to the coordinate system of the diffractometer. It should be self-evident that defining a large unit cell or a low resolution limit will result in the creation of many reciprocal lattice points, which is likely to place a significant demand on the computer's graphics resources (and the user's patience).

3.2.3. Automate sweep

The `Automate Single Sweep' dialogue box (Fig. 2[link]c) allows the user to enter initial values for the three goniometer axes, the detector distance, the type of scan (omega or phi), the number of frames and a step angle. When the `GO!' button is pressed, the virtual instrument will execute an automated sweep of the reciprocal lattice through the Ewald sphere. First, the goniometer will be initialized to the selected starting values, and then the predetermined number of frames will be generated at intervals fixed by the frame time (milliseconds rather than seconds, unless the user is very patient). Depending on the type of scan selected, the angle of the relevant goniometer axis will be incremented by the step size between frames. Note that a typical diffraction experiment involves sweeping the scan axis through the Ewald sphere by the step angle during exposure. This type of sweep is not implemented by EwaldSphere – the scan axis is stationery during the generation of the diffraction image.

3.3. Goniometer controls

The three goniometer axes can be manipulated using the slider controls. There is no collision detection and all hypothetical positions of the axes can therefore be accessed.

3.4. Detector settings

The detector is visible by default, but it can be hidden in order to reduce clutter during a demonstration of the Ewald sphere. The distance of the detector (i.e. the phosphor) from the crystal is adjustable from 0 to 20 cm. The frame representing the current image can be displayed in a separate window (Fig. 3[link]), which can be scaled down to reduce on-screen clutter. Controls are also available to erase a frame and to change the background colour of the image.

[Figure 3]
Figure 3
An example of a simulated frame image.

3.5. X-ray source

The X-ray source and collimator are visible by default but, similarly to the detector and video camera, can be hidden to reduce clutter. Opening the shutter will cause the beam to appear from the end of the collimator, but no diffraction will be evident until a unit cell has been defined (see §3.2.2[link] above). If the shutter is open and a unit cell has been defined, the reciprocal lattice will be visible. Reciprocal lattice points that satisfy Bragg's equation according to the Ewald sphere construction will yield colour-coded diffracted rays emanating from the crystal; those that strike the phosphor of the detector are green, while those that are not detected are red. The thickness of a diffracted ray is proportional to its intensity, which is a function of (i) the beam intensity, (ii) the radius of the reciprocal lattice point, and (iii) the amount of overlap between the reciprocal lattice point and the Ewald sphere. Once a reciprocal lattice point has been detected, it becomes red and remains so until the colours are reset (either using the `Options' dialogue, or when a data sweep is implemented). Unless the `Keep Shutter Open' checkbox is checked, a new frame image is created whenever one of the goniometer angles is changed, when the detector distance is adjusted, or when the radiation wavelength or intensity is changed. At any stage, the radiation wavelength can be changed continuously from 0.1 to 4.0 Å, or the user can select standard wavelengths for Ag, Mo (default), Cu, Co, Fe or Cr sources. This functionality is particularly useful for illustrating the effect of wavelength on the diffraction angles and data resolution.

3.6. Ewald sphere

The Ewald sphere can be shown or hidden (default), and its colour and transparency level can be customized. It can also be scaled; changing the scale of the Ewald sphere changes the scale of the reciprocal-space component of the simulation (i.e. the reciprocal lattice is scaled accordingly, and its origin remains at the point where the beam exits the sphere). Rescaling the Ewald sphere demonstrates that the scale selected for the reciprocal-space component can be arbitrary and does not affect the angular components of the diffraction geometry.

4. Limitations of the program

Regarding the limitations of EwaldSphere, the reader is reminded that the primary function of the software is to teach the Ewald sphere construction and that faithful simulation of a diffractometer is a secondary priority. Most of the limitations of the software are related to the latter, and some are listed below:

(1) EwaldSphere was first developed in 2001 and is based on a diffractometer equipped with a three-axis platform-style goniometer, which was the only instrument available to the author for precise measurements at that time. As yet, the program does not simulate conventional four-circle or kappa instruments.

(2) When simulating X-ray diffraction, rotation of a scene using the mouse can be slow for some computers with limited three-dimensional graphics capability; this is due to simultaneous rendering of two scenes (i.e. the main scene and the video camera view). The solution is either to hide the video camera or to collapse the control panel on the left-hand side of the window.

(3) EwaldSphere does not simulate realistic phenomena such as distortion of spots, absorption effects, wavelength dependence of beam intensity, beam-stop shadow or collisions.

(4) Collision limits are not implemented, but this is not a serious issue for a virtual instrument.

(5) The data sweep is simple and does not provide for multiple scans.

(6) The reciprocal lattice is not swept through the Ewald sphere for each individual frame during data collection.

5. Obtaining the resources online

Four files are available as a package for teaching the Ewald sphere construction. These are (i) the executable program (EwaldSphere.exe), (ii) the program manual (EwaldSphere.pdf), (iii) the PowerPoint file (EwaldSphere.pptx) and (iv) an Excel file for calculating d spacings (d-Spacing.xlsx), as outlined in the PowerPoint presentation. These files can be downloaded separately from the web site https://academic.sun.ac.za/barbour/Software.html.

6. Future outlook

It is likely that EwaldSphere will undergo further development based on suggestions by users. Future additions to the program could also include addressing the issues listed in §4[link].

Acknowledgements

The author acknowledges Ilia Guzei and Travis Holman for several useful suggestions over many years of development. There are no conflicts of interest to declare.

References

First citationEwald, P. P. (1913). Phys. Z. 14, 465–472.  CAS Google Scholar
First citationEwald, P. P. (1969). Acta Cryst. A25, 103–108.  CrossRef IUCr Journals Web of Science Google Scholar
First citationFriedrich, W., Knipping, P. & Laue, M. (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 303–322.  Google Scholar
First citationLaue, M. von (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 363–373.  Google Scholar
First citationPhillips, G. N. (1995). Biophys. J. 69, 1281–1283.  CrossRef CAS PubMed Web of Science Google Scholar

© International Union of Crystallography. Prior permission is not required to reproduce short quotations, tables and figures from this article, provided the original authors and source are cited. For more information, click here.

Journal logoJOURNAL OF
APPLIED
CRYSTALLOGRAPHY
ISSN: 1600-5767
Follow J. Appl. Cryst.
Sign up for e-alerts
Follow J. Appl. Cryst. on Twitter
Follow us on facebook
Sign up for RSS feeds