dipole energy in charged slab calculations (using NELECT)

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


Moderators: Global Moderator, Moderator

Locked
Message
Author
sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

dipole energy in charged slab calculations (using NELECT)

#1 Post by sophie_weber » Wed Jan 17, 2024 4:12 pm

Hello,

I am trying to compare energies of different magnetic configurations using constrained magnetic calculations for a slab structure where the Fermi level is forced from in-gap to metallic by using NELECT. Since the slab is then charged, I use a dipole correction (IDIPOL=3) in the calculations, so at the end of scf convergence, the final step of the OUTCAR prints "adding dipol energy to TOTEN"

My question is, if I am trying to compare very small, relative total energies (order of a few microeV of tenth of meV at best) between different magnetic configurations, while keeping the NELECT value and everything else constant, it it more reliable/physical to compare the total energies before, or after, the dipole correction is added (for larger energy differences, I don't think it makes a difference...it's only in the fourth or fifth decimal place where comparing the dipole corrected versus non-dipole corrected energies yields a different qualitative result).

Thank you in advance.

svijay
Global Moderator
Global Moderator
Posts: 74
Joined: Fri Aug 04, 2023 11:07 am

Re: dipole energy in charged slab calculations (using NELECT)

#2 Post by svijay » Thu Jan 18, 2024 10:11 am

Dear sophie_weber,

In general, if you have a polar system it is better to compare energies using the dipole correction turned on, as it removes fictitious interactions between periodically repeated atoms in the direction in which periodicity is not needed (for example, in the direction of the surface normal). This point is valid for a charge-neutral system (i.e. one without an neutralizing background charge). However, I see from your question that you change NELECT, which causes a neutralizing background charge to occur in your calculation which would cause issues with converging energies with cell dimension (for example, increasing vacuum) so additional care must be taken when directly comparing energies between two calculations. If you would like something more specific, please feel free to supply a minimal reproducible example (https://www.vasp.at/wiki/index.php/Mini ... le_example) as well as input files in accordance with the forum guidelines (https://www.vasp.at/forum/viewtopic.php?t=17928).

Sudarshan

sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

Re: dipole energy in charged slab calculations (using NELECT)

#3 Post by sophie_weber » Wed Jan 24, 2024 9:40 am

Dear Sudarshan,

Thanks a lot for the detailed response, I appreciate it. Since the energy differences are so small, I am a bit worried that I can trust them in the polar cases where the NELECT value makes the system artificially metallic. I attach the input and output files for two example calculations (100Cr2O3_metal_polar) (the INCAR and OUTCAR/OSZICAR files are just labelled 1 and 2). As you can see from the files, the only difference is that the magnetic moments on the outermost layers of the slab are constrained to very slightly different, both small, angles. If you have insight whether it can be reliably said, based on the penalty energy and dipole energies, and "1" is lower energy than "2" that would be very useful to know. I don't have any intuition for this, but I found it surprising that the dipole energies were so huge (about the same value as the initial energies without the corrections.

For reference, I attach the files for an identical set of calculations (100Cr2O3_nonpolar), the only difference being that in this case, NELECT is just set to the default, i.e. no compensating background charge. In this case, the system is naturally insulating. From prior tests with this system, I know the energetic minimum occurs when the outer moments are canted to an angle intermediate between these two values, so in this case, the two energies are essentially degenerate.

Finally, while it's not extremely relevant in this case since both values have the same trend, but for a metal in which finite smearing has been used (I'm using gaussian smearing sixth sigma=0.05), to get accurate energies is it normally best to take the free energy (TOTEN), the energy without entropy, or the energy(sigma->0)? I have heard conflicting answers from colleagues and I'd. like to get it straight in my head.

thank you very much in advance
Sophie
You do not have the required permissions to view the files attached to this post.

svijay
Global Moderator
Global Moderator
Posts: 74
Joined: Fri Aug 04, 2023 11:07 am

Re: dipole energy in charged slab calculations (using NELECT)

#4 Post by svijay » Tue Jan 30, 2024 5:20 pm

Dear Sophie,

Thanks for providing the output files. To your questions:
1. In an uncharged system (i.e. when NELECT is not changed from its default value) the dipole correction (IDIPOL as you use here) will correct for any spurious electrostatic interaction between periodic replicas. So from your "non-polar" calculations directory, I see that the dipole moment is in x, y, z (`grep dipolmoment OUTCAR*`) is relatively small and hence the energy due to the dipole correction is also fairly small. Overall comparing energies between these two systems (though they are identical) is alright as far as I can tell.
2. In a charges system, especially in a (quasi-2D) slab system, we currently do not have the associated electrostatic corrections implemented (for example, IDIPOL) - see here for a list of all implementations https://www.vasp.at/wiki/index.php/Cate ... trostatics (this is likely to change in the near future). You would essentially need a monopole correction for this system (beyond the _dipole_ correction that is currently being done).

To your question about the energies, we have some documentation here: https://www.vasp.at/wiki/index.php/ISMEAR which would provide some suggestions on which would be most appropriate for your system.

Sudarshan

sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

Re: dipole energy in charged slab calculations (using NELECT)

#5 Post by sophie_weber » Fri Feb 02, 2024 10:48 am

Dear Sudarshan,

