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] [edit on github][source]¶ Bases:
sknano.core.crystallography.LatticeBase,sknano.core.crystallography.ReciprocalLatticeMixin3D crystal lattice class.
Parameters: - b, c (a,) –
- beta, gamma (alpha,) –
- a2, a3 (a1,) –
- cell_matrix (array_like) –
- orientation_matrix (array_like, optional) –
Attributes
aLength of lattice vector \(\mathbf{a}\). a1Lattice vector \(\mathbf{a}_1=\mathbf{a}\). a2Lattice vector \(\mathbf{a}_2=\mathbf{b}\). a3Lattice vector \(\mathbf{a}_3=\mathbf{c}\). alphaAngle between lattice vectors \(\mathbf{b}\) and \(\mathbf{c}\) in degrees. anglesTuple of lattice parameter angles \(\alpha, \beta, \gamma\). bLength of lattice_vector \(\mathbf{b}\). b13D reciprocal lattice vector \(\mathbf{b}_1=\mathbf{a}^{*}\). b23D reciprocal lattice vector \(\mathbf{b}_2=\mathbf{b}^{*}\). b33D reciprocal lattice vector \(\mathbf{b}_3=\mathbf{c}^{*}\). betaAngle between lattice vectors \(\mathbf{a}\) and \(\mathbf{c}\) in degrees. bounding_boxregionbounding_box.cLength of lattice vector \(\mathbf{c}\). cellAlias for cell_matrix.cell_matrixMatrix of lattice row vectors. cell_volumeAlias for volume.centroidRegion centroid. 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^*\) fmtstrFormat string. fractional_matrixTransformation matrix to convert from cartesian coordinates to fractional coordinates. gammaAngle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees. lattice_parametersTuple of lattice parameters a,b,c,alpha,beta,gamma.lattice_vectorsTuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\). lengthsTuple of lattice vector lengths \(a, b, c\). lengths_and_anglesAlias for attr: Crystal3DLattice.lattice_parameters.matrixAlias for cell_matrix.metric_tensorMetric tensor. offsetLattice offset. ortho_matrixTransformation matrix to convert from fractional coordinates to cartesian coordinates. reciprocal_latticeReciprocal lattice of this Crystal3DLattice.regionParallelepipeddefined by lattice vectors.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^*\) volumeCrystal 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_diff(fcoords1, fcoords2)Compute difference between fractional coordinates. 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(**kwargs)Rotate unit cell. tetragonal(a, c)Generate a tetragonal 3D lattice with lattice parameters \(a, c\). todict()Return dictofCrystal3DLatticeparameters.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[, 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
aLength of lattice vector \(\mathbf{a}\). a1Lattice vector \(\mathbf{a}_1=\mathbf{a}\). a2Lattice vector \(\mathbf{a}_2=\mathbf{b}\). a3Lattice vector \(\mathbf{a}_3=\mathbf{c}\). alphaAngle between lattice vectors \(\mathbf{b}\) and \(\mathbf{c}\) in degrees. anglesTuple of lattice parameter angles \(\alpha, \beta, \gamma\). bLength of lattice_vector \(\mathbf{b}\). betaAngle between lattice vectors \(\mathbf{a}\) and \(\mathbf{c}\) in degrees. cLength of lattice vector \(\mathbf{c}\). cell_volumeAlias for volume.cos_alpha\(\cos\alpha\) cos_beta\(\cos\beta\) cos_gamma\(\cos\gamma\) gammaAngle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees. lattice_parametersTuple of lattice parameters a,b,c,alpha,beta,gamma.lattice_vectorsTuple of lattice vectors \(\mathbf{a}_1, \mathbf{a}_2, \mathbf{a}_3\). lengthsTuple of lattice vector lengths \(a, b, c\). lengths_and_anglesAlias for attr: Crystal3DLattice.lattice_parameters.ortho_matrixTransformation matrix to convert from fractional coordinates to cartesian coordinates. reciprocal_latticeReciprocal lattice of this Crystal3DLattice.sin_alpha\(\sin\alpha\) sin_beta\(\sin\beta\) sin_gamma\(\sin\gamma\) volumeCrystal cell volume. Methods Summary
cubic(a)Generate a cubic 3D lattice with lattice parameter \(a\). 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\). tetragonal(a, c)Generate a tetragonal 3D lattice with lattice parameters \(a, c\). todict()Return dictofCrystal3DLatticeparameters.triclinic(a, b, c, alpha, beta, gamma)Generate a triclinic 3D lattice with lattice parameters \(a, b, c, \alpha, \beta, \gamma\). 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}\).
-
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}\).
-
beta¶ Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{c}\) in degrees.
-
c¶ Length of lattice vector \(\mathbf{c}\).
-
cos_alpha¶ \(\cos\alpha\)
-
cos_beta¶ \(\cos\beta\)
-
cos_gamma¶ \(\cos\gamma\)
-
gamma¶ Angle between lattice vectors \(\mathbf{a}\) and \(\mathbf{b}\) in degrees.
-
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.
-
ortho_matrix¶ Transformation matrix to convert from fractional coordinates to cartesian coordinates.
-
reciprocal_lattice¶ Reciprocal lattice of this
Crystal3DLattice.
-
sin_alpha¶ \(\sin\alpha\)
-
sin_beta¶ \(\sin\beta\)
-
sin_gamma¶ \(\sin\gamma\)
-
volume¶ Crystal cell volume.
Methods Documentation
-
classmethod
cubic(a)[source] [edit on github][source]¶ Generate a cubic 3D lattice with lattice parameter \(a\).
-
classmethod
hexagonal(a, c)[source] [edit on github][source]¶ Generate a hexagonal 3D lattice with lattice parameters \(a, c\).
-
classmethod
monoclinic(a, b, c, beta)[source] [edit on github][source]¶ Generate a monoclinic 3D lattice with lattice parameters \(a, b, c, \beta\).
-
classmethod
orthorhombic(a, b, c)[source] [edit on github][source]¶ Generate an orthorhombic 3D lattice with lattice parameters \(a, b, c\).
-
classmethod
tetragonal(a, c)[source] [edit on github][source]¶ Generate a tetragonal 3D lattice with lattice parameters \(a, c\).
-
todict()[source] [edit on github][source]¶ Return
dictofCrystal3DLatticeparameters.
-
classmethod
triclinic(a, b, c, alpha, beta, gamma)[source] [edit on github][source]¶ Generate a triclinic 3D lattice with lattice parameters \(a, b, c, \alpha, \beta, \gamma\).