Skip to contents

Function to find out space group symbol given number and vice-versa.

Usage

translate_SG(value, SG_in = "number", SG_out = "xHM", set = 1)

Arguments

value

A string or an integer number corresponding to the space group being investigated.

SG_in

A string representing the space group format for the input. Possible values are:

  • 1) "number"

  • 2) "ccp4"

  • 3) "Hall"

  • 4) "xHM"

  • 5) "old"

SG_out

A string representing the space group format for the output. Possible values are:

  • 1) "number"

  • 2) "ccp4"

  • 3) "Hall"

  • 4) "xHM"

  • 5) "old"

set

Specific setting for the given space group. A number like 1,2,... It is used if for a same symbol there are more than one choice.

Value

list_SG A named list with two fields. The first field, "msg", is a character string representing the space group format needed as output. Possible values are the same as those for SG_in. The second field, "ans", is TRUE only if a valid symbol for "msg" is found.

Details

This function returns either a number of a specific symbol corresponding to a crystallographic space group. The input is an integer number or a character symbol identifying a specific space group. The output is, similarly, the corresponding character symbol or number, according to what is specified in the input. Possible formats are:

  • 1) Space group number

  • 2) Hall symbol (e.g. ' P 2yb (z,x,y)')

  • 3) Extended Hermann-Mauguin symbol (e.g. 'P 1 1 21')

If more than one setting is implied in an ambiguous way in the input value, then the first setting will be selected by default for the output value, unless argument "set" is set to another value.

Examples

# Space Group P1 corresponds to number 1
translate_SG(value=1,SG_in="number",SG_out="xHM")
#> $msg
#> [1] "P 1"
#> 
#> $ans
#> [1] TRUE
#>