wulfric.Crystal#
- class wulfric.Crystal(lattice: Lattice = None, atoms=None, relative=True, **kwargs)[source]#
Crystal class.
It is a child of Lattice class.
Iterable over atoms. All attributes of the
Latticeare accessible directly from the crystal:>>> import wulfric as wulf >>> cub = wulf.lattice_example("CUB") >>> crystal = wulf.Crystal(cub) >>> crystal.pearson_symbol 'cP'
For the full description of the lattice attributes and methods see Lattice.
- Parameters:
- Attributes:
- atomslist
List of atoms of the crystal.
Methods:
add_atom([new_atom, relative])Add atom to the crystal.
copy()Copy of the crystal.
Shifts all atoms with the same vector in a way that all relative coordinates becomes non-negative.
Detect primitive cell.
get_atom(name[, index, return_all])Return atom object of the crystal.
get_atom_coordinates(atom[, R, index, relative])Getter for the atom coordinates.
get_distance(atom1, atom2[, R, index1, ...])Getter for distance between the atom1 and atom2.
get_vector(atom1, atom2[, R, index1, ...])Getter for vector from atom1 to atom2.
remove_atom(atom[, index])Remove atom from the crystal.
shift_atoms([gravity_point, relative])Shifts all atoms with the same vector in a way that the
gravity_pointis located in the middle between minimum and maximum relative coordinates of the atoms, individually for each lattice vector.Standardize cell with respect to the Bravais lattice type as defined in [R01e341c7223d-1].
type([eps_rel, angle_tol])Identify the lattice type.
voronoi_cell([reciprocal, normalize])Computes Voronoi edges around (0,0,0) point.
Properties:
Transformation matrix that transforms primitive cell (
Lattice.cell()) to the conventional standardized cell.Transformation matrix that transforms the primitive cell to the standardized primitive cell.
Length of the first lattice vector \(\vert\boldsymbol{a_1}\vert\).
First lattice vector \(\boldsymbol{a_1}\).
Second lattice vector \(\boldsymbol{a_2}\).
Third lattice vector \(\boldsymbol{a_3}\).
Angle between second and third lattice vector.
Absolute tolerance for the angle.
Length of the second lattice vector \(\vert\boldsymbol{a_2}\vert\).
First reciprocal lattice vector.
Second reciprocal lattice vector.
Third reciprocal lattice vector.
Angle between first and third lattice vector.
Length of the third lattice vector \(\vert\boldsymbol{a_3}\vert\).
Unit cell of the lattice.
Centring type.
Length of the first vector of the conventional cell.
First vector of the conventional cell.
Second vector of the conventional cell.
Third vector of the conventional cell.
Angle between second and third conventional lattice vector.
Length of the second vector of the conventional cell.
Angle between first and third conventional lattice vector.
Length of the third vector of the conventional cell.
Conventional cell.
Angle between first and second conventional lattice vector.
Return conventional cell parameters.
Volume of the conventional unit cell.
Convention used for the standardization of the unit cell.
Crystal family.
Absolute tolerance for the distance.
Relative tolerance for the distance.
Angle between first and second lattice vector.
Length of the first reciprocal lattice vector \(\vert\boldsymbol{b_1}\vert\).
Angle between second and third reciprocal lattice vector.
Length of the second reciprocal lattice vector \(\vert\boldsymbol{b_2}\vert\).
Angle between first and third reciprocal lattice vector.
Length of the third reciprocal lattice vector \(\vert\boldsymbol{b_3}\vert\).
Angle between first and second reciprocal lattice vector.
Instance of
Kpointswith the high symmetry points and path.Lattice of the crystal.
Human-readable name of the Bravais lattice type.
Return cell parameters.
Pearson symbol.
Reciprocal cell.
Reciprocal cell.
Volume of the reciprocal cell.
Return reciprocal cell parameters.
Volume of the unit cell.
Variation of the lattice, if any.