Page 1 of 1

Improving magnetization(x,y,z) output in OUTCAR during electronic relaxation using ALGO = ALL

Posted: Thu Dec 07, 2023 12:31 am
by matthew_sale1
Good Day VASP forum users/developers

I have noticed that when performing Non-collinear calculations using most electronic relaxation algorithms, except 'All' and 'Damped',
Every 5 electronic steps, the (x,y,z) magnetisation densities are integrated at the atomic sites and printed to the OUTCAR file (if LORBIT=11 is set) as is expected
However, if ALGO=ALL or ALGO=DAMPED are selected, then this information is only printed to the OUTCAR at the last step of the electronic convergence

For systems with SOC where convergence to the electronic ground state is slow, usually due to rotation of the magnetic moments,
It is difficult to monitor the electronic convergence without this feature when using ALGO = ALL or DAMPED
At least one other user may have experienced this issue in an earlier version of VASP, see https://www.vasp.at/forum/viewtopic.php?t=12783
I usually find that ALGO = Normal doesn't converge to the ground state very smoothly at small energy differences using SOC
And that instead using ALGO = All is required to ensure smooth convergence

Further code investigation reveals that the src/electron_all.F doesn't have any code to call the "SPHPRO_FAST" subroutine from "sphpro.F" which usually prints this information in the other "electron*.F" files which perform electronic relaxation
I don't see any other way apart from patching the source code to implement this feature which is present in most other electronic relaxation algorithms
Please see attached an example of a source patch file which may successfully implement this feature for version 6.3.2
This patch passes the provided testsuite with the settings/features I usually use
Could some VASP developers please consider reviewing the patch

Also attached are some examples of I/O files showing the missing and desired behavior in the OUTCAR files based on the NiO example in the Wiki
https://www.vasp.at/wiki/index.php/Incl ... t_Coupling
The example_all_original and example_all folders show the current and desired behaviour respectively to print the magnetization(x,y,z) sections in the OUTCAR file when using ALGO = ALL, example_all was generated using the supplied patch.
The example_normal shows the current and expected behaviour when using ALGO = NORMAL for comparison


Thanks, Matt

Re: Improving magnetization(x,y,z) output in OUTCAR during electronic relaxation using ALGO = ALL

Posted: Mon Dec 11, 2023 9:15 am
by jonathan_lahnsteiner2
Dear matthew_sale1,

Thank you for providing this useful information. And thank you for
supplying a patch for your issue.
We will take this into account and consider including your fix in the next vasp release.

All the best Jonathan