write_x: Write atomic coordinates to a file.

Description Usage Arguments Value Examples

View source: R/io.R

Description

Function to export all information concerning a given structure to a so-called coordinates file of type *_x.dat.

Usage

1
write_x(filename, sdata)

Arguments

filename

A character string. Prefix of the output ASCII file to include all structural information. The file name will be "[Prefix]_x.dat".

sdata

A named list, normally obtained through the use of function read_x. The list names correspond to different object types:

  • a. Real numeric. The size of the unit cell.

  • SG. Character string. Space group symbol; 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.

Value

This function does not return anything, but will create an ASCII file of name *_x.dat which contains all coordinates of the atoms in the structure and other type of information.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
# Create an arbitrary structure in P1
a <- 23
SG <- "P1"
x0 <- c(2,11,16,19)
Z <- c(6,6,16,8)
B <- c(13,14,5,10)
occ <- c(1,1,1,1)
prfx <- "test"
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)
write_x(prfx,sdata)

jfoadi/crone documentation built on May 17, 2017, 7:19 p.m.