Coder Social home page Coder Social logo

banduppy's Introduction

BandUP/BandUPpy: Band Unfolding code for Plane-wave based first-principles calculations

Note: This is a Python version to the BandUP code (not to be confused with bandupy - the interface and plotting tool of BandUP), made in order to restore support for modern versions of QuantumEspresso and other codes. In order ot read the wavefunctions stored by ab-initio codes, the routines of irrep are used.

Unfolded band structure - flatband mode (Si0.5Ge0.5) Unfolded band structure - density mode (Si0.5Ge0.5) Band structures overlay (Si0.5Ge0.5: Red, pure Si: black, pure Ge: blue) Band centers and band width (Si0.5Ge0.5)

Developers and contributors

Developer of BandUPpy :

BandUPpy Package is Restructured by (maintainer):

Developer of original BandUP :

  • Paulo V. C. Medeiros, Linköping University, (at present: SMHI, the Swedish Meteorological and Hydrological Institute)

  • Jonas Björk, Linköping University

  • Stepan S. Tsirkin, (in 2015: Donostia International Physics Center)

BandUPpy Contributors: Contributors

  • We sincerely thank each and every contributor for their valuable input and support.

Contact us: Email developer/maintainer team

  • If you would like to contribute to the development of BandUPpy or request new functionality, please get in touch with us or open a pull request. We appreciate and respect our users' views and are committed to providing the best experience possible. Your feedback is highly valued. We will be happy to support your request ASAP.

Installation

1. Requirements

    1. python>=3.7
    2. collections
    3. numpy
    4. pickle
    5. scipy>=1.0
    6. irrep>=1.6.2
    7. matplotlib

2. Installation using pip

    pip install banduppy

3. Installation from github repository

    git clone https://github.com/band-unfolding/banduppy.git
    cd banduppy
    pip install .  

Or, without cloning

    pip install git+https://github.com/band-unfolding/banduppy.git #@specific_branch

4. Installation using setup.py [deprecated]

Alternatively you can clone the repository and run setup.py in the usual manner:

    git clone https://github.com/band-unfolding/banduppy.git
    cd banduppy
    python setup.py install

Plane-wave codes currently supported by BandUPpy

At the moment, BandUPpy can parse wavefunctions generated by:

Usage

Documentation: here

The detailed documentation is available here. Explore the tutorial folder for example tutorials. Below are quick snippets showcasing what you can achieve with BandUPpy:

banduppy package:
    1. Unfolding class 
        1.1 propose_maximum_minimum_folding()
        1.2 generate_SC_Kpts_from_pc_kpts()
        1.3 generate_SC_Kpts_from_pc_k_path()
        1.3 Unfold()
        1.4 plot_ebs() [Note: Similar in Plotting class but can not plot band centers]
    2. BandStructure class
        2.1 BandStructure()
    3. Properties class
        3.1 collect_bandstr_data_only_in_energy_window()
        3.2 band_centers_broadening_bandstr()
        3.3 calculate_effecfive_mass()
        3.4 fit_functions()
    4. SaveBandStructuredata class
        4.1 save_unfolded_pc_kpts()
        4.2 save_unfolded_bandstucture()
        4.3 save_unfolded_bandcenter()
    5. Plotting class
        5.1 plot_ebs()
        5.2 plot_scf()

Tips and tricks:

FAQs: here

You can find a list of common user issues encountered while using this software here. We appreciate and respect our users' views and are committed to providing the best experience possible. Your feedback is highly valued.

Citations and references:

