Crystal2DLattice

class sknano.core.crystallography.Crystal2DLattice(a=None, b=None, gamma=None, a1=None, a2=None, cell_matrix=None, orientation_matrix=None, offset=None)[source] [edit on github][source]

Bases: sknano.core.crystallography.LatticeBase, sknano.core.crystallography.Reciprocal2DLatticeMixin

2D crystal lattice class.

Parameters:
  • b (a,) –
  • gamma (float) –
  • a2 (a1,) –
  • cell_matrix (array_like) –
  • orientation_matrix (array_like, optional) –

Attributes

a Length of lattice vector \(\mathbf{a}\).
a1 Lattice vector \(\mathbf{a}_1=\mathbf{a}\).
a2 Lattice vector \(\mathbf{a}_2=\mathbf{b}\).
angles Lattice parameter angle gamma`.
area Crystal cell area.
b Length of lattice_vector \(\mathbf{b}\).
b1 2D reciprocal lattice vector \(\mathbf{b}_1=\mathbf{a}^{*}\).
b2 2D reciprocal lattice vector \(\mathbf{b}_2=\mathbf{b}^{*}\).
bounding_box region bounding_box.
cell Alias for cell_matrix.
cell_area Alias for area.
cell_matrix Matrix of lattice row vectors.
centroid Region centroid.
cos_gamma \(\cos\gamma\)
cos_gamma_star \(\cos\gamma^*\)
fmtstr Format string.
fractional_matrix Transformation matrix to convert from cartesian coordinates to fractional coordinates.
gamma Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees.
lattice_parameters Tuple of lattice parameters a, b, gamma.
lattice_vectors Tuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2\).
lengths Tuple of lattice parameter lengths \(a, b\).
lengths_and_angles Alias for attr:Crystal2DLattice.lattice_parameters.
matrix Alias for cell_matrix.
metric_tensor Metric tensor.
offset Lattice offset.
ortho_matrix Transformation matrix to convert from fractional coordinates to cartesian coordinates.
reciprocal_lattice Return Crystal2DLattice reciprocal lattice.
region Parallelepiped defined by lattice vectors.
sin_gamma \(\sin\gamma\)
sin_gamma_star \(\sin\gamma^*\)

Methods

cartesian_to_fractional(ccoords) Convert cartesian coordinate to fractional coordinate.
fractional_diff(fcoords1, fcoords2) Compute difference between fractional coordinates.
fractional_to_cartesian(fcoords) Convert fractional coordinate to cartesian coordinate.
hexagonal(a) Generate a hexagonal 2D lattice with lattice parameter \(a\).
oblique(a, b, gamma) Generate an oblique 2D lattice with lattice parameters \(a, b, \gamma\).
rectangular(a, b) Generate a rectangular 2D lattice with lattice parameters \(a, b\).
rotate(**kwargs) Rotate unit cell.
square(a) Generate a square 2D lattice with lattice parameter \(a\).
todict() Return dict of Crystal2DLattice parameters.
translate(t) Translate lattice.
wrap_cartesian_coordinate(p[, epsilon, pbc]) Wrap cartesian coordinate to lie within unit cell.
wrap_cartesian_coordinates(points[, ...]) Wrap array of cartesian coordinates to lie within unit cell.
wrap_fractional_coordinate(p[, epsilon, pbc]) Wrap fractional coordinate to lie within unit cell.
wrap_fractional_coordinates(points[, ...]) Wrap array of fractional coordinates to lie within unit cell.

Attributes Summary

a Length of lattice vector \(\mathbf{a}\).
a1 Lattice vector \(\mathbf{a}_1=\mathbf{a}\).
a2 Lattice vector \(\mathbf{a}_2=\mathbf{b}\).
angles Lattice parameter angle gamma`.
area Crystal cell area.
b Length of lattice_vector \(\mathbf{b}\).
cell_area Alias for area.
cos_gamma \(\cos\gamma\)
gamma Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees.
lattice_parameters Tuple of lattice parameters a, b, gamma.
lattice_vectors Tuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2\).
lengths Tuple of lattice parameter lengths \(a, b\).
lengths_and_angles Alias for attr:Crystal2DLattice.lattice_parameters.
reciprocal_lattice Return Crystal2DLattice reciprocal lattice.
sin_gamma \(\sin\gamma\)

Methods Summary

hexagonal(a) Generate a hexagonal 2D lattice with lattice parameter \(a\).
oblique(a, b, gamma) Generate an oblique 2D lattice with lattice parameters \(a, b, \gamma\).
rectangular(a, b) Generate a rectangular 2D lattice with lattice parameters \(a, b\).
square(a) Generate a square 2D lattice with lattice parameter \(a\).
todict() Return dict of Crystal2DLattice parameters.

Attributes Documentation

a

Length of lattice vector \(\mathbf{a}\).

a1

Lattice vector \(\mathbf{a}_1=\mathbf{a}\).

a2

Lattice vector \(\mathbf{a}_2=\mathbf{b}\).

angles

Lattice parameter angle gamma`.

area

Crystal cell area.

b

Length of lattice_vector \(\mathbf{b}\).

cell_area

Alias for area.

cos_gamma

\(\cos\gamma\)

gamma

Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees.

lattice_parameters

Tuple of lattice parameters a, b, gamma.

lattice_vectors

Tuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2\).

lengths

Tuple of lattice parameter lengths \(a, b\).

lengths_and_angles

Alias for attr:Crystal2DLattice.lattice_parameters.

reciprocal_lattice

Return Crystal2DLattice reciprocal lattice.

sin_gamma

\(\sin\gamma\)

Methods Documentation

classmethod hexagonal(a)[source] [edit on github][source]

Generate a hexagonal 2D lattice with lattice parameter \(a\).

classmethod oblique(a, b, gamma)[source] [edit on github][source]

Generate an oblique 2D lattice with lattice parameters \(a, b, \gamma\).

classmethod rectangular(a, b)[source] [edit on github][source]

Generate a rectangular 2D lattice with lattice parameters \(a, b\).

classmethod square(a)[source] [edit on github][source]

Generate a square 2D lattice with lattice parameter \(a\).

todict()[source] [edit on github][source]

Return dict of Crystal2DLattice parameters.