Skip to content
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

How to understand the wannier spread and the overlap with the co-optimization of spin up and down. #44

Open
mailhexu opened this issue Mar 14, 2024 · 0 comments

Comments

@mailhexu
Copy link

Hello Junfeng,

I have some questions about the Wannier spreads and the overlap of the spin up/down Wannier functions when doing the co-optimization.

The files related to this quesion can be found at:
https://github.com/mailhexu/Wannier.jl-TB2J-tests/tree/main/data/CrI3/cowf

Here is the code used for this calculation (based on the example of the co-optimization in Wannier.jl).

# ## Preparation
# Load the packages
using WannierIO
using Wannier
#using WannierPlots
#

win = read_win("up/cri3_up.win")
model_up = read_w90("up/cri3_up")
model_dn = read_w90("dn/cri3_dn")

#The spin-up and down overlap matrices is written in the same format as `amn`
#
Mud = read_amn("cri3_updn.mud");

# then assemble into a [`MagModel`](@ref)
model = Wannier.MagModel(model_up, model_dn, Mud)

#=
Now let's disentangle with spin overlap constraint.
Here `λs` is the Lagrange multiplier for the constraint.
=#
λs = 100.0
U_up, U_dn = disentangle(model, λs;max_iter=4000);
#=
The resulting spin-up and spin-down WFs have very similar centers and spreads,
however, their centers drift from the original positions which were centered
on atoms.
=#
omega(model, U_up, U_dn, λs)

# position operator
pos_up = Wannier.TBPosition(model_up, gauges=U_up)
pos_dn = Wannier.TBPosition(model_dn, gauges=U_dn)

# Hamiltonian
ham_up = Wannier.TBHamiltonian(model_up, U_up)
ham_dn = Wannier.TBHamiltonian(model_dn, U_dn)

# write to tb files
Wannier.write_w90_tb("up/cri3_up", ham_up, pos_up)
Wannier.write_w90_tb("dn/cri3_dn", ham_dn, pos_dn)

In the end, the Wannier spread and the overlap are printed.

