mxcubecore.model.crystal_symmetry#

License:

This file is part of MXCuBE.

MXCuBE is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

MXCuBE is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with MXCuBE. If not, see <https://www.gnu.org/licenses/>.

Functions

crystal_classes_from_params([lattices, ...])

Get tuple of crystal class names compatible with input parameters, in crystal class number order Raises error for incompatible data.

filter_crystal_classes(bravais_lattice[, ...])

Filter crystal classes to select those compatible with selected Bravais lattice

regularise_space_group(sgname)

Convert finput (ISPyB) space gorup name to official space group name

space_groups_from_params([lattices, ...])

list of names of space groups compatible with lattices and point groups Given in space group number order

strategy_laue_group(crystal_classes[, phasing])

Get laue group and point-group-like to use for strategy calculation for a given set of crystal classes.

Classes

CrystalClassInfo(number, name, ...)

SpaceGroupInfo(number, name, crystal_class)

class mxcubecore.model.crystal_symmetry.CrystalClassInfo(number, name, bravais_lattice, point_group, crystal_system, laue_group)#

Bases: tuple

bravais_lattice#

Alias for field number 2

crystal_system#

Alias for field number 4

laue_group#

Alias for field number 5

name#

Alias for field number 1

number#

Alias for field number 0

point_group#

Alias for field number 3

class mxcubecore.model.crystal_symmetry.SpaceGroupInfo(number, name, crystal_class)#

Bases: tuple

crystal_class#

Alias for field number 2

name#

Alias for field number 1

number#

Alias for field number 0

mxcubecore.model.crystal_symmetry.crystal_classes_from_params(lattices: tuple = (), point_groups: tuple = (), space_group: str | None = None)[source]#

Get tuple of crystal class names compatible with input parameters, in crystal class number order Raises error for incompatible data. NB If lattices or point_groups are set will return relevant tuple even if space_group is also set

Parameters:
  • lattices (tuple) – list of lattice strings (Bravais Lattice or ‘Monoclinic’ etc.

  • point_groups (tuple) – list(str) List of point group names (or ‘312’, ‘321’)

  • space_group (str | None) – Space group name

Returns: tuple(str) of crystal class names

mxcubecore.model.crystal_symmetry.filter_crystal_classes(bravais_lattice, crystal_classes=())[source]#

Filter crystal classes to select those compatible with selected Bravais lattice

including sublattices

Parameters:
  • bravais_lattice – str

  • crystal_classes – Sequence

Returns:

tuople

mxcubecore.model.crystal_symmetry.regularise_space_group(sgname: str)[source]#

Convert finput (ISPyB) space gorup name to official space group name

Parameters:

sgname (str) –

mxcubecore.model.crystal_symmetry.space_groups_from_params(lattices=(), point_groups=(), chiral_only=True)[source]#

list of names of space groups compatible with lattices and point groups Given in space group number order

Parameters:
  • lattices

  • point_groups

  • chiral_only

Returns:

mxcubecore.model.crystal_symmetry.strategy_laue_group(crystal_classes: tuple, phasing=False)[source]#

Get laue group and point-group-like to use for strategy calculation for a given set of crystal classes.

Parameters:
  • crystal_classes (tuple) – Crystal class names

  • phasing (bool) – Is this for phasing (default is native)

Returns: (str, str) laue_group, point_group_like