If you use BandUPpy in your work, please:

  • State EXPLICITLY that you have used the BandUP code (or a modified version of it, if this is the case), for instance, adding a sentence like:

     "The unfolding has been performed using the BandUP(py) code"
    
  • Read and cite the following papers (and the appropriate references therein):

  1. Paulo V. C. Medeiros, Sven Stafström, and Jonas Björk, Phys. Rev. B 89, 041407(R) (2014)
  2. Paulo V. C. Medeiros, Stepan S. Tsirkin, Sven Stafström, and Jonas Björk, Phys. Rev. B 91, 041116(R) (2015)
  3. Mikel Iraola, Juan L. Mañes, Barry Bradlyn, Titus Neupert, Maia G. Vergniory, Stepan S. Tsirkin, "IrRep: Symmetry eigenvalues and irreducible representations of ab initio band structures", Comput. Phys. Commun. 272, 108226 (2022)

Bibliography file: Here is the bibliography file for your convenience.

Further details

Version release

Latest release: v0.3.3

Chekout out version release history here for the full list of updates and upgrades.

License

BandUPpy is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

BandUPpy is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with BandUP. If not, see http://www.gnu.org/licenses/.

Upcoming (TBD)

  1. Orbital contribution projection implementation
  2. Improve band center determination algorithm

banduppy's People

Contributors

alpinnovianus avatar bmondal94 avatar nicholascheng94 avatar stepan-tsirkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

banduppy's Issues

Runing Banduppy occurs an error

Dear Banduppy team,

When I am calculatting the unfolding band of MoS2 using Abinit 9.4.1 and Banduppy. The k-path.py and the WF file are obtained. However, when I run the banduppy script (k-path-suan.py), an error occur.

The WF file is very big, so the error output file and abinit input files are only attached in email.

If you have the time, could you please help me to give some suggestions.

Look forward to hearing from you

Yours Sincerely,

Qiang Li

bandupp_mos2.zip

Python wrong flotting point precission

Dear @stepan-tsirkin ,

I have recently started using banduppy. I am reaching out regarding a critical Python issue I have noticed while using Banduppy. I see that the Unfolding class utilizes the % operator. However, as you may know, due to tiny inaccuracies in floating-point operations, 1.1%1 does not yield the same result as 0.1%1 in python, potentially leading to incorrect reductions during np.unique operations.

print(0.1%1 == 1.1%1) 
# Output -> False

A propose a possible solution using np.round. Here is a code snippet showing this issue.

import numpy as np

# Perform modulo operation
result = np.array([[0.1,0.0,0.0],[1.1,0,0]]) % 1
# result = np.fmod(np.array([[0.1,0.0,0.0],[1.1,0,0]]), 1) # np.fmod, np.mod -> Same problem
print(f'Another e.g.: {1.4%1:0.16f}', 0.4%1==0.4)
# Use np.unique with a tolerance-based comparison function
unique_result = np.unique(result, axis=0)
# Filter unique values based on tolerance
unique_result_round = np.unique(np.round(result, decimals=12), axis=0)
print("Unique values without tolerance:")
print(unique_result)
print("Unique values with tolerance:")
print(unique_result_round)

This issue is especially crucial, as it impacts the accuracy of supercell band folding calculations. Here is an example:

import banduppy
unfold_path=banduppy.UnfoldingPath(supercell= np.diag([4,4,2]), pathPBZ=[[0,0,0],[1/2,0,0]], nk=21, labels=None) 
print(f"-Info: Contains {unfold_path.nkptPBZ} points in PC ({unfold_path.nkptPBZunique} unique),")
print(f"corresponding to {unfold_path.nkptSBZ} unique SC points")
print(unfold_path.kpointsSBZ)

This produces wrong reduction in supercell band folding.

unfolding QuantumEspresso spin-orbit coupling bands (NbSe2 supercell)

Dear Stepan,

I am experiencing the following issue when unfolding bandstructure of 2x2 supercell of NbSe2 to hexagonal PC of NbSe2. A typical feature of the transition metal dichalcogenides is the spin splitting at the K point of about hundred of meV, seen as two spin split bands. The present implementation using DFT pw caculations QE v6.5 and unfolding using banduppy-0.1.3 and irrep-1.6.1 gives a single band, see figure left. The expected results with spin split bands is sketched with green lines on the right. The degen_thresh (in .../irrep/kpoint.py) was set well below the known band spin splitting.

