Page 1 of 1

Initial Projections using LOCPROJ/LSCDM

Posted: Fri Jan 10, 2025 8:51 pm
by JSink3

Hello VASP community,

I have some familiarity with using Wannier90 with QE and have noticed some differences in the initial projection behavior. I would like help in understanding exactly what is going on in the calculation, and how to remedy if possible.

I have experienced this behavior with every calculation I have done with VASP+W90, so I will use a very simple test case for a simple molecule TiH with 30A of vacuum with lnoncollinear=true and lsorbit=true.

When using either LSCDM=True or LOCPROJ:

LOCPROJ="1 : s : Pr
1 : d : Pr
2 : s : Pr"

and projections in WANNIER90_WIN (s and d on Ti and s on H)

begin projections
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:s(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:s(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxy(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxy(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dyz(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dyz(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxz(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxz(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dx2-y2(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dx2-y2(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dz2(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dz2(d)
f=0.1666686686564069,0.1666665552512981,0.2291613999080215:s(u)
f=0.1666686686564069,0.1666665552512981,0.2291613999080215:s(d)
end projections


I see an initial projection in wannier90 that looks something like...

------------------------------- WANNIERISE ---------------------------------
+--------------------------------------------------------------------+<-- CONV
| Iter Delta Spread RMS Gradient Spread (Ang2) Time |<-- CONV
+--------------------------------------------------------------------+<-- CONV


Initial State
WF centre and spread 1 ( 4.983148, 4.980151, 4.241228 ) 3.83992077
WF centre and spread 2 ( 5.012195, 5.019500, 4.221202 ) 3.99238574
WF centre and spread 3 ( 4.855366, 4.903987, 5.078026 ) 2.28038627
WF centre and spread 4 ( 5.131405, 5.122892, 4.986637 ) 5.30186775
WF centre and spread 5 ( 5.000908, 4.999614, 5.192327 ) 1.48127326
WF centre and spread 6 ( 4.998383, 4.991980, 5.006820 ) 2.27710671
WF centre and spread 7 ( 5.004888, 5.005417, 5.081061 ) 1.79217312
WF centre and spread 8 ( 4.996016, 4.994162, 5.122042 ) 2.07759601
WF centre and spread 9 ( 5.000238, 5.001152, 5.026222 ) 1.49747532
WF centre and spread 10 ( 4.999151, 5.005141, 5.176437 ) 2.28518657
WF centre and spread 11 ( 4.815788, 4.864723, 5.077935 ) 2.26158709
WF centre and spread 12 ( 5.210759, 5.116014, 4.988656 ) 5.28191295
WF centre and spread 13 ( 5.003481, 5.003955, 6.473858 ) 2.72017386
WF centre and spread 14 ( 4.996692, 4.995249, 6.525627 ) 2.71212676
Sum of centres and spreads ( 70.008418, 70.003936, 72.198076 ) 39.80117220

What I don't understand/need help understanding is why the initial spreads for up/down are so difference and why the centers are so far off from the projections. For the SCDM, I can understand why this may be true since it uses an SVD of the density matrix, but shouldn't LOCPROJ be projecting out atomic-like orbitals?(Note that I have verified this also happens with atomic Ti, so the issue is not related to the Ti hybridizing with the H)

My fundamental question is:
Is there a way to get atomic projections out of VASP as an initial guess? i.e., Where the centers for iteration=0 are atomic centers and the spreads of up/down are equal?

INCAR

System = TiH
ISTART = 1 ;
ICHARG = 11
ENCUT = 500

ISMEAR = 0
SIGMA = 0.01
ISPIN = 2
NSW = 0
IBRION = -1

LSORBIT=.True.
LNONCOLLINEAR = .True.

LREAL = Auto
NELM=500;
MELMIN=6;

EDIFF = 1E-5
EDIFFG = 1E-4

#LSCDM=.True.

LOCPROJ="1 : s : Pr
1 : d : Pr
2 : s : Pr"

LWRITE_MMN_AMN=.True.
LWRITE_UNK=.False.

wannier_setup=.True.
LWANNIER90 = .True.

NUM_WANN=14

WANNIER90_WIN="

#Ti 0.1666646646769216 0.1666667780820305 0.1708386000919771
#O 0.1666686686564069 0.1666665552512981 0.2291613999080215

begin projections
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:s(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:s(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxy(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxy(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dyz(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dyz(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxz(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dxz(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dx2-y2(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dx2-y2(d)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dz2(u)
f=0.1666646646769216,0.1666667780820305,0.1708386000919771:dz2(d)
f=0.1666686686564069,0.1666665552512981,0.2291613999080215:s(u)
f=0.1666686686564069,0.1666665552512981,0.2291613999080215:s(d)
end projections





num_print_cycles = 50
write_xyz =.true.
write_tb =.true.
translate_home_cell=.true.
write_hr = .true.




bands_plot = true
bands_num_points = 20
begin kpoint_path
G 0.0000 0.0000 0.0000 X 0.0000 0.5000 0.0000
X 0.0000 0.5000 0.0000 M 0.5000 0.5000 0.0000
M 0.5000 0.5000 0.0000 G 0.0000 0.0000 0.0000
G 0.0000 0.0000 0.0000 R 0.5000 0.5000 0.5000
R 0.5000 0.5000 0.5000 X 0.0000 0.5000 0.0000
end kpoint_path

"

wannier90.wout

Running in serial (with serial executable)

Code: Select all

                                ------
                                SYSTEM
                                ------
 
                          Lattice Vectors (Ang)
                a_1    30.000000   0.000000   0.000000
                a_2     0.000000  30.000000   0.000000
                a_3     0.000000   0.000000  30.000000
 
               Unit Cell Volume:   27000.00000  (Ang^3)
 
                    Reciprocal-Space Vectors (Ang^-1)
                b_1     0.209440   0.000000   0.000000
                b_2     0.000000   0.209440   0.000000
                b_3     0.000000   0.000000   0.209440

----------------------------------------------------------------------------
| Site Fractional Coordinate Cartesian Coordinate (Ang) |
+----------------------------------------------------------------------------+
| Ti 1 0.16666 0.16667 0.17084 | 4.99994 5.00000 5.12516 |
| H 1 0.16667 0.16667 0.22916 | 5.00006 5.00000 6.87484 |
----------------------------------------------------------------------------


K-POINT GRID



Code: Select all

         Grid size =  1 x  1 x  1      Total points =    1

---------------------------------- MAIN ------------------------------------
| Number of Wannier Functions : 14 |
| Number of Objective Wannier Functions : 14 |
| Number of input Bloch states : 14 |
| Output verbosity (1=low, 5=high) : 1 |
| Timing Level (1=low, 5=high) : 1 |
| Optimisation (0=memory, 3=speed) : 3 |
| Length Unit : Ang |
| Post-processing setup (write *.nnkp) : F |
| Using Gamma-only branch of algorithms : F |
----------------------------------------------------------------------------
------------------------------- WANNIERISE ---------------------------------
| Total number of iterations : 100 |
| Number of CG steps before reset : 5 |
| Trial step length for line search : 2.000 |
| Convergence tolerence : 0.100E-09 |
| Convergence window : -1 |
| Iterations between writing output : 50 |
| Iterations between backing up to disk : 100 |
| Write r2_nm to file : F |
| Write xyz WF centres to file : T |
| Write on-site energies <0n|H|0n> to file : F |
| Use guiding centre to control phases : F |
| Use phases for initial projections : F |
----------------------------------------------------------------------------
-------------------------------- PLOTTING ----------------------------------
| Plotting interpolated bandstructure : T |
| Number of K-path sections : 5 |
| Divisions along first K-path section : 20 |
| Output format : gnuplot |
| Output mode : s-k |
----------------------------------------------------------------------------
| K-space path sections: |
| From: G 0.000 0.000 0.000 To: X 0.000 0.500 0.000 |
| From: X 0.000 0.500 0.000 To: M 0.500 0.500 0.000 |
| From: M 0.500 0.500 0.000 To: G 0.000 0.000 0.000 |
| From: G 0.000 0.000 0.000 To: R 0.500 0.500 0.500 |
| From: R 0.500 0.500 0.500 To: X 0.000 0.500 0.000 |
----------------------------------------------------------------------------
| Plotting Hamiltonian in WF basis : T |
----------------------------------------------------------------------------
Time to read parameters 0.003 (sec)

---------------------------------- K-MESH ----------------------------------
+----------------------------------------------------------------------------+
| Distance to Nearest-Neighbour Shells |
| ------------------------------------ |
| Shell Distance (Ang^-1) Multiplicity |
| ----- ----------------- ------------ |
| 1 0.209440 6 |
| 2 0.296192 12 |
| 3 0.362760 8 |
| 4 0.418879 6 |
| 5 0.468321 24 |
| 6 0.513020 24 |
| 7 0.592384 12 |
| 8 0.628319 30 |
| 9 0.662306 24 |
| 10 0.694632 24 |
| 11 0.725520 8 |
| 12 0.755145 24 |
| 13 0.783651 48 |
| 14 0.837758 6 |
| 15 0.863541 48 |
| 16 0.888577 36 |
| 17 0.912926 24 |
| 18 0.936642 24 |
| 19 0.959772 48 |
| 20 0.982358 24 |
| 21 1.026040 24 |
| 22 1.047198 30 |
| 23 1.067936 72 |
| 24 1.088280 32 |
| 25 1.127866 72 |
| 26 1.147147 48 |
| 27 1.184769 12 |
| 28 1.203138 48 |
| 29 1.221232 48 |
| 30 1.239061 48 |
| 31 1.256637 24 |
| 32 1.291072 48 |
| 33 1.341067 48 |
| 34 1.357323 48 |
| 35 1.373387 24 |
| 36 1.404963 48 |
+----------------------------------------------------------------------------+
| The b-vectors are chosen automatically |
| The following shells are used: 1 |
+----------------------------------------------------------------------------+
| Shell # Nearest-Neighbours |
| ----- -------------------- |
| 1 6 |
+----------------------------------------------------------------------------+
| Completeness relation is fully satisfied [Eq. (B1), PRB 56, 12847 (1997)] |
+----------------------------------------------------------------------------+
| b_k Vectors (Ang^-1) and Weights (Ang2) |
| ---------------------------------------- |
| No. b_k(x) b_k(y) b_k(z) w_b |
| --- -------------------------------- -------- |
| 1 0.209440 0.000000 0.000000 11.398633 |
| 2 0.000000 0.209440 0.000000 11.398633 |
| 3 0.000000 0.000000 0.209440 11.398633 |
| 4 0.000000 0.000000 -0.209440 11.398633 |
| 5 0.000000 -0.209440 0.000000 11.398633 |
| 6 -0.209440 0.000000 0.000000 11.398633 |
+----------------------------------------------------------------------------+
| b_k Directions (Ang^-1) |
| ----------------------- |
| No. x y z |
| --- -------------------------------- |
| 1 0.209440 0.000000 0.000000 |
| 2 0.000000 0.209440 0.000000 |
| 3 0.000000 0.000000 0.209440 |
+----------------------------------------------------------------------------+


Time to get kmesh 0.020 (sec)
============================================================================
| MEMORY ESTIMATE |
| Maximum RAM allocated during each phase of the calculation |
============================================================================
| Wannierise: 0.07 Mb |
| plot_wannier: 0.07 Mb |
----------------------------------------------------------------------------


Starting a new Wannier90 calculation ...

Reading overlaps from wannier90.mmn : File generated by VASP: TiH

Reading projections from wannier90.amn : File generated by VASP: TiH

Time to read overlaps 0.001 (sec)

Writing checkpoint file wannier90.chk... done

------------------------------- WANNIERISE ---------------------------------
+--------------------------------------------------------------------+<-- CONV
| Iter Delta Spread RMS Gradient Spread (Ang2) Time |<-- CONV
+--------------------------------------------------------------------+<-- CONV


Initial State
WF centre and spread 1 ( 4.983784, 4.980740, 4.514621 ) 3.96008394
WF centre and spread 2 ( 5.012100, 5.019096, 4.469246 ) 4.12167005
WF centre and spread 3 ( 4.853979, 4.907193, 5.074613 ) 2.27281992
WF centre and spread 4 ( 5.130746, 5.123586, 4.973556 ) 5.27565881
WF centre and spread 5 ( 5.001202, 4.999680, 5.208048 ) 1.52726518
WF centre and spread 6 ( 4.998473, 4.991280, 5.007611 ) 2.25622882
WF centre and spread 7 ( 5.005564, 5.006195, 4.950201 ) 1.97466776
WF centre and spread 8 ( 4.995321, 4.993138, 4.990037 ) 2.32664173
WF centre and spread 9 ( 5.000182, 5.001199, 5.042129 ) 1.46969763
WF centre and spread 10 ( 4.998606, 5.005316, 5.177067 ) 2.34375771
WF centre and spread 11 ( 4.815319, 4.862737, 5.074453 ) 2.25587279
WF centre and spread 12 ( 5.214464, 5.114515, 4.975599 ) 5.25458528
WF centre and spread 13 ( 4.998487, 4.998191, 6.336888 ) 3.11617241
WF centre and spread 14 ( 5.000509, 5.001190, 6.414228 ) 2.97487711
Sum of centres and spreads ( 70.008737, 70.004057, 72.208299 ) 41.12999914

Code: Select all

  0     0.411E+02     0.0000000000       41.1299991422       0.00  <-- CONV
    O_D=      0.0000000 O_OD=     11.6828497 O_TOT=     41.1299991 <-- SPRD

------------------------------------------------------------------------------

Edit: added quote formatting


Re: Initial Projections using LOCPROJ/LSCDM

Posted: Mon Jan 13, 2025 9:46 am
by christopher_sheldon1

Hi,

Thank you for your question. I do not have much familiarity with Wannier90, so I'll move this post to From users for users, where someone in the community may be able to help you.

Best wishes,

Chris


Re: Initial Projections using LOCPROJ/LSCDM

Posted: Mon Jan 13, 2025 6:55 pm
by JSink3

For users who stumble upon this query, I am interested if you have a way to manage the initial projections when projecting onto an atomic basis.

I also ask for a definitive answer from the VASP developers of their interface to wannier90 what the expected behavior should be for the initial projections. This does not require a detailed look at my particular system, as the question is generic and applies to any/all systems. I am expecting the initial projections to return the basis as defined in LOCPROJ. If this is not the case, some clarity/documentation on the correct behavior would be appreciated.

Thank you kindly!


Re: Initial Projections using LOCPROJ/LSCDM

Posted: Mon Jan 13, 2025 7:49 pm
by ahampel

Hi JSink3,

I am probably not the right person to shine detailed light on this but I have quite a bit of experience with Wannier90 using with VASP and / or QE. Let me stress that the centers that Wannier90 writes out in the first iteration are not the initial projection centers. I observed this also multiple times in QE that the center moves immediately in the 0th iteration. I believe this is a fundamental problem in the algorithm Wannier90 uses to orthonormalize and minimize the spread of the Wannier functions. There is inherently no way in the original MLWF algorithm to constrain the center of the Wannier function. It can be anywhere, also very well outside the unit cell. One way out is to use SLWF: https://wannier90.readthedocs.io/en/lat ... torial_26/ . I also suggest to try a different Wannier code (there should be some that constrain centres and read in W90 input files)

I am very certain that VASP performs the initial projections on the specified atomic site / position, since these are also used by the interface in the TRIQS code. It is Wannier90 that obtains a different centre, even in the 0th iteration.

I am not an expert on spin-polarized projections, so I can't say too much about that. But what you can try is to use the TRIQS interface to generate orthonormalizer projectors (Wanier functions) from the atomic projections via LOCPROJ and check the up/down occupations: https://triqs.github.io/dft_tools/lates ... _vasp.html . Maybe this helps you to find a solution.

Best regards,
Alex