usnistgov / tb3py

TB3Py: Two- and three-body tight-binding calculations for materials
https://doi.org/10.1103/PhysRevMaterials.7.044603
Other
16 stars 3 forks source link

name alt text codecov alt text GitHub tag (latest SemVer) PyPI GitHub repo size

TB3PY

by Kevin F. Garrity and Kamal Choudhary

This is a python wrapper for the ThreeBodyTB.jl Julia package, which runs two- and three-body tight-binding calculations for materials.

Using the Julia version directly is the primary method for running the code. However, this code is created to help users who might be more familiar with python using the PyJulia interface.

Installation

First create a conda environment: Install miniconda environment from https://conda.io/miniconda.html Based on your system requirements, you'll get a file something like 'Miniconda3-latest-XYZ'.

Now,

bash Miniconda3-latest-Linux-x86_64.sh (for linux)
bash Miniconda3-latest-MacOSX-x86_64.sh (for Mac)

Download 32/64 bit python 3.6 miniconda exe and install (for windows) Now, let's make a conda environment, say "version", choose other name as you like::

conda create --name my_tb3 python=3.8 chardet
source activate my_tb3
conda install -c conda-forge julia=1.6.2

Now, let's install the package:

pip install requests
git clone https://github.com/usnistgov/tb3py.git
cd tb3py
python setup.py develop

Alternate conda install:

conda create --name my_tb3 python=3.8
source activate my_tb3
conda install -c conda-forge tb3py

Note that this can take a while and may use significant disk space. The code will, if necessary, a) download & install Julia b) download & install ThreeBodyTB.jl, and c) create a system image for fast loading.

For main documentation of ThreeBodyTB.jl, see This code is only the wrapper that downloads and installs that code.

Examples

Notebooks Google Colab Descriptions
Python based example Open in Google Colab Examples for running TB3Py using Python+Julia, getting wannier90_hr.dat files, bandstructure/DOS calculations.
Julia based example Open in Google Colab Examples of running Julia based code with similar functionality as above.

There are several other examples provided to calculate total energies, electronic bandstructures, density of states, forces on atoms, vacancy and surface formation energies in the repo also. More details and documentation will be available soon.

Performance Tips