image

The relevant pieces of the code are as follows

unfold=banduppy.UnfoldingPath( supercell= [[ 2 , 0 , 0], [ 0 , 2 , 0], [ 0 , 0 , 1]] , pathPBZ=[[0,0,0],[1/3,1/3,0],[1/2,0,0],[0,0,0]], nk=(32,12,32), labels="GKMG" )

bands=banduppy.BandStructure(code="espresso", prefix="nbse2")

unfold.plot(save_file="unfold_density.png",plotSC=True,Emin=-5,Emax=3.5,Ef=0.3674,mode='density',smear=0.015,nE=800)

Input for quantum espresso (with cheap cutoffs):

&CONTROL
title = 'NbSe2 2x2 for testing' ,
calculation = 'scf' ,
restart_mode = 'from_scratch' ,
pseudo_dir = './pseudo',
outdir = '/tmp',
prefix = 'nbse2' ,
verbosity = 'high' ,
/
&SYSTEM
ibrav = 4,
celldm(1) = 13.001316 ,
celldm(3) = 2.325 ,
nat = 12,
ntyp = 2,
ecutwfc = 55 ,
ecutrho = 437 ,
occupations = 'smearing' ,
degauss = 0.01 ,
noncolin = .true. ,
lspinorb = .true. ,
/
&ELECTRONS
startingpot = 'file' ,
conv_thr = 1.0d-09 ,
mixing_mode = 'plain' ,
mixing_beta = 0.7 ,
diagonalization = 'david' ,
/
ATOMIC_SPECIES
Nb 92.90638 Nb.rel-pbesol-spn-rrkjus_psl.1.0.0.UPF
Se 78.96 Se.rel-pbesol-n-rrkjus_psl.1.0.0.UPF
ATOMIC_POSITIONS crystal
Nb 0.16666666 0.33333334 0.00000000
Nb 0.66666666 0.33333334 0.00000000
Nb 0.16666666 0.83333334 0.00000000
Nb 0.66666666 0.83333334 0.00000000
Se 0.33333334 0.16666666 0.11456888
Se 0.33333334 0.16666666 0.88543111
Se 0.83333334 0.16666666 0.11456888
Se 0.83333334 0.16666666 0.88543111
Se 0.33333334 0.66666666 0.11456888
Se 0.33333334 0.66666666 0.88543111
Se 0.83333334 0.66666666 0.11456888
Se 0.83333334 0.66666666 0.88543111
K_POINTS automatic
6 6 1 0 0 0

