Skip to contents

Function to load XDS_ASCII.HKL files into a named list with three components called processing_info, header and reflections (see details further down).

Usage

readXDS_ASCII(filename, message = FALSE)

Arguments

filename

A character string. The path to a valid XDS ASCII file.

message

A logical variable. If TRUE (default) the function prints a message highlighting what is included in the xds header. If filename is not a valid XDS ascii file, the function returns `NULL` and prints out a warning message.

Value

A named list (see details).

Details

This function reads in all data from an XDS_ASCII data file and organises them into a named list. The list's name are:

processing_info

This list component includes three logical variables, MERGE, FRIEDEL and PROFILE. Their TRUE/FALSE value reflect features of the XDS_ASCII file connected with the specific processing performed to obtain the file itself (for more details see https://xds.mr.mpg.de/).

header

This list includes several components, like for instance SPACE_GROUP_NUMBER or UNIT_CELL_CONSTANTS, which give informations on the crystal and the experiment generating the data.

reflections

This data.frame includes the actual experimental data, i.e. the observations collected during the X-ray diffraction experiment on the crystal (or crystals). The number and type of columns can vary.

Examples


# Load one of the XDS ASCII files included with
# this distribution of cry
datadir <- system.file("extdata",package="cry")
filename <- file.path(datadir,"xds00_ascii.hkl")
ltmp <- readXDS_ASCII(filename,message=FALSE)
print(names(ltmp))
#> [1] "processing_info" "header"          "reflections"    
print(ltmp$reflections[1:5,])
#>   H K   L   IOBS SIGMA.IOBS.     XD    YD   ZD     RLP PEAK CORR   PSI
#> 1 0 0 -35  61.77       128.4 2094.2 664.4  6.4 0.17998   92    7 62.60
#> 2 0 0 -36 137.70       136.3 2120.2 645.5 10.3 0.18539   99    8 62.91
#> 3 0 0 -38 -29.38       153.9 2172.7 607.6 18.0 0.19628  100   -7 63.53
#> 4 0 0 -39 -23.68       158.5 2199.2 588.5 21.9 0.20176  100   -7 63.85
#> 5 0 0 -40  73.30       161.0 2226.0 569.5 25.8 0.20726  100    8 64.16