-
Notifications
You must be signed in to change notification settings - Fork 2
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
Inconsistent API between orbitals and sublats #22
Comments
I am not completelly sure if the sublats option should always expect a symbol. I think it would be very desirable to make ELSA friendly to Wannier90. The tight-binding Hamiltonian obtained from Wannier90 is outputed as a table, with the values in each line givining us: nx ny nz i j real imag with nx, ny and nz being integers that describe the direction of the hopping; i an j being natural numbers that index orbitals. This would represent a hopping with value real + i imag from orbital i at the origin unit cell to an orbital j located in the unit cell at nx * a1 + ny * a2 + nz * a3. For example, in this notation the nearest-neighbour pz hamiltonian for graphene would be given by: 0 0 0 1 2 -2.7 0.0 where orbital 1 would be an A site and orbital 2 would be a B site. Wannier90 uses integers to label orbitals (actually sublattice+orbital is labelled as a single flavour). Would it be easy to use the current API to deal with this kind of input? |
Also it would be interesting to give not only names to the orbitals, but to also give information about its angular momentum character (l, m) numbers. This information is necessary in order to apply rotations to the Hamiltonian or to model ARPES. Some presets could be defined, such that :pz = (1, 0) for example. |
A Wannier90 interface is of course extremely desirable, so it should definitely be kept in mind when refining our API
So two orbitals (say :px and :py) would be labeled as different i's, even if they belong to the same atom? If that is the case and if it is not possible to extract the atom information from Wannier90, I guess the best approach would be to create one Elsa site per Wannier90 orbital, even if some of them share the same point in space. To define hoppings using the current API becomes awkward. One possibility would be to create a different sublat per orbital in the unit cell, and define one hopping term per each line in the Wannier90 output. That is not elegant. I think the best approach in this case would be to define Then, we would implement If you agree with this solution, I can go ahead and do both things: force sublat to accept only Symbols, and implement EDIT: one would need to have a mechanism to ensure that the i,j from Wannier90 correspond to the same i,j from ELSA (and possibly a way of reordering sites to make them match). In principle the ordering shouldn't matter... until you begin distorting your system in a way that depends on site positions, of course. |
Yeah, we could definitely enable such a functionality further on. But to make it really flexible, I think we would need to make a new type for orbital names (maybe |
Closed in #21 (force sublats to take only lattice names) If needed, reopen the issue |
As discussed in #21, that PR creates an inconsistency. It allows us to do
This creates a slight problem: what is
sublat = 1
? Sublattice names are assigned when defininglat
, but are referenced only later, when callinghamiltonian
. The old API had a milder form of this "nonlocality" issue, asonsite
referred to sublattices by index.... With the new API the issue is more severe, as one needs also to remember that sublat 1 inlat
is called :A (if one uses the named form oforbital
as above).Also, the following currently errors, because sublat expects an integer or a tuple of integers (sublat indices)
A possible solution:
If no names are given to sublattices, they are currently given unique names in lexicographic order as
:A
,:B
,:C
... This makes it easy to remember which is which. We would then need to force thesublats
to take only names, asonsite(..., sublats = (:A, :D))
, thus imposing consistency with theorbital
keyword.If sublattices are given other (distinct) names, we can assume that the user remembers which is which!
The text was updated successfully, but these errors were encountered: