Skip to contents

Read data from a *_h.dat-type file containing cell size, spacegroup symbol and amplitudes and/or phases of observed and/or calculated structure factors. This function loads the file data into a standardised named list for structure factors data.

Usage

read_h(filename)

Arguments

filename

A character string. Existing file that includes structure factors information. The file name in general has the form "[prefix]_h.dat".

Value

A named list with the following elements:

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

  • SG. Spacegroup 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". Always included.

  • hidx. Real numeric array. 1D unique (positive in the 1D context) Miller indices. Always included.

  • Fobs. Real numeric array. Amplitudes of observed structure factors. Not always included.

  • sigFobs. Real numeric array. Errors associated with Fobs. Not always included.

  • Fp. Real numeric vector. Amplitudes of the positive component of Friedel (or Bijvoet) pairs (F+). Not always included.

  • sigFp. Real numeric vector. Errors associated with Fp. Not always included.

  • Fm. Real numeric vector. Amplitudes of the negative component of Friedel (or Bijvoet) pairs (F-). Not always included.

  • sigFm. Real numeric vector. Errors associated with Fm. Not always included.

  • Phiobs. Real numeric array. Phases (in degrees) of structure factors obtained with one of the methods used for structure solution. Not always included.

  • Phicalc. Real numeric array. Phases (in degrees) of structure factors calculated from the correct 1D structure. They are normally used to check correctness of Phiobs. Not always included.

Examples

# Observed structure factors amplitudes and calculated phases
# from thiocyanate structure
datadir <- system.file("extdata",package="crone")
filename <- file.path(datadir,"thiocyanate_h.dat")
fdata <- read_x(filename)
print(names(fdata))
#> [1] "a"  "SG" "x0" "Z"  "B" 
print(fdata$Fobs)
#> NULL
print(fdata$sigFobs)
#> NULL