The k-point list for bands calculations:
K_POINTS crystal
72
0.00000000 0.00000000 0.00000000 1
0.02150538 0.02150538 0.00000000 1
0.03225806 0.00000000 0.00000000 1
0.04301075 0.04301075 0.00000000 1
0.06451613 0.06451613 0.00000000 1
0.06451613 0.00000000 0.00000000 1
0.08602151 0.08602151 0.00000000 1
0.09677419 0.00000000 0.00000000 1
0.10752688 0.10752688 0.00000000 1
0.12903226 0.00000000 0.00000000 1
0.12903226 0.12903226 0.00000000 1
0.15053763 0.15053763 0.00000000 1
0.16129032 0.00000000 0.00000000 1
0.17204301 0.17204301 0.00000000 1
0.19354839 0.19354839 0.00000000 1
0.19354839 0.00000000 0.00000000 1
0.21505376 0.21505376 0.00000000 1
0.22580645 0.00000000 0.00000000 1
0.23655914 0.23655914 0.00000000 1
0.25806452 0.00000000 0.00000000 1
0.25806452 0.25806452 0.00000000 1
0.27956989 0.27956989 0.00000000 1
0.29032258 0.00000000 0.00000000 1
0.30107527 0.30107527 0.00000000 1
0.32258065 0.32258065 0.00000000 1
0.32258065 0.00000000 0.00000000 1
0.34408602 0.34408602 0.00000000 1
0.35483871 0.00000000 0.00000000 1
0.36559140 0.36559140 0.00000000 1
0.38709677 0.38709677 0.00000000 1
0.38709677 0.00000000 0.00000000 1
0.40860215 0.40860215 0.00000000 1
0.41935484 0.00000000 0.00000000 1
0.43010753 0.43010753 0.00000000 1
0.45161290 0.45161290 0.00000000 1
0.45161290 0.00000000 0.00000000 1
0.47311828 0.47311828 0.00000000 1
0.48387097 0.00000000 0.00000000 1
0.49462366 0.49462366 0.00000000 1
0.51612903 0.00000000 0.00000000 1
0.64516129 0.64516129 0.00000000 1
0.51612903 0.51612903 0.00000000 1
0.53763441 0.53763441 0.00000000 1
0.54838710 0.00000000 0.00000000 1
0.55913978 0.55913978 0.00000000 1
0.58064516 0.58064516 0.00000000 1
0.58064516 0.00000000 0.00000000 1
0.60215054 0.60215054 0.00000000 1
0.61290323 0.00000000 0.00000000 1
0.62365591 0.62365591 0.00000000 1
0.64516129 0.00000000 0.00000000 1
0.64516129 0.64516129 0.00000000 1
0.66666667 0.66666667 0.00000000 1
0.67741935 0.00000000 0.00000000 1
0.69696970 0.60606061 0.00000000 1
0.70967742 0.00000000 0.00000000 1
0.72727273 0.54545455 0.00000000 1
0.74193548 0.00000000 0.00000000 1
0.75757576 0.48484848 0.00000000 1
0.77419355 0.00000000 0.00000000 1
0.78787879 0.42424242 0.00000000 1
0.80645161 0.00000000 0.00000000 1
0.81818182 0.36363636 0.00000000 1
0.83870968 0.00000000 0.00000000 1
0.84848485 0.30303030 0.00000000 1
0.87096774 0.00000000 0.00000000 1
0.87878788 0.24242424 0.00000000 1
0.90322581 0.00000000 0.00000000 1
0.90909091 0.18181818 0.00000000 1
0.93548387 0.00000000 0.00000000 1
0.93939394 0.12121212 0.00000000 1
0.96774194 0.00000000 0.00000000 1
0.96969697 0.06060606 0.00000000 1

The pseudopotentials can be found here. Any hints or advises are very welcome.

Best regards,
Martin Gmitra

error in running banduppy

Hello
i have been trying to run banduppy uptonow i m getting the eerror:
error while unpickling unfold '[Errno 2] No such file or directory: 'unfold.pickle'', unfolding it
unpickling bandstructure

followed by several lines concerning the unfinding of kpoints
any help is welcome

Consult for the use of the BandUP program

I'm new to BandUP and I'm trying to learn and apply it to my own flaw system but I find that my calculations are always not satisfactory. The results are roughly as follows:
I found that the delta_N in the figure is always small and there are some line segments that should not be in the energy band of the primitive cell. My calculation steps are roughly as follows:

  1. Use ATAT or supercell to build a crystal model
  2. Use VASP fixed cell parameters for optimization (ISIF=2)
  3. The optimized structure is statically calculated to obtain CHGCAR
  4. Use seekpath to find the high symmetry point of the primitive cell and use BandUP to generate the irreducible K points required for unfolding
  5. Read the statically calculated CHGCAR and then calculate the WAVECAR
  6. BandUP post-processing to get the result of unfolding
    Also my defect concentration is 2/27, not too big. I'm not sure if this is a problem with my crystal models or a problem with calculation processing, I hope you can help me, thank you very much!

Orbital projection VASP

