<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
Dear Tom,
<div><br>
</div>
<div>When it comes to plotting the WFs, Wannier90 reads the periodic parts of the Bloch states, u_{nk}(r), on whatever grid (lattice vectors and number of grid points) that was used by underlying electronic structure code (see User Guide Sec 8.16 for the format
 of these “unk" files). </div>
<div><br>
</div>
<div>It then uses this information together with the optimal U-matrix that was determined by the earlier disentanglement/wannierisation procedure, to calculate the WFs on the grid via the expression for the Wannier transformation (User Guide Eq (1.1)). Because
 the periodicity of the WFs is not the same as that of the u_{nk}(r), the grid on which the WFs are computed is by default larger in each lattice vector dimension by a factor of two, though this can be increased by setting wannier_plot_supercell in the *.win
 file.</div>
<div><br>
</div>
<div>The code that deals with plotting is all in /src/plot.F90 in the main W90 distribution, specifically in the subroutine plot_wannier. Modifying the code to change the origin of the WF plot data would be relatively straightforward. To use an arbitrary number
 of grid-points and arbitrary lattice vectors would require some form of interpolation of the u_nk(r) data, e.g., directly in the underlying electronic structure code before the data are written or as a post-processing after they are written, and this would
 be somewhat less straightforward. </div>
<div><br>
</div>
<div>Note that an undocumented feature of the PWscf interface (pw2wannier90) is the logical input parameter reduce_unk. When set to true, it results in the u_{nk}(r) being written to disk on a grid that is only half as dense in each lattice vector direction
 than the wavefunction grid determined by the plane-wave energy cut-off. This is often good enough for smooth visualisation of WFs, but saves a lot of disk space for large calculations.</div>
<div><br>
</div>
<div>Hope this helps — and please sign off with your affiliation when posting to this list.</div>
<div><br>
</div>
<div>Arash</div>
<div><br>
<div apple-content-edited="true">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div>—</div>
<div>Dr Arash Mostofi — <a href="http://www.mostofigroup.org">www.mostofigroup.org</a></div>
<div>Imperial College London</div>
<div>Director, Thomas Young Centre @Imperial</div>
<div>Assistant Director, CDT in Theory & Simulation of Materials</div>
<div>Warden, Wilkinson & Weeks Hall</div>
<div><br>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br>
<div>
<div>On 21 Dec 2014, at 20:44, Tom Berlijn <<a href="mailto:tberlijn@gmail.com">tberlijn@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<blockquote type="cite">Dear developers of Wannier90,<br>
<br>
I would like to plot Wannier functions on an arbitrary grid defined in terms of number of grid points, origin, and 3 vectors.<br>
If I understood correctly this is not possible in the current version of wannier90.<br>
Would anyone be able to give advice on how the source code(s) would need to be modified for this purpose?<br>
<br>
Thanks, Tom<br>
<br>
<br>
_______________________________________________<br>
Wannier mailing list<br>
<a href="mailto:Wannier@quantum-espresso.org">Wannier@quantum-espresso.org</a><br>
http://mailman.qe-forge.org/cgi-bin/mailman/listinfo/wannier<br>
</blockquote>
</div>
<br>
</div>
</body>
</html>