### Get IrRep Help Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Displays the help message for the IrRep command-line tool, providing information on available options and usage. This is useful for understanding the full capabilities of the package. ```bash irrep --help ``` -------------------------------- ### Install IrRep using pip Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Installs the IrRep package using pip, the standard Python package installer. This is the primary method for adding IrRep to your Python environment. ```bash pip install irrep ``` -------------------------------- ### Run IrRep with Specific Parameters Source: https://github.com/irreducible-representations/irrep/blob/master/README.md An example of executing the IrRep tool with several command-line arguments to specify energy cutoff, DFT code, WFK file, reference unit cell, k-point sampling, and k-point names. This demonstrates a typical use case for analyzing band structures. ```bash irrep -Ecut=50 -code=abinit -fWFK=Bi_WFK -refUC=0,-1,1,1,0,-1,-1,-1,-1 -kpoints=11 -IBend=5 -kpnames="GM" ``` -------------------------------- ### Install Pytest for Running Tests Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Installs the pytest testing framework using pip. Pytest is a popular tool for writing and running tests in Python projects. ```bash pip install pytest ``` -------------------------------- ### Configure IrRep with YAML File Source: https://context7.com/irreducible-representations/irrep/llms.txt Illustrates how to use a YAML configuration file to set parameters for the `irrep` command. This is beneficial for managing complex calculation setups. ```yaml # config.yml Ecut: 50 code: "vasp" kpoints: "1,2,3,4" kpnames: "T,GM,F,L" spinor: true refUC: "1,-1,0,0,1,-1,1,1,1" EF: 5.2156 IBstart: 5 IBend: 10 ``` ```bash irrep -config=config.yml ``` -------------------------------- ### Install IrRep in Development Mode Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Installs the IrRep package in development mode, allowing for direct modifications to the source code to be reflected immediately without reinstallation. This command is typically run from the root of the repository. ```bash python setup.py develop ``` -------------------------------- ### Run IrRep with Symmetry Separation (Initial Attempt) Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This command demonstrates an initial attempt to run IrRep, separating wave functions by inversion symmetry (number 25). It includes parameters for k-point names, band bending, energy cutoff, reference UC, and the code to use. This example highlights a common error where non-invariant k-points are included. ```bash irrep -isymsep=25 -kpnames=GM,X,L,W -IBend=20 -Ecut=100 -refUC=-1,1,1,1,-1,1,1,1,-1 -EF=auto -code=abinit -fWFK=maxK_WFK > out ``` -------------------------------- ### Import IrRep Package in Python Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Demonstrates how to import the IrRep package within a Python interpreter or script. This verifies that the package has been installed correctly and is accessible. ```python import irrep print(irrep.__file__) ``` -------------------------------- ### Quantum ESPRESSO Interface for Band Structure Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Initializes a BandStructure object to read wavefunctions from Quantum ESPRESSO calculations. Supports basic setup and spin-polarized calculations by specifying the save directory prefix and spin channel. ```python from irrep.bandstructure import BandStructure # Basic QE setup (data in prefix.save directory) bandstr = BandStructure( prefix="silicon", # prefix.save contains wfc files code="espresso", Ecut=50.0, EF='auto', calculate_traces=True, search_cell=True ) # Spin-polarized calculation bandstr_up = BandStructure( prefix="iron", code="espresso", spin_channel='up', # 'up' or 'dw' for spin-polarized Ecut=50.0, calculate_traces=True ) ``` -------------------------------- ### Export Band Structure Analysis to JSON in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt This Python example demonstrates how to export the results of a band structure analysis to a JSON file. It initializes the BandStructure object, identifies irreducible representations, and then creates a dictionary containing the spacegroup information and the band structure data in a JSON-serializable format, which is then saved to a file using `monty.serialization.dumpfn`. ```python from irrep.bandstructure import BandStructure from monty.serialization import dumpfn bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=False, Ecut=50.0, calculate_traces=True ) bandstr.identify_irreps(kpnames=["GM", "X", "M"]) # Get JSON-serializable data json_data = { "spacegroup": bandstr.spacegroup.as_dict(), "bandstructure": bandstr.json() } # Save to file dumpfn(json_data, "irrep-output.json", indent=4) ``` -------------------------------- ### Create Python Virtual Environment Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Demonstrates how to create a new virtual environment for Python development using the 'venv' module. This isolates project dependencies. ```bash python -m venv /path/to/my_irrep_dev_env ``` -------------------------------- ### Calculate Symmetry Traces with IrRep CLI Source: https://context7.com/irreducible-representations/irrep/llms.txt Demonstrates basic command-line usage of the `irrep` tool to calculate symmetry traces for different DFT codes (VASP, ABINIT, Quantum ESPRESSO). It shows how to specify calculation parameters like cutoff energy, k-points, and spin polarization. ```bash # Basic VASP calculation (scalar, non-spinor) irrep -code=vasp -Ecut=50 -kpoints=1 -kpnames="GM" # VASP with spin-orbit coupling (spinor) irrep -code=vasp -spinor -Ecut=50 -kpoints="1,2,3" -kpnames="GM,X,M" \ -IBstart=1 -IBend=10 -EF=5.2156 # ABINIT calculation irrep -code=abinit -fWFK=Bi_WFK -Ecut=50 -kpoints=11 -kpnames="GM" \ -refUC=0,-1,1,1,0,-1,-1,-1,-1 -IBend=5 # Quantum ESPRESSO calculation irrep -code=espresso -prefix=Bi -Ecut=50 -kpoints=11 -kpnames="GM" \ -refUC=0,-1,1,1,0,-1,-1,-1,-1 -IBend=5 ``` -------------------------------- ### Create Conda Development Environment Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Shows how to create a new conda environment for Python development. Conda environments are useful for managing packages and dependencies, especially in scientific computing. ```bash conda create --name my_irrep_dev_env ``` -------------------------------- ### Kpoint Class - Per-K Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Shows how to initialize a BandStructure object for per-k point analysis, typically used with VASP calculations. This involves providing WAVECAR and POSCAR file paths, specifying the code as 'vasp', and setting appropriate flags. ```python from irrep.bandstructure import BandStructure bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=False, Ecut=50.0, calculate_traces=True ) ``` -------------------------------- ### Calculate Zak Phase and Wannier Charge Centers with IrRep CLI Source: https://context7.com/irreducible-representations/irrep/llms.txt Demonstrates the command-line usage for calculating topological quantities like Zak phases along k-paths and Wannier charge centers (Wilson loops) using the `-ZAK` and `-WCC` flags, respectively. ```bash # Calculate Zak phases along path irrep -code=vasp -Ecut=50 -ZAK -kpoints="1,2,3,4,5,6,7,8" # Calculate Wannier charge centers (Wilson loop) irrep -code=vasp -Ecut=50 -WCC -kpoints="1,2,3,4,5,6,7,8" ``` -------------------------------- ### Initialize BandStructure Class in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt Shows how to instantiate the `BandStructure` class from the IrRep Python API, initializing it with parameters for a VASP calculation. This class is the core interface for programmatic analysis. ```python from irrep.bandstructure import BandStructure import numpy as np # Initialize from VASP files bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=False, # True for SOC calculations Ecut=50.0, # Plane-wave cutoff in eV IBstart=0, # First band index (0-based) IBend=20, # Last band index (exclusive) kplist=[0, 1, 2, 3], # K-point indices to analyze EF='auto', # Fermi energy ('auto' or float) calculate_traces=True, # Calculate symmetry traces search_cell=True, # Find conventional cell transformation degen_thresh=1e-4, # Energy threshold for degeneracy verbosity=1 # 0=minimal, 1=info, 2=debug ) # Print space group information bandstr.spacegroup.show() ``` -------------------------------- ### Calculate Irreducible Representations with IrRep (Quantum Espresso) Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/Bi2Se3/README.md This command calculates irreducible representations for occupied bands using the IrRep tool. It specifies maximal k-points, the band index to consider, the plane-wave cutoff energy, and the Fermi energy. The 'code' argument selects the Quantum Espresso interface, and 'prefix' specifies the output file. ```bash irrep -kpnames=GM,F,T,L -IBend=78 -Ecut=100 -EF=auto -code=espresso -prefix=out/Bi2Se3 > output ``` -------------------------------- ### Generate Output Files for Analysis with IrRep CLI Source: https://context7.com/irreducible-representations/irrep/llms.txt Illustrates how to generate various output files for external analysis tools, including trace files for the Bilbao Crystallographic Server, gnuplot-compatible band data, and JSON output. ```bash # Generate trace.txt for Bilbao Crystallographic Server irrep -code=vasp -Ecut=50 -kpnames="GM,X,M" # Output: trace.txt (for CheckTopologicalMat on BCS) # Generate gnuplot-compatible band plot data irrep -code=vasp -Ecut=50 -plotbands -suffix=mysystem # Output: bands-mysystem.dat # Save results to JSON irrep -code=vasp -Ecut=50 -kpnames="GM" -json_file=output # Output: output.json ``` -------------------------------- ### ABINIT Interface for Band Structure Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Initializes a BandStructure object to read wavefunctions from ABINIT WFK files. Allows for specifying WFK file paths and optionally providing explicit unit cell transformations. ```python from irrep.bandstructure import BandStructure import numpy as np # ABINIT calculation bandstr = BandStructure( fWFK="bismuth_WFK", # WFK file path code="abinit", Ecut=50.0, IBstart=0, IBend=10, calculate_traces=True ) # With explicit unit cell transformation refUC = np.array([[0, -1, 1], [1, 0, -1], [-1, -1, -1]], dtype=float) shiftUC = np.zeros(3) bandstr = BandStructure( fWFK="bismuth_WFK", code="abinit", Ecut=50.0, refUC=refUC, shiftUC=shiftUC, search_cell=True, calculate_traces=True ) ``` -------------------------------- ### Run IrRep with Symmetry Separation (Corrected) Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This corrected command runs IrRep, separating wave functions by inversion symmetry (number 25), while only including inversion-invariant k-points (GM, X, L). This ensures the symmetry separation is physically meaningful. It specifies k-point names, explicit k-point indices, band bending, energy cutoff, reference UC, and the code to use. ```bash irrep -isymsep=25 -kpnames=GM,X,L -kpoints=1,2,3 -IBend=20 -Ecut=100 -refUC=-1,1,1,1,-1,1,1,1,-1 -EF=auto -code=abinit -fWFK=maxK_WFK > out ``` -------------------------------- ### Advanced IrRep CLI for Topological Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Demonstrates advanced command-line options for computing symmetry indicators, elementary band representation (EBR) decomposition, and handling time-reversal symmetry (gray groups). Requires OR-Tools for EBR decomposition. ```bash # Compute symmetry indicators for topological classification irrep -code=vasp -Ecut=50 -kpnames="GM,X,M,R" --symmetry-indicators # Compute full EBR decomposition (requires OR-Tools) irrep -code=vasp -Ecut=50 -kpnames="GM,X,M,R" --ebr-decomposition # Use time-reversal symmetry (gray groups) irrep -code=vasp -Ecut=50 -kpnames="GM" --time-reversal ``` -------------------------------- ### Magnetic Space Groups and Time-Reversal Symmetry Source: https://context7.com/irreducible-representations/irrep/llms.txt Illustrates handling magnetic structures and time-reversal symmetry using the SpaceGroup class. Shows how to create space groups for non-magnetic structures with time-reversal (gray groups) and for magnetic structures with explicit magnetic moments. ```python from irrep.spacegroup import SpaceGroup import numpy as np # Assuming lattice, positions, typat are defined as in the previous example # Non-magnetic with time-reversal (gray group) sg = SpaceGroup.from_cell( real_lattice=lattice, positions=positions, typat=typat, spinor=True, include_TR=True, # Include time-reversal magmom=None # Set to True for gray group ) # Magnetic structure with explicit moments magmom = np.array([ [0.0, 0.0, 2.5], # Magnetic moment on atom 1 [0.0, 0.0, -2.5] # Antiferromagnetic moment ]) sg_mag = SpaceGroup.from_cell( real_lattice=lattice, positions=positions, typat=typat, spinor=True, magmom=magmom, include_TR=True ) # Access unitary and antiunitary symmetries u_syms = sg_mag.u_symmetries # Unitary operations au_syms = sg_mag.au_symmetries # Antiunitary (time-reversal) operations ``` -------------------------------- ### GPAW Interface for Band Structure Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Initializes a BandStructure object to analyze wavefunctions from GPAW calculator objects. Requires loading a GPAW calculator and specifying the energy cutoff (Ecut). ```python from irrep.bandstructure import BandStructure from gpaw import GPAW # Load GPAW calculator calc = GPAW("diamond-nscf.gpw") # Create BandStructure from GPAW bandstr = BandStructure( calculator_gpaw=calc, code="gpaw", Ecut=50.0, # Ecut mandatory for GPAW calculate_traces=True, search_cell=True ) ``` -------------------------------- ### Separate Bands by Symmetry Eigenvalues with IrRep CLI Source: https://context7.com/irreducible-representations/irrep/llms.txt Shows how to separate band structures based on eigenvalues of specific symmetry operations using the `-isymsep` flag. It also demonstrates grouping Kramers pairs when separating. ```bash # Separate by symmetry operation index 4 irrep -code=vasp -spinor -Ecut=50 -isymsep=4 -kpnames="GM,X" # Separate by multiple symmetries irrep -code=vasp -spinor -Ecut=50 -isymsep=4,5 -kpnames="GM" # Group Kramers pairs when separating irrep -code=vasp -spinor -Ecut=50 -isymsep=4 -groupKramers ``` -------------------------------- ### Run IrRep Tests with Pytest Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Executes all tests within the IrRep project using the pytest command. This command will discover and run tests, typically located in a 'tests' directory or marked with specific conventions. ```bash pytest ``` -------------------------------- ### Transform Unit Cell with IrRep CLI Source: https://context7.com/irreducible-representations/irrep/llms.txt Shows how to use the `irrep` command for unit cell transformations, either automatically detected or manually specified. This is useful for converting DFT-optimized cells to conventional crystallographic cells. ```bash # Automatic transformation detection irrep -code=vasp -searchcell -Ecut=50 # Manual transformation specification (9 comma-separated numbers for 3x3 matrix) irrep -code=vasp -refUC=1,-1,0,0,1,-1,1,1,1 -shiftUC=0,0,0 -Ecut=50 -kpnames="GM" # Verify transformation is correct irrep -code=vasp -refUC=1,-1,0,0,1,-1,1,1,1 -searchcell -Ecut=50 ``` -------------------------------- ### Wannier90 Interface for Band Structure Analysis Source: https://context7.com/irreducible-representations/irrep/llms.txt Initializes a BandStructure object to analyze Wannier90 interpolated wavefunctions. Requires the seedname of Wannier90 files and the energy cutoff (Ecut). Supports specifying if UNK files are formatted. ```python from irrep.bandstructure import BandStructure # Wannier90 with UNK files bandstr = BandStructure( prefix="wannier90", # seedname of Wannier90 files code="wannier90", Ecut=30.0, # Ecut mandatory for W90 unk_formatted=False, # True for formatted UNK files calculate_traces=True ) # Write symmetry file for sitesym calculations bandstr.spacegroup.write_sym_file("wannier90.sym", alat=5.43) ``` -------------------------------- ### Identify Space Group of Bi2Se3 using IrRep Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/Bi2Se3/README.md This command uses IrRep to parse Quantum Espresso output files and identify the crystal structure and space group. It requires the prefix of the Quantum Espresso save directory and outputs the information to a file. ```bash irrep -code=espresso -prefix=out/Bi2Se3 -onlysym > output ``` -------------------------------- ### Zak Phase and Wilson Loop Calculation in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt This Python script illustrates the calculation of topological invariants, specifically Zak phases and Wannier charge centers (Wilson loop eigenvalues), along k-paths. It utilizes the BandStructure class to load data, compute these invariants, and print the results, including Zak phases in units of pi and the sum of WCC modulo 1. ```python from irrep.bandstructure import BandStructure import numpy as np # Load band structure along a path bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=False, Ecut=50.0, kplist=list(range(20)), # Path with 20 k-points save_wf=True, # Required for overlap calculations calculate_traces=True ) # Calculate Zak phases zak_phases, gap_widths, gap_centers, local_gaps = bandstr.zakphase() print("Zak phases (in units of pi):") for n, (z, gw) in enumerate(zip(zak_phases, gap_widths)): print(f" Band {n+1}: {z/np.pi:.5f} pi, gap = {gw:.4f} eV") # Calculate Wannier charge centers (Wilson loop eigenvalues) wcc = bandstr.wcc() print(f"Wannier charge centers: {wcc}") print(f"Sum of WCC mod 1: {np.sum(wcc) % 1:.5f}") ``` -------------------------------- ### Specify Conventional Cell Transformation in IrRep Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This command demonstrates how to explicitly provide the transformation matrix from a DFT primitive cell to the conventional unit cell in IrRep using the -refUC argument. This is necessary when IrRep cannot automatically determine the transformation, ensuring correct irreducible representation calculations. ```bash -refUC=-1,1,1,1,-1,1,1,1,-1 ``` -------------------------------- ### SpaceGroup Class - Symmetry Analysis from Crystal Structure Source: https://context7.com/irreducible-representations/irrep/llms.txt Demonstrates how to use the SpaceGroup class to perform symmetry analysis directly from a crystal structure. This includes creating a SpaceGroup object from lattice, positions, and atom types, and accessing information like space group name, number, and individual symmetry operations. ```python from irrep.spacegroup import SpaceGroup import numpy as np # Create from crystal structure lattice = np.array([ [5.43, 0.0, 0.0], [0.0, 5.43, 0.0], [0.0, 0.0, 5.43] ]) positions = np.array([ [0.0, 0.0, 0.0], [0.25, 0.25, 0.25] ]) typat = [14, 14] # Silicon sg = SpaceGroup.from_cell( real_lattice=lattice, positions=positions, typat=typat, spinor=False, symprec=1e-5 ) # Print space group info sg.show() print(f"Space group: {sg.name} (#{sg.number_str})") print(f"Number of symmetries: {sg.size}") # Access symmetry operations for symop in sg.symmetries: print(f"Symmetry {symop.ind}") print(f" Rotation:\n{symop.rotation}") print(f" Translation: {symop.translation}") # Get product and inverse tables prod_table = sg.get_product_table() inv_table = sg.get_inverse_table() ``` -------------------------------- ### Band Separation by Symmetry Eigenvalues in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt This Python code demonstrates how to separate electronic bands based on symmetry eigenvalues using the BandStructure class. It loads a band structure, performs the separation for a specified symmetry index, and then analyzes the resulting subspaces, printing their number of bands and direct band gaps. ```python from irrep.bandstructure import BandStructure bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=True, Ecut=50.0, save_wf=True, # Keep wavefunctions for separation calculate_traces=True ) # Separate by symmetry index (1-based from output) isym = 4 # Symmetry operation index subbands = bandstr.Separate(isym - 1, groupKramers=True) # Analyze each subspace for eigenvalue, subband in subbands.items(): print(f"Eigenvalue: {eigenvalue}") print(f" Number of bands: {subband.num_bands}") print(f" Direct gap: {subband.gap_direct:.4f} eV") subband.write_characters() ``` -------------------------------- ### Automatic Unit Cell Transformation for IrRep Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Instructs IrRep to automatically determine the transformation to the conventional unit cell. This is often necessary for correctly identifying irreducible representations. ```bash irrep -searchcell ``` -------------------------------- ### Access Band Structure Properties and Identify Irreps Source: https://context7.com/irreducible-representations/irrep/llms.txt Demonstrates how to access computed properties of a band structure object, such as the number of k-points, bands, direct and indirect gaps, and inversion-odd states. It also shows how to identify irreducible representations for specified k-point paths and write various output files. ```python from irrep.bandstructure import BandStructure # Assuming bandstr is an initialized BandStructure object # Example: bandstr = BandStructure(...) # Access computed properties print(f"Number of k-points: {bandstr.num_k}") print(f"Number of bands: {bandstr.num_bands}") print(f"Direct gap: {bandstr.gap_direct:.4f} eV") print(f"Indirect gap: {bandstr.gap_indirect:.4f} eV") print(f"Inversion-odd states: {bandstr.num_bandinvs}") # Identify irreducible representations bandstr.identify_irreps(kpnames=["GM", "X", "M", "R"]) # Write output files bandstr.write_trace() # trace.txt for BCS bandstr.write_irrepsfile() # irreps.dat bandstr.write_characters() # Print to stdout ``` -------------------------------- ### Iterate and Access k-point Data in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt This snippet demonstrates how to iterate through k-points in a band structure object and access various properties such as k-point coordinates, band degeneracies, energy levels, and character matrix shapes. It also shows how to access the little group and write characters for each k-point. ```python for kp in bandstr.kpoints: print(f"K-point index: {kp.ik0}") print(f"K-point coordinates (DFT cell): {kp.k}") print(f"K-point coordinates (ref cell): {kp.k_refUC}") print(f"Number of bands: {kp.num_bands}") print(f"Degeneracies: {kp.degeneracies}") print(f"Energy levels (mean): {kp.Energy_mean}") print(f"Character matrix shape: {kp.char.shape}") # Access little group print(f"Little group size: {len(kp.little_group)}") # Write characters for this k-point kp.write_characters() ``` -------------------------------- ### Diagnose Valence Band Topology Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This command is used to diagnose the topology of valence bands by focusing only on these bands. It sets the '-IBend' parameter to the index of the last valence band and redirects output to 'out'. ```bash irrep -kpnames=GM,X,L,W -IBend=20 -Ecut=100 -refUC=-1,1,1,1,-1,1,1,1,-1 -EF=auto -code=abinit -fWFK=maxK_WFK > out ``` -------------------------------- ### Specify Unit Cell Transformation and Check for Conventional Cell Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Provides IrRep with a specific transformation matrix (-refUC, -shiftUC) and instructs it to verify if this transformation leads to the conventional unit cell. This is useful for ensuring consistency in symmetry analysis. ```bash irrep -refUC=... -shiftUC=... -searchcell ``` -------------------------------- ### Identify Space Group with IrRep (Abinit) Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This command uses IrRep to extract crystal structure information and identify the space group from Abinit DFT data. It specifies the Abinit code and the input WFK file, saving the output to a file named 'out'. The output contains details about the crystal structure, space group name, and symmetry operations. ```bash irrep -onlysym -code=abinit -fWFK=maxK_WFK > out ``` -------------------------------- ### EBR Decomposition and Symmetry Indicators in Python Source: https://context7.com/irreducible-representations/irrep/llms.txt This Python code snippet shows how to perform EBR decomposition and compute symmetry indicators for topological quantum chemistry analysis. It involves initializing BandStructure, identifying irreducible representations, retrieving irrep counts, and then computing and printing the symmetry indicators and EBR classification. ```python from irrep.bandstructure import BandStructure bandstr = BandStructure( fWAV="WAVECAR", fPOS="POSCAR", code="vasp", spinor=True, Ecut=50.0, calculate_traces=True, search_cell=True ) # Identify irreps (required for TQC analysis) bandstr.identify_irreps(kpnames=["GM", "X", "M", "R"]) # Get irrep counts irrep_counts = bandstr.get_irrep_counts() print("Irrep multiplicities:") for label, count in irrep_counts.items(): print(f" {label}: {int(count)}") # Compute symmetry indicators si = bandstr.symmetry_indicators if si is not None: print("Symmetry indicators:") for name, value in si.items(): print(f" {name} = {value}") # Compute EBR decomposition (requires irreptables and OR-Tools) bandstr.compute_ebr_decomposition() print(f"Classification: {bandstr.classification}") # Possible values: 'ATOMIC LIMIT', 'FRAGILE TOPOLOGICAL', 'STABLE TOPOLOGICAL' # Print detailed EBR information bandstr.print_ebr_decomposition() ``` -------------------------------- ### Calculate Traces Only for DFT Cell Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Configures IrRep to calculate symmetry traces solely within the provided DFT unit cell, without attempting any transformation to a conventional cell. This is the default behavior if no unit cell transformation options are specified. ```bash irrep ``` -------------------------------- ### Identify Space Group using IrRep Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/Bi/README.md This command uses the IrRep tool to automatically identify the space group of a crystal structure from DFT input files. The output, which includes crystal structure details and the identified space group (e.g., R-3m No. 166), is redirected to a file named 'out'. ```bash irrep -onlysym > out ``` -------------------------------- ### Interpret Irreducible Representation Output Block Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This is a sample output block from the 'irrep' command, showing k-point information, number of states, and detailed energy levels with their corresponding irreducible representations and symmetry operation traces. ```text k-point 2 : [0.5 0. 0.5] (in DFT cell) [0. 1. 0.] (after cell trasformation) number of states : 22 Energy | degeneracy | irreps | sym. operations | | | 1 2 3 4 21 -7.2711 | 2 | -X6(1.0) | 2.0000 0.0000 0.0000 0.0000 1.4142 | | | 2.0000 0.0000 0.0000 0.0000 1.4142 -6.3611 | 2 | -X8(1.0) | 2.0000 -0.0000 0.0000 -0.0000 1.4142 | | | 2.0000 -0.0000 0.0000 -0.0000 1.4142 -4.7342 | 2 | -X8(1.0) | 2.0000 0.0000 0.0000 -0.0000 1.4142 | | | 2.0000 0.0000 0.0000 -0.0000 1.4142 -4.2995 | 2 | -X9(1.0) | 2.0000 -0.0000 0.0000 0.0000 -1.4142 | | | 2.0000 -0.0000 0.0000 0.0000 -1.4142 1.4154 | 2 | -X7(1.0) | 2.0000 -0.0000 -0.0000 -0.0000 -1.4142 | | | 2.0000 -0.0000 -0.0000 -0.0000 -1.4142 ``` -------------------------------- ### Specify Unit Cell Transformation without Checking Conventional Cell Source: https://github.com/irreducible-representations/irrep/blob/master/README.md Provides IrRep with a specific transformation matrix (-refUC, -shiftUC) but does not require it to check if it's the conventional cell. This allows analysis in arbitrary unit cells. ```bash irrep -refUC=... -shiftUC=... ``` -------------------------------- ### Calculate Irreducible Representations at Maximal k-points Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This command calculates irreducible representations for specified k-points and band indices. It requires setting k-point names, band range, energy cutoff, reference unit cell, Fermi energy, code, and WFK file. The output is redirected to 'out'. ```bash irrep -kpnames=GM,X,L,W -IBend=22 -Ecut=100 -refUC=-1,1,1,1,-1,1,1,1,-1 -EF=auto -code=abinit -fWFK=maxK_WFK > out ``` -------------------------------- ### Interpret Inversion and Band Gap Information Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This output snippet provides information about the inversion symmetry of the crystal and the number of inversion-odd Kramers pairs. It also indicates the energy gap between the calculated bands and the next set of upper bands. ```text Invariant under inversion: Yes Number of inversions-odd Kramers pairs : 3 Gap with upper bands: 2.3747815703844037 ``` -------------------------------- ### Identify Inversion Symmetry Number in IrRep Output Source: https://github.com/irreducible-representations/irrep/blob/master/tutorial/SnTe/README.md This snippet shows how to locate the symmetry number corresponding to the inversion operation within the IrRep output file. This number is crucial for subsequent commands that utilize symmetry separation. ```text ### 25 rotation : | -1 0 0 | rotation : | -1 0 0 | | 0 -1 0 | (refUC) | 0 -1 0 | | 0 0 -1 | | 0 0 -1 | ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.