Spin

class sisl.physics.Spin(kind='', dtype=<class 'numpy.float64'>)[source]

Spin class to determine configurations and spin components.

The basic class Spin implements a generic method to determine a spin configuration.

Its usage can be summarized in these few examples:

>>> Spin(Spin.UNPOLARIZED) == Spin('unpolarized') == Spin()
True
>>> Spin(Spin.POLARIZED) == Spin('polarized') == Spin('p')
True
>>> Spin(Spin.NONCOLINEAR, dtype=np.complex128) == Spin('non-collinear') == Spin('nc')
True
>>> Spin(Spin.SPINORBIT, dtype=np.complex128) == Spin('spin-orbit') == Spin('so')
True

Note that a data-type may be associated with a spin-object. This is not to say that the data-type is used in the configuration, but merely that it helps any sub-classed or classes who use the spin-object to determine the usage of the different spin-components.

Parameters
kindstr or int, Spin, optional

specify the spin kind

dtypenumpy.dtype, optional

the data-type used for the spin-component.

Attributes

NONCOLINEAR

Constant for a non-collinear spin configuration

POLARIZED

Constant for a polarized spin configuration

SPINORBIT

Constant for a spin-orbit spin configuration

UNPOLARIZED

Constant for an un-polarized spin configuration

X

The \(\boldsymbol\sigma_x\) Pauli matrix

Y

The \(\boldsymbol\sigma_y\) Pauli matrix

Z

The \(\boldsymbol\sigma_z\) Pauli matrix

dkind

Data-type kind

dtype

Data-type of the spin configuration

is_colinear

True if the configuration is polarized

is_noncolinear

True if the configuration non-collinear

is_polarized

True if the configuration is polarized

is_spinorbit

True if the configuration is spin-orbit

is_unpolarized

True if the configuration is not polarized

kind

A unique ID for the kind of spin configuration

spins

Number of spin-components

Methods

__init__(self[, kind, dtype])

Initialize self.

copy(self)

Create a copy of the spin-object

NONCOLINEAR = 2

Constant for a non-collinear spin configuration

POLARIZED = 1

Constant for a polarized spin configuration

SPINORBIT = 3

Constant for a spin-orbit spin configuration

UNPOLARIZED = 0

Constant for an un-polarized spin configuration

X = array([[0.+0.j, 1.+0.j], [1.+0.j, 0.+0.j]])

The \(\boldsymbol\sigma_x\) Pauli matrix

Y = array([[ 0.+0.j, -0.-1.j], [ 0.+1.j, 0.+0.j]])

The \(\boldsymbol\sigma_y\) Pauli matrix

Z = array([[ 1.+0.j, 0.+0.j], [ 0.+0.j, -1.+0.j]])

The \(\boldsymbol\sigma_z\) Pauli matrix

copy(self)[source]

Create a copy of the spin-object

property dkind

Data-type kind

property dtype

Data-type of the spin configuration

property is_colinear

True if the configuration is polarized

property is_noncolinear

True if the configuration non-collinear

property is_polarized

True if the configuration is polarized

property is_spinorbit

True if the configuration is spin-orbit

property is_unpolarized

True if the configuration is not polarized

property kind

A unique ID for the kind of spin configuration

property spins

Number of spin-components