Skip to content

Zijia-Cheng/DrawBZ

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Draw Brillouin Zones

Welcome to the Draw Brillouin Zones program! This tool helps you visualize three-dimensional Bulk and Surface Brillouin Zones (BZ). It's straightforward to use and requires only minimal dependencies.

If you find this program helpful, please consider starring this repository!


🚀 Features

  • Draw Bulk Brillouin Zones: Visualize high-symmetry points and lines for bulk BZs.
  • Draw Surface Brillouin Zones: Generate surface BZ projections along specified directions.
  • Lightweight and Easy-to-Use: Compatible with Jupyter notebooks and standalone Python scripts.

📦 Requirements

  • Python 3.x
  • Libraries:
    • numpy
    • matplotlib

🔧 How to Use

  1. Download the provided Jupyter Notebook or Python script from this repository.
  2. Ensure the required libraries (numpy, matplotlib) are installed.
  3. Initialize the BZ class with the bulk BZ vectors.

🧪 Class: BZ

Input Parameters

  • Vectors of Bulk Brillouin Zone: A 3x3 numpy array representing the bulk BZ vectors in Cartesian coordinates, with units in $\text{Å}^{-1}$.
    Example:
    np.array([[1, 0, 0], [0, 1, 0], [0, 0, 1]])

🛠 Methods and Attributes

1. Bulk Brillouin Zone

  • Method: self.bulkBZ()
  • Output Attributes:
    • self.hs_lines_f: Edges of the bulk BZ.
    • self.hs_points: High-symmetry points (corners) of the bulk BZ.

2. Surface Brillouin Zone

  • Method: self.surfaceBZ(dis, direc)
    • Parameters:
      • dis: A positive number representing the distance between the bulk BZ center and surface BZ center (used for plotting purposes).
      • direc: Surface normal direction in fractional coordinates, expressed using bulk BZ vectors as the basis.
    • Output Attributes:
      • self.hs_lines_pro_f: Edges of the surface BZ.
      • self.hs_pro_points: High-symmetry points of the surface BZ.

⚠️ Important:

  • Always call bulkBZ() before using surfaceBZ().

🔍 Example Usage

Calculate bulk BZ: Screen Shot 2022-07-17 at 10 12 48 PM Screen Shot 2022-07-17 at 10 13 15 PM Visualization of bulk BZ: Screen Shot 2022-07-17 at 10 14 05 PM Calculate surface BZ along (001) direction: Screen Shot 2022-07-17 at 10 15 56 PM Visualization of surface and bulk BZ: Screen Shot 2022-07-17 at 10 16 25 PM

About

Drawing three dimensional bulk and surface Brillouin Zones.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors