SymmetryReduceBZ
A Julia package for calculating irreducible Brillouin zones for 2D or 3D crystal structures.
Science Score: 38.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
✓Committers with academic emails
2 of 4 committers (50.0%) from academic institutions -
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (14.4%) to scientific vocabulary
Repository
A Julia package for calculating irreducible Brillouin zones for 2D or 3D crystal structures.
Basic Info
Statistics
- Stars: 35
- Watchers: 2
- Forks: 4
- Open Issues: 0
- Releases: 6
Metadata Files
README.md
SymmetryReduceBZ
The primary purpose of SymmetryReduceBZ is to calculate the irreducible
Brillouin zone (IBZ) for crystal structures in 2D or 3D provided the real-space
lattice vectors, atom positions, and atom types. It also contains methods for
making unit cells primitive and lattice reduction. See the User Guide in the
documentation for more details
and usage examples in Python. Details of the algorithm are explained here.
Breaking changes in v0.2: See the NEWS.md file for a description of the breaking changes in v0.2.
Installation
SymmetryReduceBZ is a registered Julia package and can be installed using
Julia's package manager Pkg.
using Pkg
Pkg.add("SymmetryReduceBZ")
In order to use the plotting functionality,
you will also need to have the Python Matplotlib library installed, which
PyCall.jl can setup automatically via Conda.jl.
If you are installing PyCall, PyPlot, and SymmetryReduceBZ for the first time, just do
ENV["PYTHON"]="" before running Pkg.add(["SymmetryReduceBZ", "PyPlot"]). Otherwise you
can reconfigure PyCall to use Conda via:
ENV["PYTHON"]=""
Pkg.build("PyCall")
Examples
To calculate the irreducible Brillouin zone, provide the lattice and atomic
basis to calc_ibz. The IBZ will be returned as a polyhedron from Polyhedra.jl,
which can be viewed either as a convex hull or an intersection of half spaces.
@example
import SymmetryReduceBZ.Lattices: genlat_CUB
import SymmetryReduceBZ.Symmetry: calc_ibz
a = 2.0
real_latvecs = genlat_CUB(a)
atom_types = [0,0]
atom_pos = Array([0 0 0; 0.5 0.5 0.5]')
coordinates = "Cartesian"
makeprim = false
convention = "ordinary"
ibz = calc_ibz(real_latvecs,atom_types,atom_pos,coordinates,
makeprim,convention)
The arguments for calc_ibz are as follows:
- real_latvecs: the real-space lattice vectors as columns of a matrix.
- atom_types: a vector of atom types as integers.
- atom_pos: the positions of atoms in the crystal structure as columns of a matrix.
- coordinates: indicates the atoms are in "lattice" or "Cartesian"
coordinates.
- makeprim: make the unit cell primitive before calculating the IBZ if
true.
- convention: the convention used to go between real and reciprocal space. The
two conventions are "ordinary" (temporal) frequency and "angular"
frequency.
- library::Polyhedra.Library=CDDLib.Library(): a polyhedron manipulation library
- rtol=sqrt(eps(float(maximum(real_latvecs)))): (optional) a relative tolerance for floating-point comparisons.
- atol=1e-9: (optional) an absolute tolerance for floating-point comparisons.
The vertices of the ibz are accessed with
SymmetryReduceBZ.Utilities.vertices(ibz) as an iterator of vectors. Other
attributes are accessible such as SymmetryReduceBZ.Utilities.volume(ibz). The
faces of the IBZ are calculated with
import SymmetryReduceBZ.Utilities: get_uniquefacets
facets = get_uniquefacets(ibz)
facets is a list of points at the corners of each facet. The function
get_uniquefacets returns a list of the points that lie on each facet.
See the documentation
for more details about the polyhedral interface.
The function plot_convexhulls is useful for visualizing the Brillouin zone
and irreducible Brillouin zone. The arguments are the same as those from
calc_ibz.
@example
ENV["MPLBACKEND"]="qt5agg"
using PyPlot
import SymmetryReduceBZ.Plotting: plot_convexhulls
import SymmetryReduceBZ.Lattices: genlat_CUB
a = 2.0
real_latvecs = genlat_CUB(a)
atom_types = [0,0]
atom_pos = Array([0 0 0; 0.5 0.5 0.5]')
coordinates = "Cartesian"
makeprim = false
convention = "ordinary"
ax=plot_convexhulls(real_latvecs,atom_types,atom_pos,coordinates,
makeprim,convention)

The functions plot_2Dconvexhull and plot_3Dconvexhull allow greater customization of
the appearance of the convex hull.
@example
ENV["MPLBACKEND"]="qt5agg"
using PyPlot
import SymmetryReduceBZ.Symmetry: calc_bz, calc_ibz
import SymmetryReduceBZ.Plotting: plot_2Dconvexhull
real_latvecs = [1 0; 0 1]
convention="ordinary"
atom_types=[0]
atom_pos = Array([0 0]')
coords = "Cartesian"
makeprim=false
bz = calc_bz(real_latvecs,atom_types,atom_pos,coords,makeprim,convention)
ibz = calc_ibz(real_latvecs,atom_types,atom_pos,coords,makeprim,convention)
ax = plot_2Dconvexhull(bz,facecolor="deepskyblue",linewidth=3,edgecolor="cyan",alpha=0.2)
ax = plot_2Dconvexhull(ibz,ax;facecolor="coral",linewidth=3,edgecolor="magenta",alpha=0.4)
axis("off")

@example
ENV["MPLBACKEND"]="qt5agg"
using PyPlot
import SymmetryReduceBZ.Symmetry: calc_bz, calc_ibz
import SymmetryReduceBZ.Plotting: plot_3Dconvexhull
real_latvecs = [1 0 0; 0 1 0; 0 0 1]
convention="ordinary"
atom_types=[0]
atom_pos = Array([0 0 0]')
coords = "Cartesian"
makeprim=false
bz = calc_bz(real_latvecs,atom_types,atom_pos,coords,makeprim,convention)
ibz = calc_ibz(real_latvecs,atom_types,atom_pos,coords,makeprim,convention)
fig = figure()
ax = fig.add_subplot(111, projection="3d")
ax = plot_3Dconvexhull(ibz,ax,facecolors="pink",alpha=1,edgecolors="black",linewidths = 1)
ax = plot_3Dconvexhull(bz,ax,facecolors="deepskyblue",edgecolors="white",linewidths=1,alpha=0.2)
axis("off")

Citation (CITATION.bib)
@Article{CiCP-31-495,
author = {Jorgensen , Jeremy J.Christensen , John E.Jarvis , Tyler J. and Hart , Gus L. W.},
title = {A General Algorithm for Calculating Irreducible Brillouin Zones},
journal = {Communications in Computational Physics},
year = {2022},
volume = {31},
number = {2},
pages = {495--515},
abstract = {Calculations of properties of materials require performing numerical integrals over the Brillouin zone (BZ). Integration points in density functional theory codesare uniformly spread over the BZ (despite integration error being concentrated in smallregions of the BZ) and preserve symmetry to improve computational efficiency. Integration points over an irreducible Brillouin zone (IBZ), a rotationally distinct region ofthe BZ, do not have to preserve crystal symmetry for greater efficiency. This freedomallows the use of adaptive meshes with higher concentrations of points at locationsof large error, resulting in improved algorithmic efficiency. We have created an algorithm for constructing an IBZ of any crystal structure in 2D and 3D. The algorithm usesconvex hull and half-space representations for the BZ and IBZ to make many aspectsof construction and symmetry reduction of the BZ trivial. The algorithm is simple,general, and available as open-source software.},
issn = {1991-7120},
doi = {https://doi.org/10.4208/cicp.OA-2021-0094},
url = {http://global-sci.org/intro/article_detail/cicp/20213.html}
}
GitHub Events
Total
- Issue comment event: 1
- Create event: 1
- Commit comment event: 1
Last Year
- Issue comment event: 1
- Create event: 1
- Commit comment event: 1
Committers
Last synced: over 3 years ago
All Time
- Total Commits: 125
- Total Committers: 4
- Avg Commits per committer: 31.25
- Development Distribution Score (DDS): 0.064
Top Committers
| Name | Commits | |
|---|---|---|
| Jeremy Jorgensen | j****g@g****m | 117 |
| Jeremy Jorgensen | j****2@s****u | 6 |
| tpolakovic | t****c@g****m | 1 |
| Jeremy Jorgensen | j****n@b****u | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 11 months ago
All Time
- Total issues: 5
- Total pull requests: 21
- Average time to close issues: 27 days
- Average time to close pull requests: 14 days
- Total issue authors: 5
- Total pull request authors: 3
- Average comments per issue: 2.2
- Average comments per pull request: 0.05
- Merged pull requests: 20
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- androme-dan (1)
- iintSjds (1)
- tpolakovic (1)
- ericphanson (1)
- JuliaTagBot (1)
Pull Request Authors
- lxvm (18)
- tpolakovic (1)
- androme-dan (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 1 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 13
juliahub.com: SymmetryReduceBZ
A Julia package for calculating irreducible Brillouin zones for 2D or 3D crystal structures.
- Documentation: https://docs.juliahub.com/General/SymmetryReduceBZ/stable/
- License: GPL-3.0
-
Latest release: 0.2.1
published 12 months ago