sisl.shape.Cube¶
- class sisl.shape.Cube(side, center=None)¶
Bases:
sisl.shape.Cuboid
3D Cube with equal sides
Equivalent to
Cuboid([r, r, r])
.- Parameters
side (float) – side-length of the cube, or vector
Methods
copy
()expand
(length)Expand the cuboid by a constant value along side vectors
scale
(scale)Scale the cuboid box size (center is retained)
set_center
(center)Re-setting the center can sometimes be necessary
set_origo
(origo)Re-setting the origo can sometimes be necessary
toCuboid
()Return a copy of itself
Return an ellipsoid that encompass this cuboid
toSphere
()Return a sphere that encompass this cuboid
volume
()Return volume of Cuboid
within
(other, *args, **kwargs)Return
True
if other is fully within selfwithin_index
(other[, tol])Return indices of the other object which are contained in the shape
The geometric center of the shape
The lengths of each of the vector that defines the cuboid
Return the origin of the Cuboid (lower-left corner)
- property center¶
The geometric center of the shape
- copy()¶
- property edge_length¶
The lengths of each of the vector that defines the cuboid
- expand(length)¶
Expand the cuboid by a constant value along side vectors
- Parameters
length (float or (3,)) – the extension in Ang per cuboid vector.
- property origo¶
Return the origin of the Cuboid (lower-left corner)
- scale(scale)¶
Scale the cuboid box size (center is retained)
- set_center(center)¶
Re-setting the center can sometimes be necessary
- set_origo(origo)¶
Re-setting the origo can sometimes be necessary
- toCuboid()¶
Return a copy of itself
- toEllipsoid()¶
Return an ellipsoid that encompass this cuboid
- toSphere()¶
Return a sphere that encompass this cuboid
- volume()¶
Return volume of Cuboid
- within(other, *args, **kwargs)¶
Return
True
if other is fully within selfIf other is an array, an array will be returned for each of these.
- Parameters
other (array_like) – the array/object that is checked for containment
*args – passed directly to
within_index
**kwargs – passed directly to
within_index