Dear banduppy staff
First of all, thank you for the software.
However, I have a question, if it is trivial or if there is already an answer, I apologise but I could not find a solution.
I would like to get the unfolded bands projected onto the orbitals: the analogue of

./bandup --orbital
./bandup projected-unfold -at #
./bandup projected-unfold -orbs px...

how do i do it with banduppy? thanks
C.

Mirror bands

Hi Dr. Tsirkin and the band up team,
Thank you for making the amazing code again! I found the following unfolded structure to have some mirror bands (ex. G-X). The same structure calculated in QE and unfolded with a different code did not show this suspicious feature.
I did see the warning 'WARNING (point_is_in_bz): Tolerance applied &
when checking whether point lies inside 1BZ. ,&
This should be OK, but do check your results.'
Yet not using symmetry averaging had the same issue without this message.

Do you have any tricks to resolves this?
Does band up py use Bandup's unfolding algorithm for the most part? If not then I'm planning to try that. Thank you so much!

unfolded_EBS_symmetry-averaged_E_from_-4 0_to_3 9999999999998295_eV_dE_0 004999999999999893_eV

Banduppy for non-orthogonal system

To whom it may concern

Firstly, thank you for this designed routin in retail.
I am trying to use the program in QE for an hexagonal lattice system,
which features fractional coefficient in the supercell section.

The program complains directly, as follow:

unfolding_path.py", line 129, in init
super(UnfoldingPath,self).init(supercell,kpointsPBZ)

unfolding_path.py", line 23, in init
assert np.linalg.norm(np.array(supercell)-supercell_int)<1e-14 ,
AssertionError: supercell should consist of integers, found [[1, 0, 0], [-0.5, 0.8660254037844386, 0], [0, 0, 1.22924106]]

Have I plugged in smth wrong or is there a work around for this?
Thank you in advance
Samuele

unfolding with orbital character

Dear Stepan,

Hi, I'm really enjoying the banduppy with Quantum Espresso.
These days, I want to analyze orbital characters within unfolded band structure.
It seems that the current version does not support the orbital character analysis.
Do you have any plan to implement the orbital character analysis within unfolded band structure?
If you have a preliminary code that supports the orbital character analysis, could you share it?
Thanks in advance.

Regards,

Different number of plane waves ncnt vs nplane

Dear Developers,

I had a sudden problem on one of calculations using VASP. For one of k-points in list there appeared an error:

RuntimeError: *** error - computed ncnt=18134 != input nplane=18133

Could you, please, help to resolve it?

Best regards,
Dmitry

Below is the full output:

