Learn R Programming

rgl.cry (version 0.1.0)

cry_demo: Examples of using the cry and rgl packages together.

Description

Read a file in CIF formats, set the parameters, calculates them, and draws the crystal structure with an axis widget.

Usage

cry_demo(file = NULL, rf = 1, type = "b", zoom = 1)

Value

An integer the device number of the currently window.

Arguments

file

Optional file in CIF formats. The file can also be specified by URL.

rf

A positive value indicating the scale factor of atom radius.

type

A style of atom displaying such like ball, fill and ball-stick but ball-stick is not implemented.

zoom

A positive value indicating the current scene magnification.

Details

If no file argument is provided, and dp_demo() has been opened without paired cry_demo(), the CIF parameters of already opened dp_demo() will be used.

Examples

Run this code
cry_demo()
cry_demo(system.file("orthorhombic_p.cif", package = "rgl.cry"))

# \donttest{
if (interactive()) {
 cry_demo(file, type = "fill", zoom = 0.5)
 cry_demo("https://www.crystallography.net/cod/foo.cif")
}
# }

Run the code above in your browser using DataLab