sknano.core.crystallography.Crystal3DLattice

class sknano.core.crystallography.Crystal3DLattice(a=None, b=None, c=None, alpha=None, beta=None, gamma=None, a1=None, a2=None, a3=None, cell_matrix=None, orientation_matrix=None, offset=None)[source][source]

3D crystal lattice class.

Parameters:

a, b, c : float

alpha, beta, gamma : float

a1, a2, a3 : 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}\).
a3 Lattice vector \(\mathbf{a}_3=\mathbf{c}\).
alpha Angle between lattice vectors \(\mathbf{b}\) and \(\mathbf{c}\) in degrees.
angles Tuple of lattice parameter angles \(\alpha, \beta, \gamma\).
b Length of lattice_vector \(\mathbf{b}\).
b1 3D reciprocal lattice vector \(\mathbf{b}_1=\mathbf{a}^{*}\).
b2 3D reciprocal lattice vector \(\mathbf{b}_2=\mathbf{b}^{*}\).
b3 3D reciprocal lattice vector \(\mathbf{b}_3=\mathbf{c}^{*}\).
beta Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{c}\) in degrees.
c Length of lattice vector \(\mathbf{c}\).
cell_matrix Matrix of lattice row vectors.
cell_volume Alias for volume.
cos_alpha \(\cos\alpha\)
cos_alpha_star \(\cos\alpha^*\)
cos_beta \(\cos\beta\)
cos_beta_star \(\cos\beta^*\)
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, c, alpha, beta, gamma.
lattice_vectors Tuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\).
lengths Tuple of lattice vector lengths \(a, b, c\).
lengths_and_angles Alias for attr:Crystal3DLattice.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 Reciprocal lattice of this Crystal3DLattice.
sin_alpha \(\sin\alpha\)
sin_alpha_star \(\sin\alpha^*\)
sin_beta \(\sin\beta\)
sin_beta_star \(\sin\beta^*\)
sin_gamma \(\sin\gamma\)
sin_gamma_star \(\sin\gamma^*\)
volume Crystal cell volume.

Methods

cartesian_to_fractional(ccoords) Convert cartesian coordinate to fractional coordinate.
cubic(a) Generate a cubic 3D lattice with lattice parameter \(a\).
fractional_to_cartesian(fcoords) Convert fractional coordinate to cartesian coordinate.
hexagonal(a, c) Generate a hexagonal 3D lattice with lattice parameters \(a, c\).
monoclinic(a, b, c, beta) Generate a monoclinic 3D lattice with lattice parameters \(a, b, c, \beta\).
orthorhombic(a, b, c) Generate an orthorhombic 3D lattice with lattice parameters \(a, b, c\).
rotate([angle, axis, anchor_point, ...]) Rotate unit cell.
tetragonal(a, c) Generate a tetragonal 3D lattice with lattice parameters \(a, c\).
todict() Return dict of Crystal3DLattice parameters.
translate(t) Translate lattice.
triclinic(a, b, c, alpha, beta, gamma) Generate a triclinic 3D lattice with lattice parameters \(a, b, c, \alpha, \beta, \gamma\).
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.