- set_spacegroup_from_dbase(mystr, mode, **kwargs)¶
Creates a Shubnikov (spg_type) or superspace (superspacegroup_type) group from the database. Therefore, the database must be installed in the computer. If CrysFML08 is in your computer, define the environment variable
CRYSFML_DBand set it to the directorySrc/Databasesin CrysFML08. If you have installed the FullProf suite, check that the environment variableFULLPROFhas been set. With either of the two environment variables, PyCrysFML will locate the database. Another option is to pass as an argument the path to the database (see below).- Parameters:
mystr (str) –
string specifying the Shubnikov or superspace group.
- From number.
Shubnikov group:
mystr = "1236"Superspace group:
mystr = "13232"
- From the standard symbol.
Shubnikov group:
mystr = "Pn'ma"`Superspace group:
mystr = "Pnma(0,0,g)0s0"
- From the Hall symbol.
space #41 of standard symbol Aba2:
mystr = "B 2 C B"
- From the unified symbol.
Shubnikov group:
mystr = "UNI Pnna.1'_a[Pncm]"
mode – type of group: ‘shubn’ | ‘super’.
kwargs – optional arguments.
kwargs['xyztype'] (str) – coordinates notation: ‘xyz’ (default) | ‘abc’ | ‘x1x2x3’.
kwargs['setting'] (str) – setting transformation.
kwargs['keepdb'] (bool) – if not given, deallocate the database after the group generation.
kwargs['parent'] (str) – if given, set the parent group symbol.
kwargs['database_path'] (str) – database path. Required if environment variables
CRYSFML_DBandFULLPROFare not set.kwargs['trn_to'] (bool) – if given, transformation matrices between standard and new setting (if given) are computed.
- Returns:
space group
- Return type:
dict (spg_type or superspacegroup_type)
>>> from pycrysfml import cfml_gspacegroups >>> sg = cfml_gspacegroups.set_spacegroup_from_dbase("Pn'ma","shubn",setting="-c,b,a;0,0,0") >>> for k in sg: ... print(f'{k :>16}: {sg[k]}') ... multip: 8 d: 4 inv: [0 0 0 0 0 0 0 0] op: [{'time_inv': 1, 'dt': 1, 'mat': array([[1., 0., 0., 0.], [0., 1., 0., 0.], [0., 0., 1., 0.], [0., 0., 0., 1.]], dtype=float32)}, {'time_inv': 1, 'dt': 1, 'mat': array([[-1. , 0. , 0. , 0.5], [ 0. , -1. , 0. , 0.5], [ 0. , 0. , 1. , 0.5], [ 0. , 0. , 0. , 1. ]], dtype=float32)}, {'time_inv': -1, 'dt': 1, 'mat': array([[-1. , 0. , 0. , 0. ], [ 0. , 1. , 0. , 0.5], [ 0. , 0. , -1. , 0. ], [ 0. , 0. , 0. , 1. ]], dtype=float32)}, {'time_inv': -1, 'dt': 1, 'mat': array([[ 1. , 0. , 0. , 0.5], [ 0. , -1. , 0. , 0. ], [ 0. , 0. , -1. , 0.5], [ 0. , 0. , 0. , 1. ]], dtype=float32)}, {'time_inv': -1, 'dt': -1, 'mat': array([[-1., 0., 0., 0.], [ 0., -1., 0., 0.], [ 0., 0., -1., 0.], [ 0., 0., 0., 1.]], dtype=float32)}, {'time_inv': -1, 'dt': -1, 'mat': array([[ 1. , 0. , 0. , 0.5], [ 0. , 1. , 0. , 0.5], [ 0. , 0. , -1. , 0.5], [ 0. , 0. , 0. , 1. ]], dtype=float32)}, {'time_inv': 1, 'dt': -1, 'mat': array([[ 1. , 0. , 0. , 0. ], [ 0. , -1. , 0. , 0.5], [ 0. , 0. , 1. , 0. ], [ 0. , 0. , 0. , 1. ]], dtype=float32)}, {'time_inv': 1, 'dt': -1, 'mat': array([[-1. , 0. , 0. , 0.5], [ 0. , 1. , 0. , 0. ], [ 0. , 0. , 1. , 0.5], [ 0. , 0. , 0. , 1. ]], dtype=float32)}] symb_op: ['x,y,z,+1','-x+1/2,-y+1/2,z+1/2,+1','-x,y+1/2,-z,-1', 'x+1/2,-y,-z+1/2,-1','-x,-y,-z,-1', 'x+1/2,y+1/2,-z+1/2,-1', 'x,-y+1/2,z,+1', '-x+1/2,y,z+1/2,+1'] magnetic: True standard_setting: False numspg: 0 numshu: 541 numops: 8 centred: 1 anticentred: 2 mag_type: 3 num_lat: 0 num_alat: 0 parent_num: 62 bravais_num: 0 spg_lat: P shu_lat: ['P', 'P'] init_label: Pn'ma parent_spg: Pnma tfrom_parent: centre: Non-centrosymmetric, Anti-centric with -1' @ origin spg_symb: bns_num: 62.443 og_num: 62.3.504 bns_symb: Pn'ma og_symb: Pn'ma hall: P 2ac' 2n -1' uni: Pn'ma uni_num: 504 crystalsys: Orthorhombic pg: mag_pg: m'mm laue: setting: -c,b,a;0,0,0 mat2std: c,b,-a;0,0,0 mat2std_shu: matfrom: -c,b,a;0,0,0 generators_list: -x+1/2,-y+1/2,z+1/2,+1;-x,y+1/2,-z,-1;x+1/2,-y,-z+1/2,-1;-x,-y,-z,-1;x+1/2,y+1/2,-z+1/2,-1;x,-y+1/2,z,+1;-x+1/2,y,z+1/2,+1 centre_coord: [0. 0. 0.] anticentre_coord: [0. 0. 0.] lat_tr: [] alat_tr: []