sknano.core.crystallography.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][source]

2D crystal lattice class.

Parameters:

a, b : float

gamma : float

a1, a2 : array_like

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}^{*}\).
cell_area Alias for area.
cell_matrix Matrix of lattice row vectors.
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.
ortho_matrix Transformation matrix to convert from fractional coordinates to cartesian coordinates.
reciprocal_lattice Return Crystal2DLattice reciprocal lattice.
sin_gamma \(\sin\gamma\)
sin_gamma_star \(\sin\gamma^*\)

Methods

cartesian_to_fractional(ccoords) Convert cartesian coordinate to fractional coordinate.
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([angle, axis, anchor_point, ...]) 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[, pbc]) Wrap cartesian coordinate to lie within unit cell.
wrap_fractional_coordinate(p[, epsilon, pbc]) Wrap fractional coordinate to lie within unit cell.