RuntimeError Traceback (most recent call last)
Cell In [46], line 5
3 if not os.path.exists(os.path.join(wd, bands_pickle_file)):
4 print("reading bandstructure")
----> 5 bands = banduppy.BandStructure(code="vasp", spinor=spinorbit, fPOS = "POSCAR", fWAV = "WAVECAR")
6 pickle.dump(bands,open(bands_pickle_file,"wb"))
7 print ("reading bandstructure - done")

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/bandstructure.py:136, in BandStructure.init(self, fWAV, fWFK, prefix, fPOS, Ecut, IBstart, IBend, kplist, spinor, code, EF, onlysym, spin_channel, refUC, shiftUC, search_cell)
133 if spin_channel=='down' : spin_channel='dw'
135 if code == "vasp":
--> 136 self.__init_vasp(
137 fWAV, fPOS, Ecut, IBstart, IBend, kplist, spinor, EF=EF, onlysym=onlysym, refUC=refUC, shiftUC=shiftUC, search_cell=search_cell
138 )
139 elif code == "abinit":
140 self.__init_abinit(
141 fWFK, Ecut, IBstart, IBend, kplist, EF=EF, onlysym=onlysym, refUC=refUC, shiftUC=shiftUC, search_cell=search_cell
142 )

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/bandstructure.py:280, in BandStructure.__init_vasp(self, fWAV, fPOS, Ecut, IBstart, IBend, kplist, spinor, EF, onlysym, refUC, shiftUC, search_cell)
278 kplist = np.array([k for k in kplist if k >= 0 and k < NK])
279 # print (kplist)
--> 280 self.kpoints = [
281 Kpoint(
282 ik,
283 NBin,
284 IBstart,
285 IBend,
286 Ecut,
287 Ecut0,
288 self.RecLattice,
289 symmetries_SG=self.spacegroup.symmetries,
290 spinor=self.spinor,
291 WCF=WCF,
292 )
293 for ik in kplist
294 ]

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/bandstructure.py:281, in (.0)
278 kplist = np.array([k for k in kplist if k >= 0 and k < NK])
279 # print (kplist)
280 self.kpoints = [
--> 281 Kpoint(
282 ik,
283 NBin,
284 IBstart,
285 IBend,
286 Ecut,
287 Ecut0,
288 self.RecLattice,
289 symmetries_SG=self.spacegroup.symmetries,
290 spinor=self.spinor,
291 WCF=WCF,
292 )
293 for ik in kplist
294 ]

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/kpoint.py:197, in Kpoint.init(self, ik, NBin, IBstart, IBend, Ecut, Ecut0, RecLattice, symmetries_SG, spinor, code, kpt, npw_, fWFK, WCF, prefix, kptxml, flag, usepaw, eigenval, spin_channel, IBstartE)
194 self.symmetries_SG = symmetries_SG # lazy_property needs it
196 if code.lower() == "vasp":
--> 197 self.WF, self.ig = self.__init_vasp(
198 WCF, ik, NBin, IBstart, IBend, Ecut, Ecut0
199 )
200 elif code.lower() == "abinit":
201 self.WF, self.ig = self.__init_abinit(
202 fWFK,
203 ik,
(...)
212 usepaw=usepaw,
213 )

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/kpoint.py:607, in Kpoint.__init_vasp(self, WCF, ik, NBin, IBstart, IBend, Ecut, Ecut0)
604 except BaseException:
605 self.upper = np.NaN
--> 607 ig = calc_gvectors(
608 self.K, self.RecLattice, Ecut0, npw, Ecut, spinor=self.spinor
609 )
610 selectG = np.hstack((ig[3], ig[3] + int(npw / 2))) if self.spinor else ig[3]
611 WF = np.array(
612 [
613 WCF.record(3 + ik * (NBin + 1) + ib, npw, np.complex64)[selectG]
614 for ib in range(IBstart, IBend)
615 ]
616 )

File ~/nfs_sm/prog/opt/miniforge3/envs/phono3py/lib/python3.9/site-packages/irrep/gvectors.py:146, in calc_gvectors(K, RecLattice, Ecut, nplane, Ecut1, thresh, spinor, nplanemax)
144 else:
145 if ncnt != nplane:
--> 146 raise RuntimeError(
147 "*** error - computed ncnt={0} != input nplane={1}".format(
148 ncnt, nplane
149 )
150 )
151 igall = np.array(igall, dtype=int)
152 ng = igall.max(axis=0) - igall.min(axis=0)

RuntimeError: *** error - computed ncnt=18134 != input nplane=18133

Error running tutorial

I tried run the tutorial file for bulk silicon with both QE 6.8 and QE 6.4.1, keep having the same error, some problem with finding the correct symmetries.

