def __init__(self,xsin,start_order=1,stop_order=5,max_delta=5.0):
    self.xs = xsin
    self.cb_op_to_niggli = xsin.change_of_basis_op_to_niggli_cell()
    self.xs_n = self.xs.change_basis( self.cb_op_to_niggli )
    self.basis = matrix.sqr( self.xs_n.unit_cell().orthogonalization_matrix() )

    self.max_delta = max_delta

    self.xs_expand = []
    self.matrices  = slt.generate_matrix_up_to_order( stop_order, start_order )
    self.add_to_niggli = []
    self.metric_r_values = []
    for mat in self.matrices:
      self.make_new_xs(mat)
def tst_groups():
  cb_ops = sub_lattice_tools.generate_cb_op_up_to_order(7)
  mats = sub_lattice_tools.generate_matrix_up_to_order(7)
  base_group = sgtbx.space_group_info( "P 2 2 2" ).group()
  for cb_op, mat in zip(cb_ops, mats):
    rat_cb_op = mat
    extended_group=None
    try:
      extended_group = sgtbx.space_group_info( "P 2 2 2 (%s)"%cb_op ).group()
    except Exception: pass
    rbg = construct_rational_point_group( base_group, rat_cb_op )
    reg = None
    if extended_group is not None:
      reg = construct_rational_point_group( extended_group )
      assert compare_groups(reg, rbg)
Example #3
0
    def __init__(self, xsin, start_order=1, stop_order=5, max_delta=5.0):
        self.xs = xsin
        self.cb_op_to_niggli = xsin.change_of_basis_op_to_niggli_cell()
        self.xs_n = self.xs.change_basis(self.cb_op_to_niggli)
        self.basis = matrix.sqr(
            self.xs_n.unit_cell().orthogonalization_matrix())

        self.max_delta = max_delta

        self.xs_expand = []
        self.matrices = slt.generate_matrix_up_to_order(
            stop_order, start_order)
        self.add_to_niggli = []
        self.metric_r_values = []
        for mat in self.matrices:
            self.make_new_xs(mat)
def tst_groups():
    cb_ops = sub_lattice_tools.generate_cb_op_up_to_order(3)
    mats = sub_lattice_tools.generate_matrix_up_to_order(3)
    base_group = sgtbx.space_group_info("P 2 2 2").group()
    for cb_op, mat in zip(cb_ops, mats):
        rat_cb_op = mat
        extended_group = None
        try:
            extended_group = sgtbx.space_group_info("P 2 2 2 (%s)" %
                                                    cb_op).group()
        except Exception:
            pass
        rbg = construct_rational_point_group(base_group, rat_cb_op)
        reg = None
        if extended_group is not None:
            reg = construct_rational_point_group(extended_group)
            assert compare_groups(reg, rbg)