SCDM projections + exclude_bands

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
PatrickJTaylor
Newbie
Newbie
Posts: 5
Joined: Thu Nov 04, 2021 8:21 pm

SCDM projections + exclude_bands

#1 Post by PatrickJTaylor » Thu Oct 24, 2024 9:37 am

Dear VASP developers,

I have just seen (via the "Known Issues" page on the wiki) that the SCDM method currently does not function correctly with the exclude_bands tag in Wannier90.

I assume this means that, regardless of how NUM_WANN and exclude_bands are set, the full density matrix is always considered?

This behavior would explain a lot of the problems I have previously encountered using this methodology. For example, in spin-polarised calculations in which there are more unoccupied spin-down states than unoccupied spin-up states, the SCDM projections for the occupied spin-down states are always worse than those for the occupied spin-up states (presumably because the additional unoccupied spin-down states are being implicitly included via the density matrix).

Is this bug likely to be fixed in a new release anytime soon? If not, is there any chance of a simple patch being provided in the meantime? My FORTRAN knowledge is not really good enough to figure this out myself, but I am keen to get SCDM working with exclude_bands as this is very much required for my use case.

Thanks in advance,

Patrick


manuel_engel1
Global Moderator
Global Moderator
Posts: 125
Joined: Mon May 08, 2023 4:08 pm

Re: SCDM projections + exclude_bands

#2 Post by manuel_engel1 » Fri Oct 25, 2024 9:31 am

Dear Patrick,

Thanks for reaching out. Unfortunately, you are correct in your assumptions. We currently always consider the full density matrix. I also find it quite likely that the issues you are facing are a direct consequence of this.

This feature is sadly a bit too complex for a simple patch. It requires a refactoring of the SCDM routine and proper testing. However, I have now put it on my to-do list for the upcoming release.

Manuel
VASP developer

PatrickJTaylor
Newbie
Newbie
Posts: 5
Joined: Thu Nov 04, 2021 8:21 pm

Re: SCDM projections + exclude_bands

#3 Post by PatrickJTaylor » Fri Oct 25, 2024 10:37 am

Hi Manuel,

Fair enough, I did think that a hotfix patch was relatively unlikely.

Thank you for putting this on the to-do list for the next release anyway :)

P.S. Might it be worth updating the wiki in the meantime to explicitly warn users of this behaviour e.g. on the page for the LSCDM tag?


manuel_engel1
Global Moderator
Global Moderator
Posts: 125
Joined: Mon May 08, 2023 4:08 pm

Re: SCDM projections + exclude_bands

#4 Post by manuel_engel1 » Fri Oct 25, 2024 11:07 am

I will consider the wiki inclusion and see how we usually handle these things. Thanks for the feedback.

Manuel
VASP developer

PatrickJTaylor
Newbie
Newbie
Posts: 5
Joined: Thu Nov 04, 2021 8:21 pm

Re: SCDM projections + exclude_bands

#5 Post by PatrickJTaylor » Mon Nov 11, 2024 10:16 am

Hi Manuel,

If you don't mind, I have another question strongly related to the above:

Even if one cannot formally select a subset of bands via the exclude_bands flag in Wannier90, should it not be possible to achieve the same result by carefully selecting an appropriate (hard) cutoff on the quasi-density matrix?

For example, if I was to:

1. Converge a standard static calculation
2. Rerun with:
LWANNIER90 = .TRUE.
LSCDM = .TRUE.
NUM_WANN = X
CUTOFF_TYPE = num_wann
WANNIER90_WIN = "
...
dis_num_iter = 0
...
"
where X is the number of occupied states in the spin-down channel
3. Run Wannier90 using the mmn, amn and eig files for the spin-down channel (i.e. wannier90.x wannier90.2).

I just tried this method, expecting that this should effectively give me the same result as if I had formally excluded the unoccupied spin-down bands via exclude_bands. Unfortunately, the initial spread after SCDM is still very high, suggesting that there is another problem that I am not picking up on.

To summarise:
1. Am I right in thinking that this workaround is possible and should in theory accomplish the desired result (in my case, effectively excluding the unoccupied states from the Wannierisation)?
2. If I am right, do you have any thoughts on why this method is not working in my case? I am happy to provide my inputs for proper troubleshooting, but I thought it best to check if my understanding is correct before further wasting your time.


manuel_engel1
Global Moderator
Global Moderator
Posts: 125
Joined: Mon May 08, 2023 4:08 pm

Re: SCDM projections + exclude_bands

#6 Post by manuel_engel1 » Mon Nov 11, 2024 10:58 am

No worries. This is a very good follow-up question. With CUTOFF_TYPE=num_wann, you should indeed be able to introduce the desired cutoff. However, there are a few caveats.

In order to do this consistently for each spin channel, make sure that you do not touch the Kohn-Sham (KS) orbitals when loading the data from the standard self-consistent calculation. To do this, you can read the preconverged KS orbitals from the WAVECAR file and set ALGO=None. This should allow you to get consistent results from LSCDM=True for spin up and spin down in separate runs.

CUTOFF_TYPE=num_wann sets the position of the cutoff function to the energy of the X-th state (where X is the number of occupied states. A short while ago, this was not correctly documented on the wiki. Sorry for any confusion this may have caused). In order to obtain a hard cutoff, you also need to set CUTOFF_SIGMA to a small value.

However, if your occupied and unoccupied states are not well-separated by a band gap (e.g. in case of a metal), a hard cutoff can severely affect the quality of the Wannier orbitals. It's recommended to play around with the CUTOFF_SIGMA parameter in this case.

Manuel
VASP developer

PatrickJTaylor
Newbie
Newbie
Posts: 5
Joined: Thu Nov 04, 2021 8:21 pm

Re: SCDM projections + exclude_bands

#7 Post by PatrickJTaylor » Mon Nov 11, 2024 2:02 pm

Okay great, thank you for getting back to me so quickly :)

I have just attempted to implement the methodology you outlined above and unfortunately am still running into problems (namely that the SCDM projections are still very bad i.e. highly delocalised).

I have attached the basic inputs/outputs for both the standard scf calculation and the attempted SCDM for the spin-down channel (minus the WAVECARs etc, as these are very large) so that you can see exactly what I have done. It's worth noting that this material does have a band gap, so these problems are definitely not a result of entanglement with unoccupied states.

One problem I have already found myself is that the second calculation (SCDM of the spin-down channel) reports a different energy than the original converged scf calculation, even though I am setting ALGO = None. This would seem to imply that the SCDM calculation is somehow not able to correctly read in the wave functions of the original scf calculation, even though VASP is reportedly doing this according to the OUTCAR.

I would really appreciate some help troubleshooting this as I am at a bit of a dead end.

(If it would be helpful for me to provide any additional information, please let me know.)

You do not have the required permissions to view the files attached to this post.

Post Reply