cry_demo {rgl.cry}R Documentation

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)

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.

Value

An integer the device number of the currently window.

Examples

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


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


[Package rgl.cry version 0.1.1 Index]