Skip to main content

IrRep

Tests Workflow Status

This is a code to determine symmetry eigenvalues of electronic states obtained by DFT codes, as well as irreducible representations, wannier charge centers (1D) and many more

also one can get the trace.txt file for Check Topological Mat routine of Bilbao Crystallographic Server.

Help on usage can be obtained by typing

irrep --help

Help is under construction and is far from being complete. If you have interest in the code and not sure how to use it, feel free to contact the author.

Also, have a look at the examples provided.

An example of using:

irrep -Ecut=50 -code=abinit -fWFK=Bi_WFK -refUC=0,-1,1,1,0,-1,-1,-1,-1  -kpoints=11 -IBend=5  -kpnames="GM"

Installation

Install using pip:

pip install irrep

Currently the code is interfaced VASP, ABINIT and QuantumEspresso, but if interface with other code is needed, please contact te author.

Unit cell transformation

To be able to identify irreducible representations (irreps) from traces of symmetry operations requires saving somewhere the relation between irrep labels and traces. Since traces depend on the choice of the unit cell, defining a conventional or standard unit cell is needed. At the same time, DFT calculations are usually run in a primitive cell for convenience. Then, IrRep needs the transformation from the DFT cell to the conventional cell. The user can give the transformation to IrRep by specifying the CLI arguments -refUC and -shiftUC, or let IrRep calculate automatically the transformation by setting -searchcell. The possible cases are:

  1. Let IrRep calculate automatically the transformation to the conventional cell:
irrep -searchcell
  1. Give IrRep the tranformation and check that it is the correct transformation to the conventional cell:
irrep -refUC=... -shiftUC=... -searchcell
  1. Provide IrRep with a transformation but don't check if it leads to the conventional cell:
irrep -refUC=... -shiftUC=...

This case is useful to get the traces in a cell that is not neither the DFT nor the conventional cell.

  1. Calculate the traces only for the DFT cell and forget about transforming to a different unit cell:
irrep

📋 Note: specifying -kpnames in the CLI activates automatically -searchcell, as the transformation to the convetional cell is needed to identify irreps. 📋 Note Until v.1.7.1, the default behaviour was to calculate or check the transformation to the conventional cell, so the case 4 above would indicate IrRep to calculate the transformation to the conventional cell.

How to cite

The code relies on spglib library to determine the symmetry of the crystal and the tables of the characters of irreducible representations, obtained from the Bilbao Crystallographic Server (BCS) If you use this code to determine irreps for a scientific publication, please cite the following articles:

M. Iraola, J. L. Mañes, B. Bradlyn, M. K. Horton, T. Neupert, M. G. Vergniory and S. S. Tsirkin "IrRep: Symmetry eigenvalues and irreducible representations of ab initio band structures", Computer Physics Communications 272, 108226 (2022). https://doi.org/10.1016/j.cpc.2021.108226

L. Elcoro, B. Bradlyn, Z. Wang, M. G. Vergniory, J. Cano, C. Felser, B. A. Bernevig, D. Orobengoa, G. de la Flor and M. I. Aroyo "Double crystallographic groups and their representations on the Bilbao Crystallographic Server" J. of Appl. Cryst. (2017). 50, 1457-1477. doi:10.1107/S1600576717011712

Before releasing this public repository on github on 22th of June 2019, the code is mainly written by:

Stepan S. Tsirkin
University of Zurich

after a fruitful discussion of formalism with Maia G. Vergniory (Donostia International Physics Center/IKERBASQUE, Basque Country, Spain)

I also acknowledge contributions to the code from Mikel Iraola (Donostia International Physics Center, Basque Country, Spain)

Further contributions from other authors may be tracked on GitHub contributors list.

Structure of the package

