Movatterモバイル変換


[0]ホーム

URL:


rgl.cry

CRAN statusR-CMD-check

This is a use case for thecry andrglpackages. This package provides tools for selected area electrondiffraction (SAED) pattern and crystal structure visualization using thergl andcry packages. In particular, thecry_demo() anddp_demo() function read filesin CIF (Crystallographic Information Framework) format and display SAEDpatterns and crystal structures. Thedp_demo() functionalso performs simple simulations of powder X-ray diffraction (PXRD)patterns, and the results can be saved to a file in the workingdirectory.

The package has been tested on several platforms, including Linux onCrostini with a Core™ m3-8100Y Chromebook, I found that even on thislow-powered platform, the performance was acceptable.

Web Resources

https://saitoutoshihide.github.io/rgl.cry/

Installation

install.packages("rgl.cry")

Example

A CIF file is read, and a reciprocal lattice map with a cell widgetis drawn. In this example, a file is not specified, so the systemdefault is used.

dp_demo()

A CIF file is read, and a crystal structure with a axis widget isdrawn.

cry_demo()

Utility functions

The crystal and diffraction pattern are aligned and displayed.

align("a")align("ra")align("30 30")# x, y (deg)

Select one or more atoms or reciprocal lattice points in the window.The labels and Miller indices of the selected atoms or lattice pointswill be displayed.

>dp_demo()[1]1>select()To select points, use dragging the left mouse button.To finish, press ESC.. [1]"1 1 -3""1 0 -2""2 0 -2""1 1 -1""1 0 0""2 0 0""1 1 1""1 0 2">cry_demo()[1]2>select()To select points, use dragging the left mouse button.To finish, press ESC..[1]"Ti1""Ti1"

Extras

dp_demo() can perform PXRD pattern simulation. Theresult is saved as a file in the current directory by specifying optionslike this:

## Output the simulation results of the PXDR pattern as a file.dp_demo(xrd =TRUE)

The file looks like this:

% sort-n +7 rgl.cry.dp.demo.2024-02-26_000000.dath k l d absF lp twotheta137 0 0 0 Inf 308.117522 Inf 0.00000136-1 0 0 5.583222 17.389409 101.955123 15.87322138 1 0 0 5.583222 17.389409 101.955123 15.87322128 0-2 0 4.453238 40.628676 63.820476 19.93782146 0 2 0 4.453238 40.628676 63.820476 19.93782129 1-2 0 4.142661 17.444203 54.849532 21.44963145-1 2 0 4.142661 17.444203 54.849532 21.44963

References

Hanashima, T. “Contents of Atomic Scattering Factors’ Table in S. Sasaki(1987), KEK Report 87-3.” Constructed in web page in 2001.https://www2.kek.jp/imss/pf/tools/sasaki/sinram/sinram.html.
Helmenstine, Todd. 2019. “Molecule Atom Colors – CPK Colors.”https://sciencenotes.org/molecule-atom-colors-cpk-colors/.
Wikipedia contributors. 2023. “Atomic Radius — Wikipedia, the FreeEncyclopedia.”https://en.wikipedia.org/w/index.php?title=Atomic_radius&oldid=1179864711.

Acknowledgment

I would like to express my gratitude to the rgl, cry packages, and Rfor making this work possible. The data for the scattering factors isbased on the data from the KEK Report (Hanashima). For the coloring ofthe atoms, I used (Helmenstine 2019), and for the atomic radii, I used(Wikipedia contributors 2023).


[8]ページ先頭

©2009-2025 Movatter.jp