Learn R Programming

crone (version 0.1.1)

read_x: Read unit cell content (atom and coordinates).

Description

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

Run this code
# NOT RUN {
datadir <- system.file("extdata",package="crone")
filename <- file.path(datadir,"carbon_dioxide_x.dat")
sdata <- read_x(filename)
print(names(sdata))
print(sdata)

# }

Run the code above in your browser using DataLab