dxtbx.model.crystal

class dxtbx.model.Crystal

Bases: dxtbx_model_ext.CrystalBase

__init__((object)arg1, (Crystal)arg2)None :
C++ signature :

void __init__(_object*,dxtbx::model::Crystal)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (space_group)space_group) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,cctbx::sgtbx::space_group)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (str)space_group_symbol) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

__init__( (object)arg1, (object)A, (space_group)space_group [, (object)reciprocal=True]) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::mat3<double>,cctbx::sgtbx::space_group [,bool=True])

__init__( (object)arg1, (object)A, (str)space_group_symbol [, (object)reciprocal=True]) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::mat3<double>,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > [,bool=True])

as_str(show_scan_varying=False)
static from_dict(d)

Convert the dictionary to a crystal model

Params:

d The dictionary of parameters

Returns

The crystal model

get_crystal_symmetry(assert_is_compatible_unit_cell=True)
show(show_scan_varying=False, out=None)
to_dict()

Convert the crystal model to a dictionary

Returns

A dictionary of the parameters

class dxtbx.model.MosaicCrystalKabsch2010

Bases: dxtbx_model_ext.Crystal

__init__((object)arg1, (MosaicCrystalKabsch2010)arg2)None :
C++ signature :

void __init__(_object*,dxtbx::model::MosaicCrystalKabsch2010)

__init__( (object)arg1, (Crystal)arg2) -> None :

C++ signature :

void __init__(_object*,dxtbx::model::Crystal)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (space_group)space_group) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,cctbx::sgtbx::space_group)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (str)space_group_symbol) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

as_str(show_scan_varying=False)
classmethod from_dict(d)

Convert the dictionary to a crystal model

Params:

d The dictionary of parameters

Returns

The crystal model

get_mosaicity((MosaicCrystalKabsch2010)arg1[, (object)deg=True])float :
C++ signature :

double get_mosaicity(dxtbx::model::MosaicCrystalKabsch2010 {lvalue} [,bool=True])

is_similar_to((MosaicCrystalKabsch2010)arg1, (CrystalBase)other[, (object)angle_tolerance=0.01[, (object)uc_rel_length_tolerance=0.01[, (object)uc_abs_angle_tolerance=1.0[, (object)mosaicity_tolerance=0.8]]]])bool :
C++ signature :

bool is_similar_to(dxtbx::model::MosaicCrystalKabsch2010 {lvalue},dxtbx::model::CrystalBase [,double=0.01 [,double=0.01 [,double=1.0 [,double=0.8]]]])

set_mosaicity((MosaicCrystalKabsch2010)arg1, (object)mosaicity[, (object)deg=True])None :
C++ signature :

void set_mosaicity(dxtbx::model::MosaicCrystalKabsch2010 {lvalue},double [,bool=True])

to_dict()

Convert the crystal model to a dictionary

Returns

A dictionary of the parameters

class dxtbx.model.MosaicCrystalSauter2014

Bases: dxtbx_model_ext.Crystal

__init__((object)arg1, (MosaicCrystalSauter2014)arg2)None :
C++ signature :

void __init__(_object*,dxtbx::model::MosaicCrystalSauter2014)

__init__( (object)arg1, (Crystal)arg2) -> None :

C++ signature :

void __init__(_object*,dxtbx::model::Crystal)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (space_group)space_group) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,cctbx::sgtbx::space_group)

__init__( (object)arg1, (object)real_space_a, (object)real_space_b, (object)real_space_c, (str)space_group_symbol) -> object :

C++ signature :

void* __init__(boost::python::api::object,scitbx::vec3<double>,scitbx::vec3<double>,scitbx::vec3<double>,std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)

as_str(show_scan_varying=False)
classmethod from_dict(d)

Convert the dictionary to a crystal model

Params:

d The dictionary of parameters

Returns

The crystal model

get_A_as_sqr()
get_A_inverse_as_sqr()
get_domain_size_ang((MosaicCrystalSauter2014)arg1)float :
C++ signature :

double get_domain_size_ang(dxtbx::model::MosaicCrystalSauter2014 {lvalue})

get_half_mosaicity_deg((MosaicCrystalSauter2014)arg1)float :
C++ signature :

double get_half_mosaicity_deg(dxtbx::model::MosaicCrystalSauter2014 {lvalue})

is_similar_to((MosaicCrystalSauter2014)arg1, (CrystalBase)other[, (object)angle_tolerance=0.01[, (object)uc_rel_length_tolerance=0.01[, (object)uc_abs_angle_tolerance=1.0[, (object)half_mosaicity_tolerance=0.4[, (object)domain_size_tolerance=1.0]]]]])bool :
C++ signature :

bool is_similar_to(dxtbx::model::MosaicCrystalSauter2014 {lvalue},dxtbx::model::CrystalBase [,double=0.01 [,double=0.01 [,double=1.0 [,double=0.4 [,double=1.0]]]]])

set_domain_size_ang((MosaicCrystalSauter2014)arg1, (object)domain_size_ang)None :
C++ signature :

void set_domain_size_ang(dxtbx::model::MosaicCrystalSauter2014 {lvalue},double)

set_half_mosaicity_deg((MosaicCrystalSauter2014)arg1, (object)half_mosaicity_deg)None :
C++ signature :

void set_half_mosaicity_deg(dxtbx::model::MosaicCrystalSauter2014 {lvalue},double)

to_dict()

Convert the crystal model to a dictionary

Returns

A dictionary of the parameters

class dxtbx.model.crystal.CrystalFactory[source]

Bases: object

static from_dict(d, t=None)[source]

Convert the dictionary to a crystal model

Params:

d The dictionary of parameters t The template dictionary to use

Returns

The crystal model

static from_mosflm_matrix(mosflm_A_matrix, unit_cell=None, wavelength=None, space_group=None)[source]

Create a crystal_model from a Mosflm A matrix (a*, b*, c*); N.B. assumes the mosflm coordinate frame:

                                   /!
      Y-axis                      / !
        ^                        /  !
        !                       /   !
        !                      /    !
        !   /                 /  Xd !
        !  /                 / * ^  !
        ! /                  ! 3 !  !
        !/      X-ray beam   !   !  !
        /------------------------/--!---->X-axis
       /                     !  / *1!
    <-/-                     ! /    !
     / \+ve phi             ! Yd  /
    /   /                    ! 2  /
   /                         ! * /
  Z-axis                  Ys ^ _/
Rotation                     ! /| Xs
 axis                        !/
                             O

Also assume that the mosaic spread is 0.

Parameters
  • mosflm_A_matrix (tuple of floats) – The A matrix in Mosflm convention.

  • unit_cell (cctbx.uctbx.unit_cell) – The unit cell parameters which are used to determine the wavelength from the Mosflm A matrix.

  • wavelength (float) – The wavelength to scale the A matrix

  • space_group (cctbx.sgtbx.space_group) – If the space group is None then the space_group will be assigned as P1

Returns

A crystal model derived from the given Mosflm A matrix

Return type

crystal_model