MyNixOS website logo
Description

Structural Crystallography in 1d.

Functions to carry out the most important crystallographic calculations for crystal structures made of 1d Gaussian-shaped atoms, especially useful for methods development. Main reference: E. Smith, G. Evans, J. Foadi (2017) <doi:10.1088/1361-6404/aa8188>.

crone

The goal of crone is to carry out most of the task and calculations of structural crystallography using 1D crystal structure models. The 1D models included with the package are taken from existing linear chemical molecules. A full description of the theory behind 1D crystallography and the crone package can be studied in this article. The package is aimed at undergraduate and graduate students that need to be trained in structural crystallography or in the development of methods for structural crystallography.

Installation

You can install the released version of crone from CRAN with:

install.packages("crone")

And the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("jfoadi/crone")

Example

Structures are stored in named lists of type sdata:

library(crone)

# Load carbon dioxide
sdata <- load_structure("carbon_dioxide")

# sdata includes: 
# cell length(a), space group (SG),atoms position (x0), 
# atomic numbers (Z),B-factors (B), occupancies (occ)
sdata
#> $a
#> [1] 6.066
#> 
#> $SG
#> [1] "P-1"
#> 
#> $x0
#> [1] 1.870 3.033
#> 
#> $Z
#> [1] 8 6
#> 
#> $B
#> [1] 10.000 13.333
#> 
#> $occ
#> [1] 1.0 0.5

Once a structure is loaded (or created from scratch), the ideal electron density can be calculated and plotted:

rtmp <- structure_gauss(sdata=sdata,N=1000)
plot(rtmp$x,rtmp$rr,type="l",
     xlab=expression(x),ylab=expression(rho))

The repeated motive in the unit cell can be plotted for several unit cells:

x <- seq(-sdata$a*10,sdata$a*10,length=20000)
rtmp <- structure_gauss(sdata=sdata,x=x)
plot(rtmp$x,rtmp$rr,type="l",
     xlab=expression(x),ylab=expression(rho))

A diffraction pattern due to just one unit cell or to multiple unit cells is created with function diffraction:

# One unit cell
dtmp <- diffraction(sdata=sdata,D=1,Ncell=1)
plot(dtmp$xstar,dtmp$Imod,type="l",xlab=expression(s),
     ylab=expression(I))

# 10 unit cells
dtmp <- diffraction(sdata=sdata,D=1,Ncell=10)
plot(dtmp$xstar,dtmp$Imod,type="l",xlab=expression(s),
     ylab=expression(I))

Many more examples can be studied in the five tutorials included as package vignettes. The first three tutorials are set at an introductory/intermediate level; the last two tutorials are more difficult to digest.

Reference

Details of the theory and algorithms behind crone can be found in: E. Smith, G. Evans and J. Foadi (2017), “An effective introduction to structural crystallography using 1D Gaussian atoms”, Eur. J. Phys. 38, link.

Metadata

Version

0.1.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows