Giter Site home page Giter Site logo

gilbertwang1986 / sisl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zerothi/sisl

0.0 0.0 0.0 36.2 MB

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

Home Page: https://zerothi.github.io/sisl

License: GNU Lesser General Public License v3.0

Python 96.93% Shell 0.19% Fortran 2.65% Jupyter Notebook 0.24%

sisl's Introduction

sisl

Install sisl using PyPI Install sisl using conda DOI for citation Join the chat at https://gitter.im/sisl-tool/Lobby

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.asaverage().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!

sisl's People

Contributors

zerothi avatar tfrederiksen avatar jonaslb avatar pfebrer avatar sofiasanz avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.