[Wannier] kmesh Issues
Gerhard, Haylen
haylen.gerhard at emory.edu
Wed Jun 11 18:44:18 CEST 2025
Hello,
I'm trying to use Wannier90 to compute MLWF for 2D systems. Specifically, I'm trying to acquire the U_{nm}^{k} matrix that will transform my bloch states to the optimal gauge.
I am supplying seedname.win, seedname.amn, and seedname.mmn files that I generate using tight-binding models in python. The .mmn files are generated from a (currently random) gauge of Bloch states and I'm constructing A_{nm}^{k} as (1/sqrt(Nkpoints))*delta_{nm} (i.e., my trial orbital is the Wannier function produced by my Bloch gauge).
After issues in 2D, I am trying to use Wannier90 for a 1D system (lower band of SSH chain).
For the .win file (see below), I'm using a modified version of the .win file supplied in the GaAs tutorial by Wannier90. I get the error message "kmesh_get_automatic" and the .wout file has the error
"Unable to satisfy B1 with any of the first 144 shells
Your cell might be very long, or you may have an irregular MP grid
Try increasing the parameter search_shells in the win file (default=12)
Exiting.......
kmesh_get_automatic"
Following the user guide, I am generating my kmesh using the kmesh.pl file in the utility folder of Wannier90, then I am loading those k points into python for my calculations. I have set search_shells=144.
I have seen elsewhere on the archives here that similar problems have been solved by modifying the kmesh_tol for the definition of shells. If I decrease the kmesh_tol, I get the error message "kmesh_get_bvector: Not enough bvectors found."
I have also seen the suggestion that, when doing 2 or 1 dimensional systems, to increase the length of the unnecessary lattice vectors.
Below are both my .win and .wout files. Any help, either with my files or a better pathway for what I'm trying to do, would be greatly appreciated.
My .win input :
num_wann = 1
num_bands = 1
num_iter = 20
! SYSTEM
begin unit_cell_cart
Ang
1.000 0.000 0.000
0.000 1.000 0.000
0.000 0.000 1.000
end unit_cell_cart
write_u_matrices = .true.
search_shells=144
kmesh_tol=0.000005
! KPOINTS
mp_grid : 1000 1 1
begin kpoints
0.00000 0.00000 0.00000
0.00100 0.00000 0.00000
0.00200 0.00000 0.00000
0.00300 0.00000 0.00000
...
end kpoints
My .wout output :
+---------------------------------------------------+
| |
| WANNIER90 |
| |
+---------------------------------------------------+
| |
| Welcome to the Maximally-Localized |
| Generalized Wannier Functions code |
| http://www.wannier.org |
| |
| |
| Wannier90 Developer Group: |
| Giovanni Pizzi (EPFL) |
| Valerio Vitale (Cambridge) |
| David Vanderbilt (Rutgers University) |
| Nicola Marzari (EPFL) |
| Ivo Souza (Universidad del Pais Vasco) |
| Arash A. Mostofi (Imperial College London) |
| Jonathan R. Yates (University of Oxford) |
| |
| For the full list of Wannier90 3.x authors, |
| please check the code documentation and the |
| README on the GitHub page of the code |
| |
| |
| Please cite |
| |
| [ref] "Wannier90 as a community code: |
| new features and applications", |
| G. Pizzi et al., J. Phys. Cond. Matt. 32, |
| 165902 (2020). |
| http://doi.org/10.1088/1361-648X/ab51ff |
| |
| in any publications arising from the use of |
| this code. For the method please cite |
| |
| [ref] "Maximally Localized Generalised Wannier |
| Functions for Composite Energy Bands" |
| N. Marzari and D. Vanderbilt |
| Phys. Rev. B 56 12847 (1997) |
| |
| [ref] "Maximally Localized Wannier Functions |
| for Entangled Energy Bands" |
| I. Souza, N. Marzari and D. Vanderbilt |
| Phys. Rev. B 65 035109 (2001) |
| |
| |
| Copyright (c) 1996-2020 |
| The Wannier90 Developer Group and |
| individual contributors |
| |
| Release: 3.1.0 5th March 2020 |
| |
| This program 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 2 of |
| the License, or (at your option) any later version|
| |
| This program 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 this program; if not, |
| write to the Free Software Foundation, Inc., |
| 675 Mass Ave, Cambridge, MA 02139, USA. |
| |
+---------------------------------------------------+
| Execution started on 11Jun2025 at 12:41:55 |
+---------------------------------------------------+
******************************************************************************
* -> Using CODATA 2006 constant values *
* (http://physics.nist.gov/cuu/Constants/index.html) *
* -> Using Bohr value from CODATA *
******************************************************************************
Running in serial (with serial executable)
------
SYSTEM
------
Lattice Vectors (Ang)
a_1 1.000000 0.000000 0.000000
a_2 0.000000 1.000000 0.000000
a_3 0.000000 0.000000 1.000000
Unit Cell Volume: 1.00000 (Ang^3)
Reciprocal-Space Vectors (Ang^-1)
b_1 6.283185 0.000000 0.000000
b_2 0.000000 6.283185 0.000000
b_3 0.000000 0.000000 6.283185
No atom positions specified
------------
K-POINT GRID
------------
Grid size =*** x 1 x 1 Total points = 1000
*---------------------------------- MAIN ------------------------------------*
| Number of Wannier Functions : 1 |
| Number of Objective Wannier Functions : 1 |
| Number of input Bloch states : 1 |
| Output verbosity (1=low, 5=high) : 1 |
| Timing Level (1=low, 5=high) : 1 |
| Optimisation (0=memory, 3=speed) : 3 |
| Length Unit : Ang |
| Post-processing setup (write *.nnkp) : F |
| Using Gamma-only branch of algorithms : F |
*----------------------------------------------------------------------------*
*------------------------------- WANNIERISE ---------------------------------*
| Total number of iterations : 20 |
| Number of CG steps before reset : 5 |
| Trial step length for line search : 2.000 |
| Convergence tolerence : 0.100E-09 |
| Convergence window : -1 |
| Iterations between writing output : 1 |
| Iterations between backing up to disk : 100 |
| Write r^2_nm to file : F |
| Write xyz WF centres to file : F |
| Write on-site energies <0n|H|0n> to file : F |
| Use guiding centre to control phases : F |
| Use phases for initial projections : F |
*----------------------------------------------------------------------------*
Time to read parameters 0.032 (sec)
*---------------------------------- K-MESH ----------------------------------*
+----------------------------------------------------------------------------+
| Distance to Nearest-Neighbour Shells |
| ------------------------------------ |
| Shell Distance (Ang^-1) Multiplicity |
| ----- ----------------- ------------ |
| 1 0.006283 2 |
| 2 0.012566 2 |
| 3 0.018850 2 |
| 4 0.025133 2 |
| 5 0.031416 2 |
| 6 0.037699 2 |
| 7 0.043982 2 |
| 8 0.050265 2 |
| 9 0.056549 2 |
| 10 0.062832 2 |
| 11 0.069115 2 |
| 12 0.075398 2 |
| 13 0.081681 2 |
| 14 0.087965 2 |
| 15 0.094248 2 |
| 16 0.100531 2 |
| 17 0.106814 2 |
| 18 0.113097 2 |
| 19 0.119381 2 |
| 20 0.125664 2 |
| 21 0.131947 2 |
| 22 0.138230 2 |
| 23 0.144513 2 |
| 24 0.150796 2 |
| 25 0.157080 2 |
| 26 0.163363 2 |
| 27 0.169646 2 |
| 28 0.175929 2 |
| 29 0.182212 2 |
| 30 0.188496 2 |
| 31 0.194779 2 |
| 32 0.201062 2 |
| 33 0.207345 2 |
| 34 0.213628 2 |
| 35 0.219911 2 |
| 36 0.226195 2 |
| 37 0.232478 2 |
| 38 0.238761 2 |
| 39 0.245044 2 |
| 40 0.251327 2 |
| 41 0.257611 2 |
| 42 0.263894 2 |
| 43 0.270177 2 |
| 44 0.276460 2 |
| 45 0.282743 2 |
| 46 0.289027 2 |
| 47 0.295310 2 |
| 48 0.301593 2 |
| 49 0.307876 2 |
| 50 0.314159 2 |
| 51 0.320442 2 |
| 52 0.326726 2 |
| 53 0.333009 2 |
| 54 0.339292 2 |
| 55 0.345575 2 |
| 56 0.351858 2 |
| 57 0.358142 2 |
| 58 0.364425 2 |
| 59 0.370708 2 |
| 60 0.376991 2 |
| 61 0.383274 2 |
| 62 0.389557 2 |
| 63 0.395841 2 |
| 64 0.402124 2 |
| 65 0.408407 2 |
| 66 0.414690 2 |
| 67 0.420973 2 |
| 68 0.427257 2 |
| 69 0.433540 2 |
| 70 0.439823 2 |
| 71 0.446106 2 |
| 72 0.452389 2 |
| 73 0.458673 2 |
| 74 0.464956 2 |
| 75 0.471239 2 |
| 76 0.477522 2 |
| 77 0.483805 2 |
| 78 0.490088 2 |
| 79 0.496372 2 |
| 80 0.502655 2 |
| 81 0.508938 2 |
| 82 0.515221 2 |
| 83 0.521504 2 |
| 84 0.527788 2 |
| 85 0.534071 2 |
| 86 0.540354 2 |
| 87 0.546637 2 |
| 88 0.552920 2 |
| 89 0.559203 2 |
| 90 0.565487 2 |
| 91 0.571770 2 |
| 92 0.578053 2 |
| 93 0.584336 2 |
| 94 0.590619 2 |
| 95 0.596903 2 |
| 96 0.603186 2 |
| 97 0.609469 2 |
| 98 0.615752 2 |
| 99 0.622035 2 |
| 100 0.628319 2 |
| 101 0.634602 2 |
| 102 0.640885 2 |
| 103 0.647168 2 |
| 104 0.653451 2 |
| 105 0.659734 2 |
| 106 0.666018 2 |
| 107 0.672301 2 |
| 108 0.678584 2 |
| 109 0.684867 2 |
| 110 0.691150 2 |
| 111 0.697434 2 |
| 112 0.703717 2 |
| 113 0.710000 2 |
| 114 0.716283 2 |
| 115 0.722566 2 |
| 116 0.728849 2 |
| 117 0.735133 2 |
| 118 0.741416 2 |
| 119 0.747699 2 |
| 120 0.753982 2 |
| 121 0.760265 2 |
| 122 0.766549 2 |
| 123 0.772832 2 |
| 124 0.779115 2 |
| 125 0.785398 2 |
| 126 0.791681 2 |
| 127 0.797965 2 |
| 128 0.804248 2 |
| 129 0.810531 2 |
| 130 0.816814 2 |
| 131 0.823097 2 |
| 132 0.829380 2 |
| 133 0.835664 2 |
| 134 0.841947 2 |
| 135 0.848230 2 |
| 136 0.854513 2 |
| 137 0.860796 2 |
| 138 0.867080 2 |
| 139 0.873363 2 |
| 140 0.879646 2 |
| 141 0.885929 2 |
| 142 0.892212 2 |
| 143 0.898495 2 |
| 144 0.904779 2 |
+----------------------------------------------------------------------------+
| The b-vectors are chosen automatically |
Unable to satisfy B1 with any of the first 144 shells
Your cell might be very long, or you may have an irregular MP grid
Try increasing the parameter search_shells in the win file (default=12)
Exiting.......
kmesh_get_automatic
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quantum-espresso.org/pipermail/wannier/attachments/20250611/9a947d87/attachment-0001.html>
More information about the Wannier
mailing list