Package schrodinger :: Package application :: Package matsci :: Package nano :: Module plane :: Class CrystalPlane
[hide private]
[frames] | no frames]

Class CrystalPlane

object --+
         |
        CrystalPlane

Manage a crystal plane object.

Instance Methods [hide private]
 
__init__(self, h_index, k_index, l_index, a_vec, b_vec, c_vec, origin=array([ 0., 0., 0.]), logger=None)
Create an instance.
 
checkMillerIndices(self)
Check the user provided Miller indices.
three numpy.array
getReciprocals(self)
Return the reciprocal lattice vectors.
numpy.array
getNormal(self)
Return the normal vector.
numpy.array, numpy.array, numpy.array
getLinDepPlaneVectors(self)
Return three typically used plane vectors that are linearly dependent.
numpy.array, numpy.array, numpy.array
getSimpleSlabVectors(self)
Return the simple slab vectors, by simple we mean cases where at least one of the Miller indices of the plane is zero.
numpy.array, numpy.array, numpy.array
getSlabVectors(self)
Return the slab vectors.
list of numpy.array
getSpanningVectors(self, ncella=1, ncellb=1, ncellc=1)
Return the spanning vectors of this bounding box.
int
getNumPlanes(self, ncella=1, ncellb=1, ncellc=1)
Return the number of planes that will fit inside the bounding box.
float
getInterPlanarSeparation(self)
Return the inter-planar separation in Angstrom.
two numpy.array
getRotationToZ(self)
Return the rotation matrix needed to rotate this plane to the XY-plane as well as its inverse.
list of numpy.array
getSquareVertices(self)
Return the vertices of a square that lies in this plane.
list of tuples of heads and tails of 12 line segments.
getParallelepipedLineSegments(self, ncella=1, ncellb=1, ncellc=1)
Return the line segments that make this bounding box.
list of numpy.array
getPlaneBoxIntersections(self, vertices, ncella=1, ncellb=1, ncellc=1)
Return the points where the plane containing the specified vertices intersects the parallelepiped.
list of numpy.array
getOrderedIntersections(self, intersections)
Return the provided list of planar points in counter-clockwise order.
list of list of numpy.array
getVerticesOfAllPlanes(self, ncella=1, ncellb=1, ncellc=1, nplanes=None)
Return a list of lists of points where the set of planes intersect the parallelepiped.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  SQUARE = OrderedDict([(1, array([-1., 1., 0.])), (2, array([...
  DISTANCE_THRESH = -0.001
  SAME_VECTOR_THRESH = 0.0001
  SLAB_THRESHOLD = 1e-07
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, h_index, k_index, l_index, a_vec, b_vec, c_vec, origin=array([ 0., 0., 0.]), logger=None)
(Constructor)

 

Create an instance.

Parameters:
  • h_index (int) - the h Miller index
  • k_index (int) - the k Miller index
  • l_index (int) - the l Miller index
  • a_vec (numpy.array) - the a lattice vector
  • b_vec (numpy.array) - the b lattice vector
  • c_vec (numpy.array) - the c lattice vector
  • origin (numpy.array) - the origin of the lattice vectors
  • logger (logging.getLogger) - output logger
Overrides: object.__init__

getReciprocals(self)

 

Return the reciprocal lattice vectors.

Returns: three numpy.array
the three reciprocal lattice vectors.

getNormal(self)

 

Return the normal vector.

Returns: numpy.array
the normal vector for this plane

getLinDepPlaneVectors(self)

 

Return three typically used plane vectors that are linearly dependent.

Returns: numpy.array, numpy.array, numpy.array
typically used plane vectors that are linearly dependent

getSimpleSlabVectors(self)

 

Return the simple slab vectors, by simple we mean cases where at least one of the Miller indices of the plane is zero.

Returns: numpy.array, numpy.array, numpy.array
the slab vectors, the first two are the plane vectors and the last is the unit normal vector defining the thickness

getSlabVectors(self)

 

Return the slab vectors.

Returns: numpy.array, numpy.array, numpy.array
the slab vectors, the first two are the plane vectors and the last is the unit normal vector defining the thickness

getSpanningVectors(self, ncella=1, ncellb=1, ncellc=1)

 

Return the spanning vectors of this bounding box.

Parameters:
  • ncella (int) - the number of cells along a
  • ncellb (int) - the number of cells along b
  • ncellc (int) - the number of cells along c
Returns: list of numpy.array
contains vectors spanning the parallelepiped and its sides

getNumPlanes(self, ncella=1, ncellb=1, ncellc=1)

 

Return the number of planes that will fit inside the bounding box.

Parameters:
  • ncella (int) - the number of cells along a
  • ncellb (int) - the number of cells along b
  • ncellc (int) - the number of cells along c
Returns: int
the number of planes that will fit inside the bounding box

getInterPlanarSeparation(self)

 

Return the inter-planar separation in Angstrom.

Returns: float
the inter-planar separation in Angstrom

getRotationToZ(self)

 

Return the rotation matrix needed to rotate this plane to the XY-plane as well as its inverse.

Returns: two numpy.array
the rotation matrix that rotates this plane to the XY-plane and its inverse.

getSquareVertices(self)

 

Return the vertices of a square that lies in this plane. The square has and edge-length of 2 Angstrom. It is rotated from the XY-plane, centered on origin, into this plane.

Returns: list of numpy.array
the vertices of the squre that lies in this plane

getParallelepipedLineSegments(self, ncella=1, ncellb=1, ncellc=1)

 

Return the line segments that make this bounding box.

Parameters:
  • ncella (int) - the number of cells along a
  • ncellb (int) - the number of cells along b
  • ncellc (int) - the number of cells along c
Returns: list of tuples of heads and tails of 12 line segments.
the line segments that make this bounding box

getPlaneBoxIntersections(self, vertices, ncella=1, ncellb=1, ncellc=1)

 

Return the points where the plane containing the specified vertices intersects the parallelepiped.

Parameters:
  • vertices (list of numpy.array) - the vertices of the square that lies in this plane
  • ncella (int) - the number of cells along a
  • ncellb (int) - the number of cells along b
  • ncellc (int) - the number of cells along c
Returns: list of numpy.array
the points of intersection

getOrderedIntersections(self, intersections)

 

Return the provided list of planar points in counter-clockwise order.

Parameters:
  • intersections (list of numpy.array) - some intersection points in a plane
Returns: list of numpy.array
those planar intersections in counter-clockwise order

getVerticesOfAllPlanes(self, ncella=1, ncellb=1, ncellc=1, nplanes=None)

 

Return a list of lists of points where the set of planes intersect the parallelepiped.

Parameters:
  • ncella (int) - the number of cells along a
  • ncellb (int) - the number of cells along b
  • ncellc (int) - the number of cells along c
  • nplanes (int) - the number of planes to generate in the backwards and forwards direction
Returns: list of list of numpy.array
where the planes intersect the parallelepiped

Class Variable Details [hide private]

SQUARE

Value:
OrderedDict([(1, array([-1.,  1.,  0.])), (2, array([-1., -1.,  0.])),\
 (3, array([ 1., -1.,  0.])), (4, array([ 1.,  1.,  0.]))])