Traceback (most recent call last):
  File "run_banduppy.py", line 64, in <module>
    bands=banduppy.BandStructure(code="espresso", prefix="bulk_Si")
  File "/home/u/raglamai/anaconda3/lib/python3.8/site-packages/irrep/bandstructure.py", line 140, in __init__
    self.__init_espresso(
  File "/home/u/raglamai/anaconda3/lib/python3.8/site-packages/irrep/bandstructure.py", line 802, in __init_espresso
    self.spacegroup = SpaceGroup(
  File "/home/u/raglamai/anaconda3/lib/python3.8/site-packages/irrep/spacegroup.py", line 613, in __init__
    self.refUC, self.shiftUC = self.determine_basis_transf(
  File "/home/u/raglamai/anaconda3/lib/python3.8/site-packages/irrep/spacegroup.py", line 1009, in determine_basis_transf
    raise RuntimeError(("Could not find any shift "
RuntimeError: Could not find any shift placing the origin in an inversion center that leads to the expressions for symmetries found in tables.

I am using:
Python 3.8.5
conda 4.10.3
banduppy 0.1.3 pypi_0 pypi
irrep 1.6.0 pypi_0 pypi

Any ideas? I am not changing anything in the files except QE path.

spectral function normalization

Hello, @stepan-tsirkin!

I have a small question related to the normalization of the spectral function. When we use "density" option for plotting, the spectral function has intensity, which is not from 0 to 1. In my understanding, this is not a scaling issue (cause in principle, we can scale intensities from [0,x] to [0,1]), but it is related to the normalization of the spectral function when the delta function is presented as gaussian in the code. Am I right that if the spectral function is properly normalized it should be between 0 and 1 or I am missing something? Could you, please, clarify this point?

question regarding band-resolved unfolding

Hi! My name is Nikita Rybin. I am a PhD student from Fritz-Haber institute. Recently, I became aware of bandup and decided to try it since my project is also related to band-unfolding. Since I had problems running bandup with QE I moved to banduppy. It works for me quite smoothly -- thanks @stepan-tsirkin for making it!

Although it works I have a question regarding the methodology and capabilities: as far as I understand, at the moment only momentum-resolved spectral function could be calculated, in other words for each k vector we unfold all the states of the supercell into the unit cell (eq.4 from Medeiros_PRB 2014 or appendix from PopescuZunger_PRB_2012 paper).

However, I am interested in band-resolved spectral function, i.e., the projection of all the states from the supercell to some (let's say all valence and only a couple of first states in conduction zone) of the unit cell states. Could developers (@paulovcmedeiros and @stepan-tsirkin ) give a bit more color on this question? Is there any probability that band-resolved case would be implemented soon?

Thank you!
Nikita

Unfolding non-collinear supercell

Hello Banduppy developers, I've been using Banduppy to unfold band structures obtained from non-collinear and collinear spin-polarized supercell calculations conducted with Quantum Espresso. However, upon examining the unfolded band structure, I'm noticing some suspicious results. Can Banduppy be reliably used for unfolding such systems? Are there any specific precautions or adjustments I should consider when dealing with non-collinear and collinear spin-polarized calculations? Any insights or recommendations would be immensely helpful. Thank you for your assistance!

AttributeError: module 'banduppy' has no attribute 'UnfoldingPath'.

First of all, thanks to Stepan and all collabs for developing this exciting BandUPpy code.

Excuse me if my question is a very basic one, but really i don't know what i'm missing to do in order to get past of this error:

Traceback (most recent call last):
File "/home/zephyrus/Descargas/Si-for-banduppy/./run_banduppy.py", line 18, in
unfold_path=banduppy.UnfoldingPath(
AttributeError: module 'banduppy' has no attribute 'UnfoldingPath'. Did you mean: 'Unfolding'?

I'm trying to use banduppy to unfold supercell structures coming from DFT using Quantum Espresso 7.3., after having banduppy and irrep packages installed via pip.

Any advice will be greatly appreciated.

Regards,

Josh

Wrong supercell to primitive cell k-path transformation in the final stage

The matrix multiplication in the _generate_kpoints_line() function should be in the opposite order.
Instead of

RecLattice = 2*np.pi*np.dot(transformation_matrix, np.linalg.pinv(sc_lattice)).T
which is equivalent to
RecLattice = 2*np.pi*np.linalg.pinv(sc_lattice).T @ transformation_matrix.T

it should be
RecLattice = transformation_matrix.T @ 2*np.pi*np.linalg.pinv(sc_lattice).T

Spin-orbit couple

input_files.zip
Dear all,

I have encountered an issue when including spin orbit interaction in the simulations. I am using QuantumEspresso v 6.5 and the latest version of Bandup(py) (v 0.1.3) and irrep (v 1.6.0) on pip.

When I run the tutorial for Bulk-Si I find the output from Bandup(py) is the same as in the reference files.

However, there is a problem if I then include spin orbit coupling in the tutorial calculation (i.e. set nspin = 4 etc. in the input files). I find that energies which previously had a small weighting in the non-soc calculation (i.e. the grey bands in unfold_fatband_nosoc.png) have now got a significant weighting in the soc calculation (unfold_fatband_soc.png) .

I have attached the full input files in the zip file for reference.

Has anyone else encountered this or have a solution this bug?

Thank you,

Jordan

out of memory

Dear all,
Do you see a way to reduce RAM usage for unfolding large cases? I am running out of 512GB of RAM.
Thanks,
Martin

Questions related to the unfolding using bandu

Dear @stepan-tsirkin and @paulovcmedeiros,

I have recently decided to use banduppy (I use it with QE 6.4), but firstly test it with different set ups. I have a couple of question, regarding the output and postprocessing steps. Would be very nice, if you can help me to clarify them. I should note that I am quite new to qe and currently use aims (used vasp also before), so the problem can also come from the lack of experience/understanding of qe.

  1. I took undisturbed Si unit cell and made a 3x3x3 supercell out of it. I made a couple of runs with different number of kpoints along G-X path. For some reason, after I did postprocessing using bandupPy, I got different number of energies for high symmetry points( Gamma and X for example) and other points along the path. Moreover, the number of states is different than "nbnd" provided to qe. I assume that this is related to the symmetry, but its not clear for me how it works. In contrast, I don't see such behavior when do calculations with the same Si supercell, but after rattling it (distort the structure slightly). I can send you my input/output (in principle identical to the one presented in the tutorial). Is that needed? Is there a way to print all states for each particular kpoint?
  2. This is probably the question to @stepan-tsirkin. The sense of the variable "break_thresh" used in the unfolding step is not clear to me. I went to the source of irrep (https://github.com/stepan-tsirkin/irrep/blob/master/irrep/bandstructure.py), but its still not clear how this threshold influence the unfolding and whether I should test it for each specific run. It is used to merge identical kpoints, isn't it?
  3. Is there a way to sample uniformly the whole BZ of the supercell and then unfold it back to the unit cell? In principle, I can sample it uniformly using lots of paths, but may be you know or can suggest some better option?

Sincerely,
Nikita

BandUPpy for VASP

Dear BandUPpy developers,

Many thanks for the unfolding code. I am willing to know whether the python version of BandUP can be used with VASP.
I have only found that BandUPpy can post process the outputs from Quantum-Espresso which is given in the tutorials and examples. However, I have not found similar tutorials for VASP. I shall be grateful if you can provide some information regarding the SC K points generation using BandUPpy.

Thanks and regards
Gargee

Tutorial for VASP bandstructure with k-points for hybrid functional

Dear @stepan-tsirkin ,

Unlike for LDA/GGA functional, VASP hybrid functional band calculation has the K-points file made of weighted (from IBZKPTS file) and non-weighted parts (the band structure we want to plot).

e.g. the Kpoints file of procedure 2 in the VASP wiki page below: https://www.vasp.at/wiki/index.php/Si_HSE_bandstructure#Hybrid_calculation_using_a_suitably_modified_KPOINTS_file

We usually only want the non-weighted parts for our final plots.

Can banduppy be used with such hybrid functional VASP band calculations?
If yes, could you add a tutorial that shows how to use it?

Edit: I recently also found that such KPOINTS are also required for calculations with metaGGAs, not only hybrids.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.