Function Repository Resource:

InstallTBpack

Source Notebook

Install, update or uninstall the TBpack application

Contributed by: Vasil Saroka

ResourceFunction["InstallTBpack"][]

installs the latest version of the TBpack application.

Details and Options

TBpack is an application for tight-binding calculations in Mathematica.
ResourceFunction["InstallTBpack"][] downloads and installs the latest version of TBpack.
If TBpack is already installed, ResourceFunction["InstallTBpack"][] replaces it with the latest version.
After installation TBpack documentation for the following functions is integrated into the Mathematica built-in Wolfram Documentation.
Hamiltonianconstructs Hamiltonian and overlapping matrices for a system
ElectronicStructurecalculates electronic energy levels for a system
Needs["TBpack`"] adds several contexts to the $ContextPath and makes many symbols available for immediate use. Usage information for these symbols is available via Information.
TBpack can be uninstalled with ResourceFunction["InstallTBpack"][Method"Uninstall"].
ResourceFunction["InstallTBpack"][Method"Uninstall"] attempts to unload the paclet documentation before applying PacletUninstall to it. This enables PacletUninstall to work without warning messages that some files cannot be deleted from the paclet location.
Method option values can be
"Install"Installs/updates the latest version of TBpack application from its GitHub repo
"Uninstall"Finds all local versions of TBpack application and offers to choose which one to remove.
TBpack includes visualization tools from the CustomTicks package by Mark A. Caprio.

Examples

Basic Examples (6) 

Install the TBpack application:

In[1]:=
ResourceFunction["InstallTBpack"][]
Out[1]=

Once TBpack is installed, it can be loaded and used:

In[2]:=
Needs["TBpack`"]

Visualize the atomic structure of a carbon nanotube:

In[3]:=
Image[AtomicStructure[Nanotube[10, 10]]]
Out[3]=

MaTeX is an integral part of TBpack:

In[4]:=
MaTeX["x^2", FontSize -> 20]
Out[4]=

TBpack contains functions from CustomTicks package for Ticks formatting:

In[5]:=
Plot[Sin[x], {x, 0, 3}, Ticks -> {LinTicks[-1, 3, 1, 5], LinTicks[0, 1, 1, 5]}]
Out[5]=

Create a publication quality plot:

In[6]:=
Plot[Sin[x], {x, -1, 3}, AxesStyle -> BlackFrame, Ticks -> {LinTicks[-1, 3, 1, 5, MinorTickLength -> 0.015, MajorTickLength -> 0.025, TickLabelFunction -> (MaTeX[#, FontSize -> 20] &)], LinTicks[-1, 1, 1, 5, MinorTickLength -> 0.015, MajorTickLength -> 0.025, TickLabelFunction -> (MaTeX[#, FontSize -> 20] &)]}]
Out[6]=

Scope (1) 

Usage for individual functions is available via Information:

In[7]:=
ResourceFunction["InstallTBpack"][Method -> "Install"];
Information[Both]
Out[8]=

Options (2) 

Method (2) 

Install TBpack using the "Install" Method option explicitly:

In[9]:=
ResourceFunction["InstallTBpack"][Method -> "Install"]
Out[9]=

Uninstall TBpack by invoking the "Uninstall" Method option:

In[10]:=
ResourceFunction["InstallTBpack"][Method -> "Uninstall"]
Out[10]=

Publisher

Vasil Saroka

Version History

  • 1.0.0 – 07 January 2021

Source Metadata

Related Resources

License Information