Info: Final spread
│   Ω =
│    spin up:
│      WF     center [rx, ry, rz]/Å              spread/Ų
│       1    -1.09110     3.81182     0.05284     4.25828
│       2     0.00441     3.93318     0.00595     0.79408
│       3    -0.00065     3.93281     0.00464     0.83339
│       4    -0.00090     3.94111     0.00236     0.83457
│       5    -0.00344     3.90873    -0.01414     0.82425
│       6     0.03562     3.96562    -0.00510     0.92463
│       7     2.32114     2.07904     0.04848     4.19944
│       8     3.41002     1.96947     0.00434     0.78757
│       9     3.41647     1.97382     0.02297     0.87035
│      10     3.40835     1.96167     0.00267     0.83620
│      11     3.41814     2.00290    -0.02303     0.85876
│      12     3.42538     1.92828    -0.01609     0.87111
│      13    -1.72389     2.08358     1.09567     1.67279
│      14    -1.27087     1.58952     1.87365     1.78209
│      15    -1.25116     2.53752     1.87177     1.63870
│      16    -0.71296     2.09791     1.26317     1.73837
│      17    -2.38860     3.30855    -1.10441     1.73870
│      18    -1.68617     3.74230    -1.72816     1.75359
│      19    -2.61847     3.72029    -2.05607     1.90246
│      20    -2.28363     4.32292    -1.34938     1.67462
│      21     1.01228     2.58567    -1.10521     1.73659
│      22     1.71512     2.18536    -1.73181     1.74483
│      23     0.78121     2.17505    -2.05487     1.89608
│      24     1.14224     1.57390    -1.35216     1.67242
│      25     1.68200     3.82153     1.10027     1.67214
│      26     2.15911     3.36635     1.87119     1.63893
│      27     2.69501     3.80357     1.25789     1.73839
│      28     2.14533     4.31256     1.87479     1.78399
│      29     2.79145    -0.00624     1.06661     1.78822
│      30     2.54902    -0.48440     1.87661     1.79661
│      31     1.88779    -0.00118     1.36884     1.60517
│      32     2.55137     0.49351     1.86388     1.79786
│      33     4.20702     0.51503    -1.20308     1.69451
│      34     4.14580    -0.00025    -2.02316     1.59812
│      35     4.94257    -0.00382    -1.58592     1.62839
│      36     4.20054    -0.51259    -1.20117     1.69194
│    Sum spread: Ω = ΩI + Ω̃, Ω̃ = ΩOD + ΩD
│       ΩI  =    50.10464
│       Ω̃   =     8.17350
│       ΩOD =     8.17143
│       ΩD  =     0.00206
│       Ω   =    58.27814
│    ================================================================================
│    spin down:
│      WF     center [rx, ry, rz]/Å              spread/Ų
│       1    -1.15701     3.80900     0.05258     4.92202
│       2     0.00900     3.92902     0.00785     1.27556
│       3     0.00209     3.93129     0.00505     1.21424
│       4    -0.00223     3.94682     0.00310     1.21016
│       5    -0.00562     3.89613    -0.02119     1.32761
│       6     0.06385     3.97784    -0.00743     1.41392
│       7     2.25436     2.08478     0.05038     4.85707
│       8     3.41166     1.97341     0.00538     1.26652
│       9     3.42332     1.97672     0.02983     1.24947
│      10     3.40782     1.95576     0.00364     1.21305
│      11     3.42557     2.01944    -0.03389     1.36271
│      12     3.44305     1.91106    -0.02185     1.36247
│      13    -1.69993     2.08179     1.11748     1.67767
│      14    -1.27585     1.57785     1.88712     1.76848
│      15    -1.24674     2.53215     1.88029     1.62599
│      16    -0.71065     2.08768     1.27857     1.72218
│      17    -2.38066     3.32754    -1.12516     1.75539
│      18    -1.69085     3.75085    -1.74315     1.74061
│      19    -2.63209     3.72381    -2.06862     1.91517
│      20    -2.28624     4.32938    -1.35823     1.66466
│      21     1.02040     2.56660    -1.12602     1.75229
│      22     1.71043     2.17711    -1.74640     1.73153
│      23     0.76765     2.17177    -2.06686     1.91091
│      24     1.13985     1.56715    -1.36108     1.66445
│      25     1.70596     3.82357     1.12229     1.67654
│      26     2.16367     3.37158     1.87977     1.62539
│      27     2.69712     3.81398     1.27346     1.72194
│      28     2.14027     4.32461     1.88868     1.76870
│      29     2.78145    -0.00580     1.08447     1.79220
│      30     2.53810    -0.49151     1.89126     1.76854
│      31     1.88132    -0.00121     1.37705     1.58652
│      32     2.54052     0.50053     1.87858     1.76925
│      33     4.22088     0.49453    -1.22567     1.68265
│      34     4.15216    -0.00028    -2.03535     1.57452
│      35     4.95212    -0.00402    -1.59790     1.59487
│      36     4.21435    -0.49174    -1.22379     1.68012
│    Sum spread: Ω = ΩI + Ω̃, Ω̃ = ΩOD + ΩD
│       ΩI  =    54.72991
│       Ω̃   =     9.11547
│       ΩOD =     9.11280
│       ΩD  =     0.00267
│       Ω   =    63.84538
│    ================================================================================
│    overlap between up and down WFs:
│      WF     <↑|↓>/Ų
│       1     0.99460
│       2     0.98349
│       3     0.99407
│       4     0.99459
│       5     0.98278
│       6     0.98426
│       7     0.99449
│       8     0.98349
│       9     0.99494
│      10     0.99458
│      11     0.98292
│      12     0.98326
│      13     0.99908
│      14     0.99952
│      15     0.99961
│      16     0.99944
│      17     0.99908
│      18     0.99944
│      19     0.99947
│      20     0.99960
│      21     0.99908
│      22     0.99945
│      23     0.99946
│      24     0.99959
│      25     0.99908
│      26     0.99961
│      27     0.99943
│      28     0.99951
│      29     0.99934
│      30     0.99942
│      31     0.99960
│      32     0.99942
│      33     0.99909
│      34     0.99960
│      35     0.99957
│      36     0.99909
│    ================================================================================
│    Sum spread: Ωt = Ω↑ + Ω↓ + λ * Ω↑↓
│       Ω↑  =    58.27814
│       Ω↓  =    63.84538
│       Ω↑↓ =     0.14695
│       Ωt  =   136.81836

The spreads and the overlap does not seem to be very consistent from first sight. For example, the spread of the 1st spin up/down Wannier functions are 4.258 and 4.922 , and the overlap is 0.9946. The difference between the Wannier spread doesn't look so small, and the overlap looks quite close to 1. Could you help me to understand this?

Another question, in the overlap section

     WF     <↑|↓>/Ų

Is the unit Ų or is it normalized to 1?

Thanks a lot!

Best regards,
HeXu

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant