Pages

Using PowderCell to Calculate Angles for Debye-Scherrer Cones

PowderCell is a piece of software that allows calculation of the polar angles of the Debye-Scherrer cones in x-ray powder diffraction. We used these angles to find the alignment of the photon detectors in the experiment I mentioned in a previous post. We used the predicted powder scattering angles from PowderCell, projected them onto a simulated flat detector, and moved the detector in the program until the experimental powder rings lined up with the predicted powder rings. Here is a short tutorial for how to calculate these angles in PowderCell.

Using Wine to Run Windows Programs

PowderCell is a Windows program, but we can still run it in OSX using a cool piece of software called Wine. The short story of Wine is that it will allow you run any Windows software natively in OSX --- no dual-booting Windows necessary! I used to have a Windows partition on my Mac but now I use Wine instead: It is much more convenient works well for running all sorts of programs including your favorite Windows video games.

You can install Wine on OSX through a number of different methods; I have had success with installing the downloadable binaries and installing through MacPorts and Homebrew. Currently, I am using the MacPorts version.

The first time you start up Wine, it will create a hidden directory, ~/.wine,  in ~/ where it will store all of Windows files and programs you will run. The directory structure roughly mimics Windows with directories called drive_c, Program Files, Application Data, and all the other classics more or less in the place you expect. If you ever mess with the directory structure and break things just delete the entire ~/.wine directory and reinstall all of your programs, it will not break anything related to OSX. Installation of programs works just like it would in Windows.

Run Windows programs with Wine by running
wine program.exe

Some other important commands that allow you to change various settings such as which Windows version you are running as
winecfg
wine regedit

Using PowderCell 2.4

Download PowderCell and run it using Wine. It will ask to extract all of the necessary files to a location of your choosing. After extraction, move to the new directory and run PCW.exe, again with Wine. Some additional comments about running PowderCell with Wine are here.

Now that we have the program running, let's calculate something. In the experimental setup featured in my previous post, we performed x-ray diffraction on powdered lanthanum hexaboride using the LINAC Coherent Light Source at the Stanford Linear Accelerator Laboratory. First, we must download a unit cell .cif file for \(LaB_6\) using the Crystallography Open Database or any other crystallography database your institution gives access to.

PowderCell is an old program and will, unfortunately, not read the .cif file directly. Simply open the unit cell in a text editor and enter the unit cell data manually as pictured below. Be sure to enter the space group correctly. The space group number for \(LaB_6\) is 221. A visualization of your unit cell should automatically be generated after pressing "OK".
In our experiment last month, we used x-rays with energy of 9.43 keV which corresponds to a wavelength of 1.315 angstroms. Under Diffraction >> Experiment, make sure the source is "X-ray" and enter the wavelength in angstroms for your source in the field \(K\alpha_1\). In this window you can also change the range of viewing angles. The peaks of the Debye-Scherrer cones will automatically be plotted for your structure.

The option to view the numerical angles, \(2\theta\), printed above the peaks is given in the right-hand column.