Class Lattice#
- class py_alf.Lattice(*args, force_python_init=False)#
Finite size Bravais lattice object.
- Parameters:
- *argsdict, tuple, or list
if dict: {‘L1’: L1, ‘L2’: L2, ‘a1’: a1, ‘a2’: a2}.
if tuple or list: [L1, L2, a1, a2].
L1, L2: 2d vector defining periodic boundary conditions.
a1, a2: 2d primitive vectors.
- force_python_initbool, default=False
Force the usage of Python version of the initialization. Default behaviour is to first try compiled Fortran and fall back to Python if that fails.
- fourier_K_to_R(X)#
Fourier transform from k to r space.
Last index of input has to run over all lattice points in k space.
Last index of output runs over all lattice points in r space.
- fourier_R_to_K(X)#
Fourier transform from r to k space.
Last index of input has to run over all lattice points in r space.
Last index of output runs over all lattice points in k space.
- k_to_n(k)#
Map vector in k space to integer running over all lattice points.
- periodic_boundary_k(k)#
Apply periodic boundary conditions on vector in k space.
- periodic_boundary_r(r)#
Apply periodic boundary conditions on vector in r space.
- plot_k(data)#
Plot data in k space.
- Parameters:
- dataiterable
Index corresponds to coordinates.
- plot_r(data)#
Plot data in r space.
- Parameters:
- dataiterable
Index corresponds to coordinates.
- r_to_n(r)#
Map vector in r space to integer running over all lattice points.
- rotate(n, theta)#
Rotate vector in k space.
- Parameters:
- nint
Index corresponding to input vector.
- thetafloat
Angle of rotation.
- Returns:
- int
Index corresponding to output vector.
\(\phantom{\xi}\)