Skip to main content

Python interface for tight-binding model creation and analysis of DFT output. Input mechanism for large scale transport calculations using NEGF TBtrans (TranSiesta)

Project description

sisl

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

License: LGPL v3 Build Status Checkout sisl code coverage Donate money to support development of sisl

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:

pip3 install sisl
pip3 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
  • 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

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   = {2020},
  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've ideas of missing features
  • If you've ideas for improving documentation
  • If you've found a bug
  • If you've found a documentation error
  • If you've 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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sisl, version 0.11.0
Filename, size File type Python version Upload date Hashes
Filename, size sisl-0.11.0.tar.gz (4.1 MB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page