Skip to contents

This function output a list with fields needed by most of the functions dealing with structure factors. It is the equivalent of the function standardise_sdata, used to prepare atomic structures data.

Usage

standardise_fdata(a, SG, hidx, Fobs = NULL, sigFobs = NULL,
  Fp = NULL, sigFp = NULL, Fm = NULL, sigFm = NULL,
  Phiobs = NULL, Phicalc = NULL)

Arguments

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".

hidx

Real numeric array. 1D unique (positive in the 1D context) Miller indices.

Fobs

Real numeric array. Amplitudes of structure factors. If Fp and Fm are not NULL and Fobs is NULL, then Fobs are calculated as averages of Fp and Fm. If both Fp, Fm and Fobs are included, input Fobs are used, instead of Fp and Fm averages.

sigFobs

Real numeric array. Errors associated with Fobs. If sigFobs = NULL, errors are estimated from Fp and Fm. Default is NULL.

Fp

Real numeric vector. Amplitudes of the positive component of Friedel (or Bijvoet) pairs (F+). Default is NULL, i.e. no Fp included.

sigFp

Real numeric vector. Errors associated with Fp. Default is NULL, i.e. no sigFp included.

Fm

Real numeric vector. Amplitudes of the negative component of Friedel (or Bijvoet) pairs (F-). Default is NULL, i.e. no Fm included.

sigFm

Real numeric vector. Errors associated with Fm. Default is NULL, i.e. no sigFm included.

Phiobs

Real numeric array. Phases (in degrees) of structure factors obtained with one of the methods used for structure solution. Default is NULL.

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. Default is NULL.

Value

A named list with a variable number of elements. Some of them are always included; others are not:

  • 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

# Create an arbitrary structure with a heavy atom (Fe)
a <- 20
SG <- "P1"
x0 <- c(1,2,6,16)
Z <- c(6,8,26,7)
B <- c(8,7,5,8)
occ <- c(1,1,1,1)
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)

# Miller indices, from -5 to 5 (to include negatives for anomalous)
hidx <- -5:5

# Experimental structure factors with anomalous contribution
# (lambda = 1.74) for creating Fm and Fp. Errors only due to
# photons fluctuations.
set.seed(9195)   # For demo purposes.
ltmp <- sfobs(hidx,sdata,ntrialP=10,anoflag=TRUE,lbda=1.74)
#>    Z          f1         f2
#> 1  6  0.02247688 0.01190210
#> 2  8  0.06101792 0.04200023
#> 3 26 -6.07057200 3.93874700
#> 4  7  0.03886725 0.02356395

# Fp and sigFp (Miller indices from 1 to 5)
isel <- 1:5
idx <- match(isel,hidx)
Fp <- ltmp$F[idx]
sigFp <- ltmp$sF[idx]

# Fm and sigFm
isel <- (-1):(-5)
idx <- match(isel,hidx)
Fm <- ltmp$F[idx]
sigFm <- ltmp$sF[idx]

# Now only positive Miller indices
hidx <- 1:5

# Create standardised data for reciprocal space
fdata <- standardise_fdata(a,SG,hidx,Fp=Fp,sigFp=sigFp,
         Fm=Fm,sigFm=sigFm)
         
# Fp and Fm
print(fdata$Fp)
#> [1] 22.98865 18.13441 14.86058 36.49140 21.62507
print(fdata$sigFp)
#> [1] 1.0138364 0.6126155 0.8251829 1.0159425 1.3508296
print(fdata$Fm)
#> [1] 24.31922 19.06673 13.65736 36.23244 22.29243
print(fdata$sigFm)
#> [1] 1.9555213 0.9015824 0.7282520 1.7478419 1.0342202

# Fobs and sigFobs automatically created
print(fdata$Fobs)
#> [1] 23.65393 18.60057 14.25897 36.36192 21.95875
print(fdata$sigFobs)
#> [1] 2.202709 1.090022 1.100581 2.021655 1.701280

# Structure factors without anomalous data for the same structure
hidx <- 1:5
set.seed(9195)   # For demo purposes.
ltmp <- sfobs(hidx,sdata,ntrialP=10)
Fobs <- ltmp$F
sigFobs <- ltmp$sF
fdata <- standardise_fdata(a,SG,hidx,Fobs=Fobs,sigFobs=sigFobs)
print(fdata)
#> $a
#> [1] 20
#> 
#> $SG
#> [1] "P1"
#> 
#> $hidx
#> [1] 1 2 3 4 5
#> 
#> $Fobs
#> [1] 25.28947 20.47611 15.72216 38.27113 23.64257
#> 
#> $sigFobs
#> [1] 0.7805114 1.0530486 0.5196678 0.8355073 1.3994836
#>