teaching and education
EwaldSphere: an interactive approach to teaching the construction
aDepartment of Chemistry and Polymer Science, University of Stellenbosch, Matieland, 7600, South Africa
*Correspondence e-mail: ljb@sun.ac.za
EwaldSphere is a Microsoft Windows computer program that superimposes the construction onto a small-molecule single-crystal X-ray diffractometer. The main objective of the software is to facilitate teaching of the 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 based on user-defined unit-cell parameters. The 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; von Laue, 1912), Ewald devised the concept of the and introduced a relatively simple construction based on the `sphere of reflection' (Ewald, 1913, 1969). The construction is still the standard model employed by most crystallographers to visualize the geometry of a diffraction experiment. Despite its simplicity, the 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 the Bragg construction, the and the 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 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), which is designed to teach several basic concepts of X-ray diffraction by crystals, particularly to macromolecular crystallographers.
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 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 rotating through a semi-transparent the video is available on the web sites of the Spanish National Research Council (EwaldSphere was developed to teach the three-dimensional construction to chemical (i.e. small-molecule) crystallographers. In particular, the program superimposes the 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 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 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.
the Bragg construction/equation, the geometrical relationship between the `real-space' lattice and the and the construction. Although numerous other sources are available to explain these concepts, the author has created a2.1. The Bragg construction/equation
Familiarity with lattice planes and
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 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 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):
that corresponds to a `real-space' two-dimensional with dimensions(1) As constructed, the
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 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 i.e. does not need to have a special relationship to the scale used for the `real-space' lattice).
can be selected arbitrarily (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
is placed where the beam exits the circle (Slide 17).(4) The orientation of the above (Slide 18). Rotation of the crystal about the centre of the Ewald circle results in an equivalent rotation of the about the reciprocal-lattice origin (Slide 19).
is coupled to the orientation of the crystal, as delineated in §2.2(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 to the 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 points may satisfy the Bragg equation simultaneously, thus giving rise to multiple spots on the recorded image (Slide 22).
(7) It follows that the
can be detected by gradually rotating the crystal, thus sweeping the 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 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.
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
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).
3.2.1. Options
Miscellaneous options can be selected using the `Options' dialogue box (Fig. 2a). 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 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 points is created for the 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 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 or a low resolution limit will result in the creation of many points, which is likely to place a significant demand on the computer's graphics resources (and the user's patience).
needs to be created before any diffraction can occur. The `Reciprocal Lattice' dialogue box (Fig. 23.2.3. Automate sweep
The `Automate Single Sweep' dialogue box (Fig. 2c) 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 through the 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 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 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), 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.
The distance of the detector (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 above). If the shutter is open and a has been defined, the will be visible. points that satisfy Bragg's equation according to the 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 point, and (iii) the amount of overlap between the point and the Once a 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.
has been defined (see §3.2.23.6. Ewald sphere
The i.e. the is scaled accordingly, and its origin remains at the point where the beam exits the sphere). Rescaling the demonstrates that the scale selected for the reciprocal-space component can be arbitrary and does not affect the angular components of the diffraction geometry.
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 changes the scale of the reciprocal-space component of the simulation (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 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
is not swept through the for each individual frame during data collection.5. Obtaining the resources online
Four files are available as a package for teaching the 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.
construction. These are (i) the executable program (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
Ewald, P. P. (1913). Phys. Z. 14, 465–472. CAS Google Scholar
Ewald, P. P. (1969). Acta Cryst. A25, 103–108. CrossRef IUCr Journals Web of Science Google Scholar
Friedrich, W., Knipping, P. & Laue, M. (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 303–322. Google Scholar
Laue, M. von (1912). Sitzungsber. Kgl. Bayer. Akad. Wiss. pp. 363–373. Google Scholar
Phillips, 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.