Skip to contents

Read unit cell length, space group, atom coordinates and all other parameters from a coordinate file.

Usage

read_x(filename)

Arguments

filename

A character string. Existing file that includes all structural information. The file name in general has the form "[prefix]_x.dat".

Value

A named list with the following elements:

  • a. Real numeric. Unit cell length in angstroms.

  • SG. SG 2-letters character string. There are only two symmetries possible when working within 1D crystallography, P1 (no symmetry) and P-1 (inversion through the origin). SG can be either "P1" or "P-1".

  • x0. Vector of real numerics indicating the expanded atomic positions in the unit cell.

  • Z. Vector of integers indicating the expanded atomic numbers for all atoms in the unit cell.

  • B. Vector of real numerics indicating the expanded B factors for all atoms in the unit cell.

  • occ. Vector of real numerics indicating the expanded occupancies for all atoms in the unit cell.

Examples

datadir <- system.file("extdata",package="crone")
filename <- file.path(datadir,"carbon_dioxide_x.dat")
sdata <- read_x(filename)
print(names(sdata))
#> [1] "a"   "SG"  "x0"  "Z"   "B"   "occ"
print(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
#>