nanotools.hamiltonian module

Hamiltonian module

class nanotools.hamiltonian.Hamiltonian(extpot=NOTHING, ispin=1, soc=False)[source]

Bases: Base

Hamiltonian class.

extpot

Contains the external potential parameters.

Type:

Extpot

ispin

Hamiltonian spin-treatment level:

  • 1 : degenerate

  • 2 : collinear

  • 4 : non-collinear

Type:

int

soc

Include spin-orbit coupling if True.

Type:

bool

get_ispin()[source]

Returns the spin-treatment level.

get_spin_num()[source]

Returns number of spin channels.

set_ispin(ispin)[source]

Sets spin-treatment level.

One can set ispin either as an int or str. The correspondence is as follows

  • 1 == “degenerate”

  • 2 == “collinear”

  • 4 == “non-collinear”

Parameters:

ispin (int, str) – spin-treatment level.

set_soc(soc)[source]

Sets soc switch.

Parameters:

soc (bool) – If True then SOC is included and it isn’t otherwise.