wulfric.Crystal.shift_atoms#

method

Crystal.shift_atoms(gravity_point=(0.5, 0.5, 0.5), relative=True)[source]#

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.

Added in version 0.3.0.

I.e. if there is one atom in the cell, then it is placed in the center of the cell for gravity_point = (0.5, 0.5, 0.5).

Parameters:
gravity_point(3,) array-like, default (0.5, 0.5, 0.5)

Relative coordinates of the gravity point.

relativebool, default True

Whether the gravity_point is given in relative coordinates.