brillouinzone-visualizer
v0.4.0
Published
Javascript package to visualize the Brillouin zone of crystals.
Downloads
20
Readme
Brillouin zone visualizer
This repository contains a Javascript library to visualize the 1st Brillouin zone (BZ) of crystal structures.
The primary input to the Javascript widget is a json
file generated from a crystal structure using seekpath.
See ./seekpath_example_data
on how to generate the json
file.
A Jupyter widget corresponding to this library is located at https://github.com/osscar-org/widget-bzvisualizer
Usage
Install with
npm install brillouinzone-visualizer
and import with
import { createBZVisualizer } from "brillouinzone-visualizer";
See the src/demo.js
for more details.
Development
A demo page is included for development and to demonstrate the usage of the library. Start it by
npm install
npm run dev
Building and using locally
To build the local version of the code as a library that can be used in other javascript projects, use
npm run build
npm pack
This will create a .tgz
file that can then be installed by the external application via
npm install /path/to/library-x.y.z.tgz
And the usage is similar to the demo page.
Publishing a new version
To make a new version and publish to npm via GitHub Actions:
npm version major/minor/patch
git push --follow-tags