# NOT RUN {
library(r3dmol)
# Create model
mol <- r3dmol() %>%
m_add_model(
data = cif_254385,
"cif",
options = list(doAssembly = TRUE, normalizeAssembly = TRUE)
) %>%
m_set_style(style = list(
sphere = list(colorscheme = "Jmol", scale = 0.25),
stick = list(colorscheme = "Jmol")
)) %>%
m_add_unit_cell(spec = list(
alabel = "x",
blabel = "y",
clabel = "z",
box = list(hidden = TRUE)
)) %>%
m_zoom_to()
# Render model
mol
# Remove unit cell
mol %>%
m_remove_unit_cell()
# Replicate atoms in model to form a super cell
r3dmol() %>%
m_add_model(data = cif_254385, format = "cif") %>%
m_set_style(style = list(sphere = list(scale = 0.25))) %>%
m_add_unit_cell() %>%
m_zoom_to() %>%
m_replicate_unit_cell(a = 3, b = 2, c = 1)
# }
Run the code above in your browser using DataLab