CFML_gSpaceGroups

This module provides types and procedures to construct and operate with Shubnikov and superspace groups.

Dictionaries

symm_oper_type

A symmetry operator.

Keys and types:

  • dt (integer): determinant of the submatrix [1:3,1:3], it must be 1 or -1.

  • mat (ndarray, dim=(:,:), float32): matrix operator.

  • time_inv (integer): time inversion.

group_type

Base dictionary for representing symmetry groups.

Keys and types:

  • d (integer): dimension of operator matrices.

  • inv (ndarray, dim=(:), int32): pointer to the inverse of the symmetry operator.

  • multip (integer): time inversion.

  • op (list): symmetry operators. Every element of the list is a dictionary of type symm_oper_type.

  • symb_op (list): symbols of the symmetry operators.

spg_type

A Shubnikov group. Extension of group type.

Keys and types:

  • alat_tr (ndarray, dim=(:,:), float32): anti-centring translations vectors, first dimension contains vector coordinates.

  • anticentred (integer): 0:anti-centric(-1’ no at origin) | 1:anti-acentric | 2:anti-centric(-1’ at origin).

  • anticentre_coord (ndarray, dim=(:), float32): coordinates of time inversion centres.

  • bns_num (str): numerical Label in the data base of Stokes-Campbell.

  • bns_symb (str): Belonov-Neronova-Smirnova Shubnikov group symbol.

  • bravais_num (integer): number of the Bravais class of the superspace (Stokes & Campbell database).

  • centre (str): alphanumeric information about the center of symmetry.

  • centred (integer): 0:centric(-1 no at origin) | 1:acentric, 2:centric(-1 at origin).

  • centre_coord (ndarray, dim=(:), float32): coordinates of inversion centres.

  • crystalsys (str): crystal system.

  • generators_list (str): list of generators.

  • hall (str): Hall symbol.

  • init_label (str): symbol of the space group provided for generating it.

  • lat_tr (ndarray, dim=(:,:), float32): centring translations vectors, first dimension contains vector coordinates.

  • laue (str): Laue group.

  • magnetic (bool): if True, magnetic group.

  • matfrom (str): transformation from standard space group.

  • mat2std (str): transformation to standard space group (parent).

  • mat2std_shu (str): transformation to standard Shubnikov group.

  • mag_pg (str): magnetic point group.

  • mag_type (integer): magnetic group type, 1:colorless | 2:paramagnetic | 3:black & white 1 | 4:black & white 2.

  • numops (integer): number of symmetry operators.

  • numshu (integer): Shubnikov group number.

  • numspg (integer): spacegroup number (IT if standard).

  • num_alat (integer): number of anti-centring translations.

  • num_lat (integer): number of centring translations.

  • og_num (str): numerical Label in the data base of D. Litvin.

  • og_symb (str): Opechowski-Guccione Shubnikov group symbol.

  • parent_num (integer): number of the parent group.

  • parent_spg (str): symbol of the parent group.

  • pg (str): point group.

  • setting (str): operators transformed by “setting” (e.g. -a+b,a+b,-c;1/2,0,0).

  • shu_lat (str): Shubnikov lattice type.

  • spg_lat (str): lattice type.

  • spg_symb (str): space group symbol.

  • standard_setting (bool): if True, group in the standard setting.

  • tfrom_parent (str): transformation of the parent basis to get the actual one.

  • uni (str): unified symbol.

  • uni_num (str): unified number.

superspacegroup_type

A superspace group. Extension of Shubnikov group.

Keys and types:

  • ep (ndarray, dim=(:,:,:), int32): modulation vector transform matrices (d,d,multip) in integer form to accelerate calculations.

  • kv (ndarray, dim=(3,nk), float32): k-vectors.

  • kv_std (ndarray, dim=(3,nk), float32): k-vectors standard deviations.

  • m (ndarray, dim=(:,:,:), int32): reciprocal operator matrices (3,3,multip) in integer form to accelerate calculations.

  • nharm (ndarray, dim=(nk), int32): number of harmonics along each k-vector (nk).

  • nk (integer): number of k-vectors.

  • nq (integer): number of effective set of q_coeff >= nk.

  • q_coeff (ndarray, dim=(nk,nq), int32): q-coefficients, coefficients of q-vectors in the k-basis.

  • rot (ndarray, dim=(:,:,:), int32): rotational operator matrices (3,3,multip) in integer form to accelerate calculations.

  • sintlim (ndarray, dim=(nk), float32): sintheta/lambda limits (nk).

  • ssg_bravais (str): symbol of the superspace Bravais class.

  • ssg_nlabel (str): label of the superspace Bravais class (Stokes & Campbell database).

  • ssg_symb (str): symbol of the superspace group.

  • t (ndarray, dim=(:,:), int32): translation in external (physical) space (3,multip).

  • ti (ndarray, dim=(:,:), int32): translation in internal space (3,multip).

Functions

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_DB and set it to the directory Src/Databases in CrysFML08. If you have installed the FullProf suite, check that the environment variable FULLPROF has 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_DB and FULLPROF are 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: []