<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div>Dear Kenan,</div>

<div> </div>

<div>If you don't mind me advertising my own code: You can use TBmodels to construct a supercell Hamiltonian. Since it's meant to be used with Wannier90-generated models, it should also be reasonably fast.</div>

<div> </div>

<div>The code for creating the supercell would be</div>

<div> </div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;">import tbmodels</span></div>

<div style="margin-left: 40px;"> </div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;"># load the tight-binding model; other options to do this are available</span></div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;">model = tbmodels.Model.from_wannier_folder(folder='path_to_wannier_directory', prefix='wannier_prefix')</span></div>

<div style="margin-left: 40px;"> </div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;">supercell_model = model.supercell((100, 100, 1))</span></div>

<div style="margin-left: 40px;"> </div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;"># for example, you can now evaluate the Hamiltonian at a given k</span></div>

<div style="margin-left: 40px;"><span style="font-family:Courier New,Courier,monospace;">hamiltonian = supercell_model.hamilton(k=(0.1, 0.2, 0.))</span></div>

<div> </div>

<div>
<div>The code is installable<a href="https://pypi.org/project/tbmodels/"> from PyPI</a> (<span style="font-family:Courier New,Courier,monospace;">pip install tbmodels</span>), the documentation can be found at <a href="https://tbmodels.greschd.ch">https://tbmodels.greschd.ch</a> and the source code at <a href="https://github.com/Z2PackDev/TBmodels">https://github.com/Z2PackDev/TBmodels</a>.</div>

<div> </div>

<div>Feel free to reach out directly if you have any questions.</div>

<div> </div>

<div>Best regards,</div>

<div>Dominik</div>

<div> </div>

<div>---</div>

<div>Dominik Gresch</div>

<div> </div>

<div>Simulation Engineer</div>

<div>Microsoft Quantum</div>

<div> 
<div name="quote" style="margin:10px 5px 5px 10px; padding: 10px 0 10px 10px; border-left:2px solid #C3D9E5; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">
<div name="quoted-content">Message: 2<br/>
Date: Thu, 28 Jan 2021 10:16:45 +0100<br/>
From: Stepan Tsirkin <tsirkinss@gmail.com><br/>
To: Kenan Song <kenan.song@kaust.edu.sa>,<br/>
wannier@lists.quantum-espresso.org<br/>
Subject: Re: [Wannier] Expanding wannier Hamiltonian of the unit cell<br/>
to that of the supercell<br/>
Message-ID: <5cf0f369-5fd4-4c22-6936-fc3594c013dc@gmail.com><br/>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br/>
<br/>
Dear Kenan,<br/>
<br/>
<br/>
the Wannier Hamiltonian that you get is a num_wann x num_wann matrix<br/>
H_mn(R) which depends on an R vector, which means that the hopping<br/>
connects orbital nin unit cell 0 to the orbital m in unit cell R (or<br/>
exchange indices n,m, not sure).? In a supercell the same matrix would<br/>
correspond to connceting primitive cells R' and R'+R (where R' runs over<br/>
all 10000 primitive cells in oyur supercell)<br/>
<br/>
Such things are implemented, for instance , in pythTB<br/>
<a href="http://www.physics.rutgers.edu/pythtb/" target="_blank">http://www.physics.rutgers.edu/pythtb/</a> package, (which however may be<br/>
very slow, but you may look to have an idea)<br/>
<br/>
Also Wanniertools <a href="http://www.wanniertools.com/" target="_blank">http://www.wanniertools.com/</a> may be useful.<br/>
<br/>
Regards,<br/>
<br/>
Stepan Tsirkin,<br/>
University of Zurich.<br/>
<br/>
P.S. (I think it is a rule of this mailing list to specify your<br/>
affiliation )<br/>
<br/>
On 28.01.21 08:07, Kenan Song wrote:<br/>
> Dear All,<br/>
><br/>
> I extracted the wannier Hamiltonian for a 2D system after the<br/>
> wannierization is done. Now, I want to expand this wannier Hamiltonian<br/>
> to that for the supercell (e.g. 100 by 100) of the original 2D system.<br/>
><br/>
> Can I just copy the wannier Hamiltonian of the original 2D system and<br/>
> paste it onto the diagonal part in the supercell Hamiltonian matrix<br/>
> 10000 times?<br/>
><br/>
> If so, would anyone please tell me how to deal with the off-diagonal<br/>
> part in the supercell Hamiltonian matrix?<br/>
><br/>
> Would anyone please tell me how to account the hopping between<br/>
> different atoms in different neighbour unit cells?<br/>
><br/>
> Would anyone please recommend some solutions or reference papers,<br/>
> discussing the expansion of the wannier Hamiltonian?<br/>
><br/>
> Thank you all very much in advance.<br/>
><br/>
> Kind regards,<br/>
><br/>
> Kenan Song<br/>
><br/>
> ------------------------------------------------------------------------<br/>
> This message and its contents, including attachments are intended<br/>
> solely for the original recipient. If you are not the intended<br/>
> recipient or have received this message in error, please notify me<br/>
> immediately and delete this message from your computer system. Any<br/>
> unauthorized use or distribution is prohibited. Please consider the<br/>
> environment before printing this email.<br/>
><br/>
> _______________________________________________<br/>
> Wannier mailing list<br/>
> Wannier@lists.quantum-espresso.org<br/>
> <a href="https://lists.quantum-espresso.org/mailman/listinfo/wannier" target="_blank">https://lists.quantum-espresso.org/mailman/listinfo/wannier</a><br/>
-------------- next part --------------<br/>
An HTML attachment was scrubbed...<br/>
URL: <<a href="http://lists.quantum-espresso.org/pipermail/wannier/attachments/20210128/df61b235/attachment-0001.html" target="_blank">http://lists.quantum-espresso.org/pipermail/wannier/attachments/20210128/df61b235/attachment-0001.html</a>></div>
</div>
</div>
</div></div></body></html>