gemmi.UnitCell class

Static methods

def calculate_1_d2(…)
def calculate_d(…)
def get_hkl_limits(…)

Methods

def approx(self, other: UnitCell, epsilon: float) -> bool
def calculate_1_d2_array(self, arg0: numpy.ndarray[numpy.int32], /) -> numpy.ndarray[numpy.float64]
def calculate_d_array(self, arg0: numpy.ndarray[numpy.int32], /) -> numpy.ndarray[numpy.float64]
def calculate_u_eq(self, arg0: SMat33d, /) -> float
def changed_basis_backward(self, op: Op, set_images: bool) -> UnitCell
def changed_basis_forward(self, op: Op, set_images: bool) -> UnitCell
def find_nearest_image(self, ref: Position, pos: Position, asu: Asu = Asu.Any) -> NearestImage
def find_nearest_pbc_image(self, fref: Fractional, fpos: Fractional, image_idx: int) -> NearestImage
def find_nearest_pbc_image(self, ref: Position, pos: Position, image_idx: int) -> NearestImage
def find_nearest_pbc_position(self, ref: Position, pos: Position, image_idx: int, inverse: bool = False) -> Position
def fractionalize(self, arg0: Position, /) -> Fractional
def is_compatible_with_spacegroup(self, sg: SpaceGroup, eps: float = 0.001) -> bool
def is_crystal(self, /) -> bool
def is_similar(self, other: UnitCell, rel: float, deg: float) -> bool
def is_special_position(self, pos: Position, max_dist: float = 0.8) -> int
def is_special_position(self, fpos: Fractional, max_dist: float) -> int
def metric_tensor(self, /) -> SMat33d
def op_as_transform(self, arg0: Op, /) -> Transform
def orthogonalize(self, arg0: Fractional, /) -> Position
def orthogonalize_box(self, arg0: FractionalBox, /) -> PositionBox
def primitive_orth_matrix(self, centring_type: str) -> Mat33
def reciprocal(self, /) -> UnitCell
def reciprocal_metric_tensor(self, /) -> SMat33d
def set(self, arg0: float, arg1: float, arg2: float, arg3: float, arg4: float, arg5: float, /) -> None
def volume_per_image(self, /) -> float

Special methods

def __eq__(self, arg0: UnitCell, /) -> bool
def __getstate__(self, /) -> tuple
def __init__(self, /) -> None
def __init__(self, a: float, b: float, c: float, alpha: float, beta: float, gamma: float) -> None
def __repr__(self, /) -> str
def __setstate__(self, arg0: tuple, /) -> None

Properties

a: float get
alpha: float get
b: float get
beta: float get
c: float get
explicit_matrices: bool get
frac: Transform get
fractionalization_matrix: Mat33 get
gamma: float get
images: typing.List[FTransform] get
orth: Transform get
orthogonalization_matrix: Mat33 get
parameters: tuple get
volume: float get