The BandU program constructs a rank ordered series of crystal orbitals using principal component analysis. These principal orbital components can then be projected on the Fermi surface and visualized
Project description
BandU
BandU OVERVIEW
A package that performs a principal component inspired analysis on the Bloch wavefunctions of periodic material to provide a real space visualization of the states that significantly contribute to the Fermi surface.
These real space functions can then be projected onto the Fermi surface to provide a clear visual for where a nesting vector may combine two points in reciprocal space.
This package is designed to be very straightforward in its use, offering Fermi surface and BandU function visualizations in as little as 5 lines of Python script. This package can also be used to just visual the Fermi surface, without BandU projections, if provided with the necessary k-point and eigenvalue data.
INSTALLATION INSTRUCTIONS
-
Inside that directory type on the command line
"git clone https://github.com/pcross0405/BandU.git" -
Type "cd BandU"
-
Make sure you have python's build tool up to date with
"python3 -m pip install --upgrade build" -
Once up to date type
"python3 -m build" -
This should create a "dist" directory with a .whl file inside
-
On the command line type
"pip install dist/*.whl"
DEPENDENCIES
REQUIRED FOR VISUALIZING FERMI SURFACE
REQUIRED FOR CUSTOM COLORS
WAVEFUNCTIONS THAT CAN BE READ DIRECTLY
Currently only reading directly from ABINIT 7 and 10 wavefunctions is supported. Reading eigenvalues from other DFT packages will come in future updates.
REPORTING ISSUES
Please report any issues here
TUTORIAL
An example script that can run the different functions of the BandU program is given below.
from bandu.bandu import BandU
from bandu.abinit_reader import AbinitWFK
from bandu.isosurface_class import Isosurface
from bandu.plotter import Plotter
from bandu.colors import Colors
root_name = 'your file root name here' # root_name of WFK files and of XSF files
xsf_number = 1 # XSF file number to be read in
energy_level = 0.000 # Energy relative to the Fermi energy to be sampled
width = 0.0005 # Search half the the width above and below the specified energy level
wfk_path = f'path\to\WFK\file\{root_name}_o_WFK'
xsf_path = f'path\to\XSF\file\{root_name}_bandu_{xsf_number}'
bandu_name = f'{root_name}_bandu'
def main(
Band_U:bool, Iso_Surf:bool, Load_Surf:bool
)->None:
if Band_U: # create BandU principal orbital components
wfk_gen = AbinitWFK(wfk_path).ReadWFK(
energy_level = energy_level,
width=width
)
wfk = BandU(
wfks = wfk_gen,
energy_level = energy_level,
width = width,
sym = True
)
wfk.ToXSF(
xsf_name = bandu_name,
nums = [1,10]
)
elif Iso_Surf: # construct energy isosurfaces and plot them
contours = Isosurface(
wfk_name = wfk_path,
energy_level = energy_level,
width = width
)
contours.Contour() # make contours
plot = Plotter(
isosurface = contours,
save_file=f'{root_name}_bandu_{xsf_number}_fermi_surf.pkl'
) # create plotter object
overlap_vals = plot.SurfaceColor(
wfk_path=wfk_path,
xsf_path=xsf_path,
) # compute overlap between principal orbital component and states in Brillouin Zone
plot.Plot(
surface_vals = overlap_vals,
colormap = Colors().blues,
) # plot contours
elif Load_Surf:
Plotter().Load(
save_path='{root_name}_bandu_{xsf_number}_fermi_surf.pkl',
)
if __name__ == '__main__':
main(
Band_U = False,
Iso_Surf = False,
Load_Surf = False,
)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file bandu-1.0.0.tar.gz.
File metadata
- Download URL: bandu-1.0.0.tar.gz
- Upload date:
- Size: 31.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddaaeb21eea6af98e7e30ec18611ca772cd2488fba5311a5d1a32f8f5e7e459c
|
|
| MD5 |
31d80d14ae2defd62915541c68c9c700
|
|
| BLAKE2b-256 |
c1126eafdc7555e6a6f9e3bf34a290e7d7f64b32a2aaee9fa854d539036bcffe
|
File details
Details for the file bandu-1.0.0-py3-none-any.whl.
File metadata
- Download URL: bandu-1.0.0-py3-none-any.whl
- Upload date:
- Size: 33.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f424b7ac9e47330ef9f3d3a5e0118fafb9185eadf735556f386f8ff4d750ee4a
|
|
| MD5 |
afa7f705d435cae3dc0e7cb95b47476d
|
|
| BLAKE2b-256 |
7d0d8431a6833e0d01b8455b0cb5a7fbcbf76d606ce6527aa30b7441031d4c7e
|