{"id":43565933,"url":"https://github.com/harrisonlabollita/w2kplot","last_synced_at":"2026-02-03T21:30:53.954Z","repository":{"id":47368451,"uuid":"346147204","full_name":"harrisonlabollita/w2kplot","owner":"harrisonlabollita","description":"Matplotlib wrapper for WIEN2k post-processing","archived":false,"fork":false,"pushed_at":"2024-01-23T17:15:15.000Z","size":11235,"stargazers_count":9,"open_issues_count":6,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-01-23T18:31:47.000Z","etag":null,"topics":["band-structure","density-functional-theory","density-of-states","electronic-structure","matplotlib","plotting","python","wien2k"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harrisonlabollita.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2021-03-09T21:19:06.000Z","updated_at":"2023-07-29T11:23:39.000Z","dependencies_parsed_at":"2023-02-08T20:01:08.482Z","dependency_job_id":"a2829c28-352d-4dcc-8c6c-aff6ed1bd4b2","html_url":"https://github.com/harrisonlabollita/w2kplot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harrisonlabollita/w2kplot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonlabollita%2Fw2kplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonlabollita%2Fw2kplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonlabollita%2Fw2kplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonlabollita%2Fw2kplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harrisonlabollita","download_url":"https://codeload.github.com/harrisonlabollita/w2kplot/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harrisonlabollita%2Fw2kplot/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29058190,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T20:13:53.544Z","status":"ssl_error","status_checked_at":"2026-02-03T20:13:40.507Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["band-structure","density-functional-theory","density-of-states","electronic-structure","matplotlib","plotting","python","wien2k"],"created_at":"2026-02-03T21:30:53.374Z","updated_at":"2026-02-03T21:30:53.947Z","avatar_url":"https://github.com/harrisonlabollita.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/harrisonlabollita/w2kplot\"\u003e\n\u003cimg width = \"450\" src=\"doc/logo.png\" alt=\"w2kplot\"/\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n![tests](https://github.com/harrisonlabollita/w2kplot/actions/workflows/test.yml/badge.svg)\n![issues](https://img.shields.io/github/issues/harrisonlabollita/w2kplot)\n![forks](https://img.shields.io/github/forks/harrisonlabollita/w2kplot)\n![stars](https://img.shields.io/github/stars/harrisonlabollita/w2kplot)\n![Contributions welcome](https://img.shields.io/badge/contributions-welcome-orange.svg)\n![license](https://img.shields.io/github/license/harrisonlabollita/w2kplot)\n\t\n\u003c/div\u003e\n\n## Overview\n\n**w2kplot** is a [Matplotlib](https://matplotlib.org) wrapper written in Python to create publication quality plots from data generated from the [WIEN2k](http://susi.theochem.tuwien.ac.at) density-functional theory (DFT) code.\n\n- [Getting Started](#started)\n- [Commmand Line Interface](#commandline)\n- [Installation](#installation)\n- [Documentation](#documentation)\n- [Contributing](#contributing)\n\n\n\u003ca name=\"started\"\u003e\u003c/a\u003e\n## Getting Started\nw2kplot is designed to be intuitive for anyone familiar with the matplotlib library. It is seamlessly integrated, such that the user only has to worry about showcasing their results, not how to showcase their resutls. For example, we can plot the band structure from a WIEN2k calculation in the directory `case` with just a few lines of Python code.\n\n```python\n\t# plot basic band structure\n\tfrom w2kplot.bands import Bands, band_plot\n\t\n\tplt.figure()\n\tdft_bands = Bands(spaghetti='case.spaghetti_ene', klist_band='case.klist_band')\n\tband_plot(dft_bands, 'k-', lw=1.5)\n\tplt.show()\n```\n\nFor more examples, see [examples](examples/)!\n\n\u003ca name=\"commandline\"\u003e\u003c/a\u003e\n## Command Line Interface (CLI)\nw2kplot has a command line interface for quickly viewing results and testing. A band structure can be plotted from the case directory by executing ``w2kplot-bands``. Similarily, the orbital character (\"fatbands\") can be generated from ``w2kplot-fatbands``. The entire list of options that allow you to drive these two tools are shown below.\n\n```bash\nw2kplot-bands -h\n\nusage: w2kplot-bands [-h] [-spag SPAGHETTI] [-klist KLISTBAND] [-eF FERMIENERGY] [-c COLOR] [-ls LINESTYLE] [-lw LINEWIDTH] [--ymin YMIN] [--ymax YMAX] [--save SAVE]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -spag SPAGHETTI, --spaghetti SPAGHETTI\n                        name of case.spaghetti/up/dn_ene file\n  -klist KLISTBAND, --klistband KLISTBAND\n                        name of case.klist_band file\n  -eF FERMIENERGY, --fermienergy FERMIENERGY\n                        shift the Fermi energy by the amount fermienergy (units eV)\n  -c COLOR, --color COLOR\n                        color of the bands\n  -ls LINESTYLE, --linestyle LINESTYLE\n                        linestyle of ε(k)\n  -lw LINEWIDTH, --linewidth LINEWIDTH\n                        linewidth of ε(k)\n  --ymin YMIN           minimum of the y-axis.\n  --ymax YMAX           minimum of the y-axis.\n  --save SAVE           save the bandstructure with the provided filenameusage: w2kplot-bands [-h] [-spag SPAGHETTI] [-klist KLISTBAND] [-eF FERMIENERGY] [-c COLOR] [-ls LINESTYLE] [-lw LINEWIDTH] [--ymin YMIN] [--ymax YMAX] [--save SAVE]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -spag SPAGHETTI, --spaghetti SPAGHETTI\n                        name of case.spaghetti/up/dn_ene file\n  -klist KLISTBAND, --klistband KLISTBAND\n                        name of case.klist_band file\n  -eF FERMIENERGY, --fermienergy FERMIENERGY\n                        shift the Fermi energy by the amount fermienergy (units eV)\n  -c COLOR, --color COLOR\n                        color of the bands\n  -ls LINESTYLE, --linestyle LINESTYLE\n                        linestyle of ε(k)\n  -lw LINEWIDTH, --linewidth LINEWIDTH\n                        linewidth of ε(k)\n  --ymin YMIN           minimum of the y-axis.\n  --ymax YMAX           minimum of the y-axis.\n  --save SAVE           save the bandstructure with the provided filename\n```\n\n```bash\nw2kplot-fatbands -h\n\nusage: w2kplot-fatbands [-h] --atoms ATOMS [ATOMS ...] -orb ORBITALS [ORBITALS ...] [-struct STRUCTURE] [--qtl QTL] [--ef EF] [--weight WEIGHT] [-spag SPAGHETTI]\n                        [-klist KLISTBAND] [-eF FERMIENERGY] [--colors COLORS [COLORS ...]] [-c COLOR] [-ls LINESTYLE] [-lw LINEWIDTH] [--ymin YMIN] [--ymax YMAX]\n                        [--save SAVE]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  --atoms ATOMS [ATOMS ...]\n  -orb ORBITALS [ORBITALS ...], --orbitals ORBITALS [ORBITALS ...]\n  -struct STRUCTURE, --structure STRUCTURE\n  --qtl QTL\n  --ef EF\n  --weight WEIGHT       scaling factor for the size of the orbital character.\n  -spag SPAGHETTI, --spaghetti SPAGHETTI\n                        name of case.spaghetti/up/dn_ene file\n  -klist KLISTBAND, --klistband KLISTBAND\n                        name of case.klist_band file\n  -eF FERMIENERGY, --fermienergy FERMIENERGY\n                        shift the Fermi energy by the amount Fermi energy (units eV)\n  --colors COLORS [COLORS ...]\n                        colors of the orbitals\n  -c COLOR, --color COLOR\n                        color of the bands\n  -ls LINESTYLE, --linestyle LINESTYLE\n                        linestyle of ε(k)\n  -lw LINEWIDTH, --linewidth LINEWIDTH\n                        linewidth of ε(k)\n  --ymin YMIN           minimum of the y-axis.\n  --ymax YMAX           minimum of the y-axis.\n  --save SAVE           save the bandstructure with the provided filename\n```\n\n\n\u003ca name=\"installation\"\u003e\u003c/a\u003e\n## Installation\n\nCurrently, installation procedure\n```bash\n    git clone https://github.com/harrisonlabollita/w2kplot.git\n    cd w2kplot\n    pip install -e .\n```\n\n\u003ca name=\"documentation\"\u003e\u003ca/\u003e\n## Documenation\n\nw2kplot provides the user with various Python class objects: `Bands`, `FatBands`, `DensityOfStates`, etc. which are then passed to the matplotlib plotting functions provided by this package: `band_plot`, `fatband_plot`, `dos_plot` to create publication quality figures with minimal effort. We show case some examples [here](examples/README.md).\n\n### Bands\n`Bands` is a `w2kplot` data object that contains the information about the band structure (extracted from case.spaghetti\\_ene). This object takes the following keywords:\n\n- `spaghetti` (optional): filename of the case.spaghetti\\_ene file.\n\n- `klist_band` (optional): filename of the case.klist\\_band file.\n\nIf either of these files are not provided, w2kplot looks in the current directory for any files with the corresponding extensions. In general, it is always safest to provide the exact file that you would like the program to parse, otherwise, this can lead to some ambiguity and potentially spurious results.\n\n### FatBands\n`FatBands` is another data object that is inherited from the `Bands` object, but requires a few more inputs from the user in order to determine how to plot the fatbands. The keyword arguments for this object are the following:\n\n- `atoms` (required): a list of atoms for which to plot the orbital character. \n\n- `orbitals` (required): a list of lists, where there is a list of orbital indices corresponding to the list of atoms. The indices are taken from the `case.qtl` file.\n\n- `colors` (optional): a list of colors in the same format as the orbitals.\n \n- `weight` (optional): a scaling factor to scale the orbtial character of the bands. The multiplicty of each atom is considered.\n\n- `spaghetti` (optional): same as `Bands`.\n\n- `klist_band` (optional): same as `Bands`.\n\n- `qtl` (optional): a `case.qtl` file to obtain the orbital character. This file is obtained after running `x lapw2 -band -qtl`. If not provided, `w2kplot` looks in the current directory.\n\n- `eF` (optional): the Fermi energy in Rydbergs. If not provided, this value is taken from the `case.scf` file.\n\n- `struct` (optional): the structure file from WIEN2k. If not provided, `w2kplot` looks in the current directory.\n\n### WannierBands\n`WannierBands` is an object that contains the Wannier band data to be plot with or without the DFT band structure. Internally, the units are converted to match the units of Wien2k.\n\n### DensityOfStates (DOS)\n`DensityOfStates` with alias `DOS` wraps a Wien2k dos file. Still underdevelopment. We provide plotting functions for density of states with the function `dos_plot`, which has multiple styles (`dos_style`). \n\n\n\u003ca name=\"contributing\"\u003e\u003ca/\u003e\t\n## Contributing\nContributions are welcome! Here's how you can get involved:\n\n1. Fork the repository.\n2. Create a new branch: ``git checkout -b feature-new-feature``.\n3. Make your changes and commit them: ``git commit -m 'Add new feature'``.\n4. Push to the branch: ``git push origin feature-new-feature``.\n5. Create a pull request detailing your changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrisonlabollita%2Fw2kplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharrisonlabollita%2Fw2kplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharrisonlabollita%2Fw2kplot/lists"}