check_validity | R Documentation |
Compatibility of cry objects The objects that can be created in cry are subject to issues of compatibility of the parameters forming them. For example, the unit cell of a cubic system cannot have the a, b, c sides different from each other. The present function returns TRUE if all parts composing the object are compatible with each other. Otherwise it returns FALSE and one or more warnings with details.
check_validity(x, y = NULL, message = FALSE)
x |
A first object of one of the new cry classes. |
y |
A second object of one of the new cry classes. |
message |
A logical variable. If TRUE, the function prints a message on the errors, if any (default is FALSE, i.e. no message printed). |
The available checks for individual objects are:
angle (unit cell angle)
bravais (Bravais system)
unit_cell (unit cell)
rec_unit_cell (reciprocal unit cell)
cryst_symm (crystallographic symmetry)
merged_reflections (scaled and merged data)
The available checks for couple of objects are:
bravais and unit_cell
unit_cell and cryst_symm
ans A logical value. ans = TRUE means that either the parameters of the single object (if only one input is provided) are valid parameters, or that the two objects are compatible with each other.
# Create a cubic cell with side 50 uc <- create_unit_cell(50) # Create an object of class "cryst_symm" crsym <- cryst_symm("P m -3") # Are they compatible with each other? check_validity(uc,crsym,TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.