Spin¶
-
class
sisl.physics.Spin(kind='', dtype=<class 'numpy.float64'>)[source]¶ Spin class to determine configurations and spin components.
The basic class
Spinimplements 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: - kind : str or int, Spin, optional
specify the spin kind
- dtype : numpy.dtype, optional
the data-type used for the spin-component.
Attributes
NONCOLINEARConstant for a non-collinear spin configuration POLARIZEDConstant for a polarized spin configuration SPINORBITConstant for a spin-orbit spin configuration UNPOLARIZEDConstant for an un-polarized spin configuration XThe \(\boldsymbol\sigma_x\) Pauli matrix YThe \(\boldsymbol\sigma_y\) Pauli matrix ZThe \(\boldsymbol\sigma_z\) Pauli matrix dkindData-type kind dtypeData-type of the spin configuration is_colinearTrue if the configuration is polarized is_noncolinearTrue if the configuration non-collinear is_polarizedTrue if the configuration is polarized is_spinorbitTrue if the configuration is spin-orbit is_unpolarizedTrue if the configuration is not polarized kindA unique ID for the kind of spin configuration spinsNumber of spin-components Methods
__init__([kind, dtype])Initialize self. copy()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
-
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