The files that form the code are organized following a structure that will be described here.

  • irrep: directory that contains the files that govern the running of the code.
    • cli.py: interface to the command line.
    • __readfiles.py: routines to read data from DFT output files.
    • bandstructure.py: contains the class BandStructure, which reads, organizes, treats the data and displays the results.
    • kpoint.py: contains the class Kpoint, which reads and treats data of a particular k-point and displays results obtained from it.
    • __gvectors.py: routines for the generation and transformation of plane-waves.
    • __spacegroup.py: classes to read the crystal structure, deduce the space group and deal with symmetry operations.
    • utility.py: auxiliary routines, mainly for type conversion.
    • __init__.py: version number.
    • tests: directory containing tests for developing purposes.
  • examples: directory containing input to run examples with different codes and data that has been published in journals, reviews,... In some examples, DFT outputs may not be included due to their large size.
  • tables: tables of irreducible representations and python scripts for working with them.
    • __convertTab.py: to convert tables of irreducible representations to a user friendly format. (Only for developing)
    • __init__.py: classes to read and organize data from tables of irreducible representations.
  • INSTALL: commands for the installation.
  • LICENSE: declaration of the license under which the code is made available.
  • setup.py: routines to install the code.
  • uploadpypi.sh: to upgrade the code in Pypi. (only for owner's use)

Development

To develop on IrRep, follow these steps:

  1. Clone the repository to your local computer, git clone ...
  2. Ensure you have a modern version of Python installed (3.x+). We recommend 3.6 or higher.
  3. Create a new development environment. Either use a virtual environment, for example:
    python -m venv /path/to/my_irrep_dev_env
    
    or, if you're using anaconda, a new conda environment.
    conda create --name my_irrep_dev_env
    
  4. Activate this virtual environment or conda environment, e.g. by running source activate /path/to/my_irrep_dev_env/bin/activate or conda activate my_irrep_dev_env as appropriate.
  5. Go into the repository directory and run python setup.py develop.
  6. To run tests you will also need to run pip install pytest and then tests can be run by running pytest. Currently, tests will run the examples in the examples directory and verify their output against a known output.
  7. Make changes to the code as required. The irrep command line tool will also be available inside this environment.

You can verify your development environment by opening a Python interpretor (e.g. running python) and running import irrep and then print(irrep.__file__). This should print the path to your local repository containing irrep.

Metadata

Release files for irrep 3.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for irrep 3.3.0
File Size Uploaded
irrep-3.3.0.tar.gz 22.8 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for irrep 3.3.0
File Interpreter ABI Platform
irrep-3.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 MB

Release files / irrep-3.3.0.tar.gz

Download URL irrep-3.3.0.tar.gz
Size 22.8 MB
Tags Source
SHA-256 checksum
How to use checksums
9a812a27baf20f625d3f261b159e124f307ffecd7b29c12ff4dbf2de80a2f5d1
BLAKE2b-256 checksum
How to use checksums
408dfa99aed4825e6c67103f7752b7746a635f1925486067e989bc736599051a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release files / irrep-3.3.0-py3-none-any.whl

Download URL irrep-3.3.0-py3-none-any.whl
Size 992.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf23d8f77471dcf7d2efe6029f47f17ddcd29597ec332ec77747001414b0f54f
BLAKE2b-256 checksum
How to use checksums
7501815ff9a8eb5d1897e3114753892372d5b440b7ef564e8209b31fb3f15d8c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

3.3.0 This release

2 release files

3.2.0

2 release files

3.1.1

2 release files

3.1.0

2 release files

3.0.1

2 release files

3.0.0

2 release files

2.6.3

2 release files

2.6.2

2 release files

2.6.1

2 release files

2.6.0

2 release files

2.5.0

2 release files

2.4.1

2 release files

2.4.0

2 release files

2.3.3

2 release files

2.3.2

2 release files

2.3.1

2 release files

2.2.0

2 release files

2.1.3

2 release files

2.1.2

2 release files

2.1.1

2 release files

2.1.0

2 release files

2.0.0

2 release files

1.11.1

2 release files

1.11.0

2 release files

1.10.1

2 release files

1.10.0

2 release files

1.9.3

1 release file

1.9.2

1 release file

1.9.1

2 release files

1.9.0

1 release file

1.8.3

2 release files

1.8.2

1 release file

1.8.1

1 release file

1.8.0

2 release files

1.7.1

1 release file

1.7.0

2 release files

1.6.3

1 release file

1.6.2

2 release files

1.6.1

1 release file

1.6.0

1 release file

1.5.7

2 release files

1.5.5

1 release file

1.5.3

1 release file

1.5.1

1 release file

1.5.0

1 release file

1.4.1

1 release file

1.4

1 release file

1.3.0

1 release file

1.2.4

1 release file

1.2.3

1 release file

1.2.2

1 release file

1.2.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page