Exemplo n.º 1
0
def dials_crystal_from_orientation(crystal_orientation, space_group):
    dm = crystal_orientation.direct_matrix()
    AA = scitbx.matrix.col((dm[0], dm[1], dm[2]))
    BB = scitbx.matrix.col((dm[3], dm[4], dm[5]))
    CC = scitbx.matrix.col((dm[6], dm[7], dm[8]))

    cryst = Crystal(real_space_a=AA,
                    real_space_b=BB,
                    real_space_c=CC,
                    space_group=space_group)
    return cryst
Exemplo n.º 2
0
def dxtbx_crystal_from_orientation(crystal_orientation, space_group):
    """Convert a cctbx crystal_orientation to a dxtbx.Crystal model.

    Args:
        crystal_orientation (cctbx.crystal_orientation):
            A cctbx crystal_orientation object
        space_group (cctbx.sgtbx.space_group): The space group.

    Returns:
        dxtbx.model.Crystal: The dxtbx crystal model.
    """
    dm = crystal_orientation.direct_matrix()
    AA = scitbx.matrix.col((dm[0], dm[1], dm[2]))
    BB = scitbx.matrix.col((dm[3], dm[4], dm[5]))
    CC = scitbx.matrix.col((dm[6], dm[7], dm[8]))

    cryst = Crystal(real_space_a=AA,
                    real_space_b=BB,
                    real_space_c=CC,
                    space_group=space_group)
    return cryst