check_cryst_symm_validity: Validity and compatibility of a cry object of class...

View source: R/validations.R

check_cryst_symm_validityR Documentation

Validity and compatibility of a cry object of class 'cryst_symm'

Description

An object of class 'cryst_symm' is a named list of length 4. The first field is a character string, the second field is a 3\times 3 array and the third and fourth field are 3 \times 1 arrays.

Usage

check_cryst_symm_validity(x, message = FALSE)

Arguments

x

Object of class 'cryst_symm'.

message

A logical variable. If TRUE, the function prints a message on the errors, if any (default is FALSE, i.e. no message printed).

Value

ans A logical value. TRUE means that the input is a valid object of class'cryst_symm'.

Examples

# Create an object of class 'cryst_symm'
x <- cryst_symm(15)

# Check its validity
check_cryst_symm_validity(x)

# Now change a field
x$PG[[1]] <- matrix(rep(0,times=9),ncol=3)

# Check validity again
check_cryst_symm_validity(x,TRUE)


cry documentation built on Oct. 10, 2022, 9:06 a.m.