region
Functions and attributes
- class atomman.region.Cylinder(center1: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], center2: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], radius: float, endcaps: bool = True)
Bases:
Shape
Class representing a cylinder in space.
- property endcaps: float
indicates if the endcaps are included in inside/outside determination
- Type:
- inside(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = True) ndarray
Indicates if position(s) are inside the shape.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points on the shape’s boundaries are to be included. Default value is True.
- Returns:
N array of bool values: True if inside shape
- Return type:
numpy.NDArray
- class atomman.region.Plane(normal: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], point: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes])
Bases:
object
Class representing a plane in space. Useful for making slices.
- above(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = False) ndarray
Indicates if position(s) are above the plane. Note that identifying points as above or below is dependent on the sign of the plane normal.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points in the plane are to be included. Default value is False.
- Returns:
N array of bool values: True if above the plane
- Return type:
numpy.NDArray
- below(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = True) ndarray
Indicates if position(s) are below the plane. Note that identifying points as above or below is dependent on the sign of the plane normal.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points in the plane are to be included. Default value is True.
- Returns:
N array of bool values: True if below the plane
- Return type:
numpy.NDArray
- isclose(other: Plane, atol: float = 1e-08) bool
Check the plane and a given one represent the same. Note that if the normal vectors of the two planes are antiparallel, they are considered to be different.
- Parameters:
- Returns:
Return true if the plane and a given one represent the same within tolerance.
- Return type:
- operate(rotation: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], translation: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes]) Plane
Return a new plane transformed by given symmetry operation
- Parameters:
rotation (array-like, (3, 3)) – rotation matrix in cartedian coordinates
translation (array-like, (3, )) – translation matrix in cartedian coordinates
- Returns:
A new plane transformed by the specified operations.
- Return type:
- class atomman.region.PlaneSet(planes: Plane | List[Plane])
Bases:
Shape
Class consisting of a shape defined by a set of planes
- inside(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = True) ndarray
Indicates if position(s) are inside the shape.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points on the shape’s boundaries are to be included. Default value is True.
- Returns:
N array of bool values: True if inside shape
- Return type:
numpy.NDArray
- class atomman.region.Shape
Bases:
object
Template class for defining geometric regions in space.
- inside(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = True) ndarray
Indicates if position(s) are inside the shape.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points on the shape’s boundaries are to be included. Default value is True.
- Returns:
N array of bool values: True if inside shape
- Return type:
numpy.NDArray
- outside(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = False) ndarray
Indicates if position(s) are inside the shape.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points on the shape’s boundaries are to be included. Default value is False.
- Returns:
N array of bool values: True if outside shape
- Return type:
numpy.NDArray
- class atomman.region.Sphere(center: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], radius: float)
Bases:
Shape
Class representing a sphere in space.
- inside(pos: _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | bool | int | float | complex | str | bytes | _NestedSequence[bool | int | float | complex | str | bytes], inclusive: bool = True) ndarray
Indicates if position(s) are inside the shape.
- Parameters:
pos (array-like object) – Nx3 array of coordinates.
inclusive (bool, optional) – Indicates if points on the shape’s boundaries are to be included. Default value is True.
- Returns:
N array of bool values: True if inside shape
- Return type:
numpy.NDArray