Skip to content
Nick Papior edited this page Oct 28, 2016 · 7 revisions

sisl as a module is like any other Python module, simply issue

import sisl

to get access to sisl in your Python script.

There are several high-class objects that are the basis for many operations and functionality. To utilise sisl there are 3 basic objects that requires attention:

  • Atom

    This object handles atomic information such as, 1) atomic number, 2) atomic specie tag, 3) number of orbitals, 4) range of each orbital.

    To create a new Atom object one can call via one of these methods

     C1 = sisl.Atom(6)
     C2 = sisl.Atom[6]
    

    which results in a similar object.

    Any atom defaults to 1 orbital and with a negative orbital range to denote it being undefined.

  • SuperCell

    This object handles the unit cell and its replicas in the larger, super cell.

    The super cell contains information regarding the unit cell vectors and the number of super cells along each unit cell vector.

    To create a super cell

     sc = sisl.SuperCell([5,10,20],[5,3,1])
    

    which creates a super cell of 5x10x20 Angstrom and with a super cell with 5 auxiliary super cells in the x direction (2 on each side), 3 auxiliary super cells in the y direction (1 on each side) and only the simple unit cell in the z direction.

    The resulting super cell structure can be seen here:

    where the z direction has been removed for better visualisation.

  • Geometry

    This object handles the actual coordinates and unit cell information to construct and manipulate geometries.

    It gets assigned a SuperCell which then associates the coordinates to the position in the unit cell and the super cell.

    Each coordinate also posses the atomic species information.

    To create a geometry one does

     geom = sisl.Geometry([[0,0,0],[1,1,1]])
    

    which creates a geometry with two atoms, each atom defaults to the Hydrogen atom, and the unit cell is in this case automatically estimated to be SuperCell([2,2,2]) estimated based on the Cartesian bond-lengths.

    To set all atoms equivalently simply do

     geom = sisl.Geometry([[0,0,0],[1,1,1]],sisl.Atom[2])
    

    for Helium atoms.

    If you want to specify the super cell size you can do either of these equivalent actions:

     geom = sisl.Geometry([[0,0,0],[1,1,1]],sc=sc)
     geom = sisl.Geometry([[0,0,0],[1,1,1]],sc=[2,2,2])
    

    Where the latter is equivalent to

     geom = sisl.Geometry([[0,0,0],[1,1,1]],
                          sc=sisl.SuperCell([2,2,2]))
    

The super cell is important when you want to find neighbouring atoms as it handles periodicities etc. For instance when one creates tight-binding models its definition is important.

Clone this wiki locally