sisl.shape.prism4 module

Implement a set of simple shapes that

class sisl.shape.prism4.Cuboid(edge_length, center=None)[source]

Bases: sisl.shape.shape.Shape

A cuboid/rectangular prism (P4) with equi-opposite faces

Attributes

center Return the geometric center of the shape
displacement Return the displacement vector of the Cuboid
edge_length Return the edge-length of the Cuboid
origo Return the origin of the Cuboid (lower-left corner)
volume Return the edge-length of the Cuboid

Methods

__call__(*args, **kwargs) Re-initialize the Shape
enlarge(length) Return a new Shape with an increased size length
expand(length) Return a new shape with a larger corresponding to length
iwithin(other[, return_sub]) Return indices of the other object which are contained in the shape
set_center(center) Re-setting the center can sometimes be necessary
within(other[, return_sub]) Return a True/False value of whether the other object is contained in this shape
displacement

Return the displacement vector of the Cuboid

edge_length

Return the edge-length of the Cuboid

expand(length)[source]

Return a new shape with a larger corresponding to length

iwithin(other, return_sub=False)[source]

Return indices of the other object which are contained in the shape

Parameters:

other : (numpy.ndarray, list, tuple)

the object that is checked for containment

origo

Return the origin of the Cuboid (lower-left corner)

set_center(center)[source]

Re-setting the center can sometimes be necessary

volume

Return the edge-length of the Cuboid

within(other, return_sub=False)[source]

Return a True/False value of whether the other object is contained in this shape

Parameters:

other : (numpy.ndarray, list, tuple)

the object that is checked for containment

class sisl.shape.prism4.Cube(edge_length, origo=None)[source]

Bases: sisl.shape.prism4.Cuboid

A cuboid/rectangular prism (P4) with all-equi faces

Attributes

center Return the geometric center of the shape
displacement Return the displacement vector of the Cuboid
edge_length Return the edge-length of the Cuboid
origo Return the origin of the Cuboid (lower-left corner)
volume Return the edge-length of the Cuboid

Methods

__call__(*args, **kwargs) Re-initialize the Shape
enlarge(length) Return a new Shape with an increased size length
expand(length) Return a new shape with a larger corresponding to length
iwithin(other[, return_sub]) Return indices of the other object which are contained in the shape
set_center(center) Re-setting the center can sometimes be necessary
within(other[, return_sub]) Return a True/False value of whether the other object is contained in this shape