Crystal#

Class#

Crystal([lattice, atoms, relative])

Crystal class.

Hint

All properties and methods of Lattice are accessible directly from the crystal instance:

>>> import wulfric as wulf
>>> c = wulf.Crystal()
>>> c.a
1.0
>>> c.b
1.0
>>> c.c
1.0

Cell standardization#

Crystal.standardize()

Standardize cell with respect to the Bravais lattice type as defined in [R01e341c7223d-1].

Manipulations with atoms#

  • Crystal.atoms

Crystal.add_atom([new_atom, relative])

Add atom to the crystal.

Crystal.remove_atom(atom[, index])

Remove atom from the crystal.

Crystal.get_atom(name[, index, return_all])

Return atom object of the crystal.

Crystal.shift_atoms([gravity_point, relative])

Shifts all atoms with the same vector in a way that the gravity_point is located in the middle between minimum and maximum relative coordinates of the atoms, individually for each lattice vector.

Crystal.cure_negative()

Shifts all atoms with the same vector in a way that all relative coordinates becomes non-negative.

Positioning of atoms#

Crystal.get_atom_coordinates(atom[, R, ...])

Getter for the atom coordinates.

Crystal.get_distance(atom1, atom2[, R, ...])

Getter for distance between the atom1 and atom2.

Crystal.get_vector(atom1, atom2[, R, ...])

Getter for vector from atom1 to atom2.

Primitive cell#

Crystal.find_primitive_cell()

Detect primitive cell.

Lattice getter#

Crystal.lattice

Lattice of the crystal.

Independent copy#

Crystal.copy()

Copy of the crystal.