sisl.physics.spin module

Implementation of class to determine spin 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(1) == Spin('non-polarized') == Spin('unpolarized') == Spin('un-polarized')
>>> Spin(2) == Spin('polarized') == Spin('p')
>>> Spin(2, dtype=np.complex128) == Spin('non-colinear') == Spin('nc') == Spin(4)
>>> Spin(4, dtype=np.complex128) == Spin('spin-orbit') == Spin('so') == Spin(8)

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.

class sisl.physics.spin.Spin(spin='', dtype=None)[source]

Bases: object

Implementation of the spin configuration space

Attributes

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-colinear
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
spin Number of spin-components

Methods

copy()
NONCOLLINEAR = 2
POLARIZED = 1
SPINORBIT = 3
UNPOLARIZED = 0
copy()[source]
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-colinear

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

spin

Number of spin-components