Skip to content
项目

关于

Programs for constructing Brillouin zones in three- and two-dimensional space.

设计与媒体

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

BrillouinZones

Programs for constructing Brillouin zones in three- and two-dimensional space. It was written to create images of Brillouin zones for the course of condensed matter physics.

How to use?

  1. Install dependencies (Python 3.10+):
pip3 install -r requirements.txt
  1. Run the drawers:
# First Brillouin zone in three-dimensional space
# (prompts for a lattice: body-centered, face-centered, primitive,
# hexagonal close-packed or base-centered).
python3 "./3d Brillouin Zone/index.py"

# Non-interactive: pass the lattice number (1..5) as an argument.
python3 "./3d Brillouin Zone/index.py" 3

# First several Brillouin zones in two-dimensional space.
python3 "./2d Brillouin Zone/index.py"

Configuration via environment variables:

  • BRILLOUIN_OUTPUT — output image path (default brillouin_zone.png for 2D, brillouin_zone_3d.png for 3D);
  • BRILLOUIN_ZONES — number of zones to highlight in the 2D drawer (default 12);
  • BRILLOUIN_NO_SHOW=1 — do not open an image viewer after the 2D drawer finishes;
  • MPLBACKEND=Agg — render the 3D figure to a file instead of opening a window (headless mode).

To edit the 2D lattice type (primitive, hexagonal or parallelogram), change the crystal initialization in 2d Brillouin Zone/index.py.

Development

pip3 install -r requirements-dev.txt
pytest tests

Examples

FirstZoneForBaseCenteredLattice

FirstZoneForFaceCenteredLattice

SeveralZonesForTheSquareLattice

探索相关项目

加载中…