-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wannier90 interface #4
Comments
The
Hehe, same as me... |
With PR pablosanjose/Elsa.jl#25 one could implement a Wannier90 interface as follows: 1- Obtain orbital This would be a way to do it one by one. We could also be more efficient using broadcasting if we first collect all entries with the same |
Not so fast, I think we're not done here. The above approach is ok, and is rather transparent, but it has at least one drawback: it does not participate in the An alternative approach would be the following
where The good thing is that then, we can do parametric hamiltonians like
Of course this approach would be an alternative to the |
As an alternative, wouldn't it be possible to create a am empty TightBindingModel and then incrementally add new terms, using the hopping algebra. For example:
Or is this silly? |
In its current implementation that's probably going to be problematic, because The nice thing is that using that approach we wouldn't need to build a whole new builder type, just a method like |
I see. I thought that the addition of model terms, just just sintatic sugar for
So even if a HopSelector as defined So what is the approach for this? Define a
[Or maybe use a There is still the issue of whether to encode or not sublattice and orbital information. In a previous discussion, I think you mentioned is was better to associate one Quantica index with one orbital per site to each Wannier orbital. Do you still think this is the best approach? Surelly, it is the simplest. Perhaps in addition to that behaviour, we could have Quantica pack the hoppings into orbital subspaces, provided a OrbitalStructure is passed as an argument. Having this What do you think? |
It does, but it is a missed optimization opportunity, currently. It would be very easy to specialize a function called
That is correct
The internal So, that new struct WannierHoppings{Ti, Tv, D} <: TightbindingTerm
scrs::Vector{Ti} # source indices
dsts::Vector{Ti} # destinty indices
dn::SVector{D, Ti}
vals::Vector{Tv}
end The catch is that the indices chosen by Wannier90 should perfectly match the ones in our lattice. So the lattice itself should be built using the same file input. The nice thing is that, as Rui was explaining to me the other day, Wannier90 also gives you the expectation value of position between any two Wannier orbitals with a hopping. We could then define the following generic term, that includes onsites and hoppings, and imports from the file also the position expectation values for each pair struct WannierTerm{T,E,L} <: TightbindingTerm
dn::SVector{L, Ti}
scrs::Vector{Int} # source indices
dsts::Vector{Int} # destinty indices
vals::Vector{Tv}
positions::Vector{SVector{T,E}}
end
struct WannierModel{T,E,L}
terms::Vector{WannierTerm{T,E,L}}
bravais::Bravais{T,E,L}
end where We could then consider if it would be worthwhile to allow combing struct WannierModel{T,E,L,N,TB<:Tuple{Vararg{TightbindingModelTerm,N}}}
wterms::Vector{WannierTerm{T,E,L}}
tbterms::TB
bravais::Bravais{T,E,L}
end and then define term addition to push into the relevant field, depending of the type of the added term. The WannierModel type retains the ability to define a lattice at the same time as the Hamiltonian, and then, when we're done adding i,j,v terms from the |
Uhm, a question that I just had: is the Wannier90 output always giving you a scalar hopping amplitude per orbital pair? How does it deal with degeneracies, e.g. spin degeneracies? Do we ever get EDIT: I expect we don't, so that if there are "degeneracies" (in the sense of several Wannier orbitals with the same spatial position) we should either (1) accept having several single-orbital sites at the same point or (2) detect there are degeneracies (by looking at positions) and then bundle together these wannier orbitals as belonging to the same Quantica site. That would require some preprocessing of the file, but it might be relatively easy to do robustly (though it would not be type-stable - |
I am curious about how this package encodes tight-binding Hamiltonians and I came across this thread. A recent development for Wannier90 in Julia is https://github.com/qiaojunfeng/Wannier.jl. Hope this helps! |
That's a great pointer @lxvm, thanks! We will certainly look into doing an extension into Wannier.jl instead of a custom solution when we activate work on this issue. |
Continuing the discussion in pablosanjose/Elsa.jl#22 (comment)
Correct, in the list of hoppings that is outputed by Wannier90, the orbitals :px and :py would be labelled as 1 and 2, for example, independently of whether they are centered at the same or different sites.
One of the outputs of Wannier90 is the position of the centre of the orbitals, therefore we can see if two orbitals share the same centre or not. So we could simply apply the rule 1 orbital = 1 sublattice (simpler but less elegant) or extract the information regarding the location of the different orbitals.
I think this notation would be really clean! Another thing that could be done is to simply read the wannier90 list of hoppings, from them build the vector of HamiltonianHarmonics and directly build the Hamiltonian with that, not using HoppingTerms or OnsiteTerms. Can it be done in that way? I am still not sure how the Hamiltonian is currently stored.
But in all honesty, I am not a Wannier90 user. I just had a brief experience with using hamiltonians that are outputed by Wannier90. All I know about Wannier90 is thanks to @joselado
The text was updated successfully, but these errors were encountered: