Functional programming
sisl provides simple functionality that may be used by various sisl objects.
Tip
All of these functional methods can automatically handle external
classes. But only if sisl
has an internal conversion of that
object.
E.g. one can do:
from ase.build import bulk
import sisl as si
bulk_rotated = si.rotate(bulk("Au"), 30, [1, 1, 1])
Note that sisl
will automatically convert the ase.Atoms
object
to a sisl.Geometry
, and then do the rotation call.
There are a couple of scenarios:
The
sisl
function returns the same object as the input. In the above case, aGeometry
. When this is the case the method will try and convert it back to the input class. And if this succeeds, it will be returned. To forcefully return thesisl
type, dosi.rotate(..., ret_sisl=True)
.The
sisl
function returns something different from the input. In this case, the value is returned as-is, regardless ofret_sisl
.
The functional methods will not allow Python built-in’s to convert. Since that can lead to ambiguous behaviour.
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
Dispatcher for berry_curvature |
|
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
Dispatcher for spin_berry_curvature |
|
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |
Dispatcher for |
|
|
Dispatcher for velocity |
|
Dispatcher for |
|
Dispatcher for |
|
Dispatcher for |