Thanks very much for the reply.
1. Thanks , I was assuming that comparisons for the "nonpolar" slab would be fine (actually, based on a lot of calculations with this system the energy differences, even though they are on the order microeV, are physically significant as they are reproducible, orders of magnitude above the penalty energy, and change sign when the bulk antiferromagnetic domain is switched.)

2. Sorry, to clarify; I see now that you point out ,and this system is charged, but does not have a dipole moment, so definitely I was using the wrong correction. But I'm a bit confused that you say that the appropriate correction is not implemented. I would think that of the system as 3D (with vacuum boundary conditions in one direction), with a net change, and not a net dipole moment. Then according to the link, LMONO could be used for monopole correction. Are you saying that because the system is a slab, it is classified as 2D? In that case, I understand that NELECT is indicated as the only possible tag to use.

Is the conclusion then that for this system there is no way currently to compare accurately energies between difference magnetic configurations with the same NELECT? Or did I misunderstand you?

thanks again for your response and time, I appreciate it.

svijay
Global Moderator
Global Moderator
Posts: 74
Joined: Fri Aug 04, 2023 11:07 am

Re: dipole energy in charged slab calculations (using NELECT)

#6 Post by svijay » Mon Feb 05, 2024 8:59 am

Yup, absolutely that is what is meant; hopefully the updated documentation is a bit clearer on what we consider the the dimensionality of a system to be:
In general, we refer to a 3D system as a system with periodicity in all three dimensions of a cell, a 2D system as having requirements of periodicity only along two out of the three dimensions (eg. a slab or a 2D-material such as graphene), a 1D system as having requirements of periodicity along only one out of the three dimensions (eg. a nano-rod) and a 0D system as having no requirements of periodicity (such as an atom or a molecule).
So yes, in general, when you apply a background charge in your calculations, your energies will not converge with changing dimension of the cell (see https://journals.aps.org/prb/abstract/1 ... vB.51.4014 for further details). There are corrections implemented in VASP only for 0D and 3D systems at the moment.

Sudarshan

sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

Re: dipole energy in charged slab calculations (using NELECT)

#7 Post by sophie_weber » Mon Feb 05, 2024 9:49 am

Hi Sudarshan,

Thank a lot for your response, this is very helpful.

From your comment and the attached paper, it is still not immediately obvious to me however that the fact that a charged slab energy does not converge with changing the supercell size implies that relative energies for a slab of fixed size cannot be compared. Again, I don't care at all about the actual supercell energies, but only relative energies for a fixed slab size, but different magnetic orders. Could you comment explicitly on this, i.e. whether even if the energies themselves are incorrect, whether you think that comparing energies for different magnetic orders for a fixed size, charged slab is physical meaningful, and if it is not, could you elaborate on why the divergence with respect to slab size also implies this?

Thanks again, apologies for all the questions.
Best wishes
Sophie

svijay
Global Moderator
Global Moderator
Posts: 74
Joined: Fri Aug 04, 2023 11:07 am

Re: dipole energy in charged slab calculations (using NELECT)

#8 Post by svijay » Tue Feb 06, 2024 4:50 pm

I see, when you say that you would like to obtain relative energies for a fixed cell dimension - would you like to compare the energies for this exact cell configuration (i.e. even in the vacuum dimension)? Changing the lattice vectors along the vacuum dimension should cause changes in the relative energy as well - physically, increasing the lattice vectors in the vacuum dimension implies a "thinning" of the homogeneous background charge in the region of charge density, and hence an altered interaction between this charge density and the homogeneous background charge. It might be that the relative energies are not as impacted by this thinning for your system, but this is something to test.

Sudarshan

sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

Re: dipole energy in charged slab calculations (using NELECT)

#9 Post by sophie_weber » Wed Feb 14, 2024 1:13 pm

Hi Sudarshan,

Thanks a lot for your response, sorry for my late reply. That is correct, I want to compare energies for the exact same slab size, i.e. same number of material unit cells and same size of vacuum; exact same POSCAR. The only difference is in the direction of the constrained magnetic moments in the slab.

It sounds like this might be fine but not 100% for certain; do you think that if I test the relative energies of these magnetic configurations using two different vacuum sizes (or even better, two different numbers of layers), and the relative energies for different magnetic configurations using two different cell sizes are consistent, then I should be safe?

Thanks, sorry for all the questions.

svijay
Global Moderator
Global Moderator
Posts: 74
Joined: Fri Aug 04, 2023 11:07 am

Re: dipole energy in charged slab calculations (using NELECT)

#10 Post by svijay » Thu Feb 22, 2024 4:08 pm

Right, in both cases (or any case where the number of electrons in changed via NELECT) you will have a background charge interacting with the charge density. If that is a relatively small contribution in terms of relative energy between two systems of a fixed cell dimension then I guess I can see why comparing these two structures can have some merit, but this is really something to be tested.

sophie_weber
Jr. Member
Jr. Member
Posts: 74
Joined: Wed Jul 07, 2021 11:17 am

Re: dipole energy in charged slab calculations (using NELECT)

#11 Post by sophie_weber » Wed Feb 28, 2024 1:05 pm

Dear Sudarshan,

Alright, thanks so much for all your help and clarifications, I really appreciate it.

Best wishes,
Sophie

Locked