Skip to content
/ sisl Public
forked from zerothi/sisl

Scientific Python toolbox for large scale tight-binding and electronic structure calculations (DFT and NEGF analysis)

License

Notifications You must be signed in to change notification settings

sofiasanz/sisl

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sisl

Install sisl using PyPI Install sisl using conda DOI for citation Join discussion on Discord

License: MPL 2.0 Build Status Checkout sisl code coverage

Why sisl

The Python library sisl was born out of a need to handle(create and read), manipulate and analyse output from DFT programs. It was initially developed by Nick Papior (co-developer of Siesta) as a side-project to TranSiesta and TBtrans to efficiently analyse TBtrans output for N-electrode calculations.
Since then it has expanded to accommodate a rich set of DFT code input/outputs such as (but not limited to) VASP, OpenMX, BigDFT, Wannier90.

A great deal of codes are implementing, roughly, the same thing. However, every code implements their own analysis and post-processing utilities which typically turns out to be equivalent utilities only having the interface differently.

sisl tries to solve some of the analysis issues by creating a unified scripting approach in Python which does analysis using the same interface, regardless of code being used. For instance one may read the Kohn-Sham eigenvalue spectrum from various codes and return them in a consistent manner so the post-processing is the same, regardless of code being used.

sisl is also part of the training material for a series of workshops hosted here.

In some regards it has overlap with ASE and sisl also interfaces with ASE.

Example use

Here we show 2 examples of using sisl together with Siesta.

To read in a Hamiltonian from a Siesta calculation and calculate the DOS for a given Monkhorst-Pack grid one would do:

import numpy as np
import sisl
H = sisl.get_sile('RUN.fdf').read_hamiltonian()
mp = sisl.MonkhorstPack(H, [13, 13, 13])
E = np.linspace(-4, 4, 500)
DOS = mp.apply.average.DOS(E)
from matplotlib import pyplot as plt
plt.plot(E, DOS)

Which calculates the DOS for a 13x13x13 Monkhorst-Pack grid.

Another common analysis is real-space charge analysis, the following command line subtracts two real-space charge grids and writes them to a CUBE file:

sgrid reference/Rho.grid.nc --diff Rho.grid.nc --geometry RUN.fdf --out diff.cube

which may be analysed using VMD, XCrySDen or other tools.

Installation

Installing sisl using PyPi or Conda is the easiest:

python3 -m pip install sisl
python3 -m pip install sisl[analysis] # also installs tqdm and xarray
# or
conda install -c conda-forge sisl

If performing a manual installation, these packages are required:

  • A C- and fortran-compiler
  • Cython (0.28 or later)
  • numpy (1.13 or later)
  • scipy (0.18 or later)
  • netCDF4
  • setuptools
  • pyparsing (1.5.7 or later)
  • pytest, optional dependency for running the tests
  • matplotlib, encouraged optional dependency
  • tqdm, encouraged optional dependency
  • xarray, optional dependency
  • plotly, optional dependency

Subsequently manual installation may be done using this command:

python3 setup.py install --prefix=<prefix>

If trying to install without root access, you may be required to use this command:

python3 setup.py install --user --prefix=<prefix>

Once installed, the installation can be tested by executing the following:

pytest --pyargs sisl

Everyday use of sisl

There are different places for getting information on using sisl, here is a short list of places to search/ask for answers:

If sisl was used to produce scientific contributions, please use this DOI for citation. We recommend to specify the version of sisl in combination of this citation:

@misc{zerothi_sisl,
  author = {Papior, Nick},
  title  = {sisl: v<fill-version>},
  year   = {2021},
  doi    = {10.5281/zenodo.597181},
  url    = {https://doi.org/10.5281/zenodo.597181}
}

To get the BibTeX entry easily you may issue the following command:

sdata --cite

which fills in the version number.

Help sisl help you!

If you have

  • ideas of missing features
  • ideas for improving documentation
  • found a bug
  • found a documentation error
  • created a tutorial

Then please share them here!

All of the above may be done via a pull-request or by opening an issue.

Remember:

No contribution is too small!

About

Scientific Python toolbox for large scale tight-binding and electronic structure calculations (DFT and NEGF analysis)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 91.6%
  • Cython 6.0%
  • Fortran 2.0%
  • Other 0.4%