Dear VASP developers,
I would like to address an issue regarding the UNK****.NC files generated by VASP 6.4.3 when setting LWRITE_UNK=True and LSORBIT=True.
When reading these files to plot the Wannier functions, wannier90 stops with an "end of file while reading" error.
forrtl: severe (24): end-of-file during read, unit 11, file /****/UNK00001.NC
This error occurs because the UNK files are not written correctly. So, I suggest to modify lines 3189-3190 in the mlwf.F file as follows:
3189,3190c3189,3194
< IF (WP%WDES%COMM%NODE_ME==WP%WDES%COMM%IONODE.AND.IU>=0) &
< WRITE(IU) (CMPLX(WVFN(I),KIND=W90_REAL_KIND),I=1,NPW*W%WDES%NRSPINORS)
---
> IF (WP%WDES%COMM%NODE_ME==WP%WDES%COMM%IONODE.AND.IU>=0) THEN
> DO ISPINOR=1,W%WDES%NRSPINORS
> NPWS = NPW*(ISPINOR-1)
> WRITE(IU) (CMPLX(WVFN(I),KIND=W90_REAL_KIND),I=1+NPWS,NPW+NPWS)
> ENDDO
> ENDIF
Wannier90 UNK files with spin orbit coupling
Moderators: Moderator, Global Moderator
-
- Newbie
- Posts: 3
- Joined: Tue Sep 29, 2020 7:42 am
-
- Global Moderator
- Posts: 74
- Joined: Fri Aug 04, 2023 11:07 am
Re: Wannier90 UNK files with spin orbit coupling
Dear satoru_matsuishi2,
Thanks for the suggestions, could you please send some input and output files where this issue shows up? The testsuite does seem to contain a test case but does not seem to require this modification.
Sudarshan
Thanks for the suggestions, could you please send some input and output files where this issue shows up? The testsuite does seem to contain a test case but does not seem to require this modification.
Sudarshan
-
- Newbie
- Posts: 3
- Joined: Tue Sep 29, 2020 7:42 am
Re: Wannier90 UNK files with spin orbit coupling
Dear Sudarshan,
There is no test case with "LWRITE_UNK=.TRUE." in the testsuite, while mlwf_mos2_soc_wannier90 contains "LWRITE_WANNIER_XSF=.TRUE." to plot Wannier functions with SOC in XFS format.
Unfortunately, I cannot obtain the XSF files using the original INCAR of mlwf_mos2_soc_wannier90.
The vasp in wannier90 library mode does not finish after several hours of running.
I can obtain them using the INCAR with "LWANNIER90=.TRUE." instead of "LWANNIER90_RUN=.TRUE.".
However, in this case, the UNK files required for the subsequent wannier90.x execution are not generated.
To obtain UNK*****.NC files in addition to wannier90.win, wannier90.amn, and wannier90.mmn, run vasp_ncl with the following INCAR file:
##################################################
SYSTEM = MoS2
EDIFF = 1E-8
MAGMOM = 0 0 1 0 0 1 0 0 1
LSORBIT= .TRUE.
LNONCOLLINEAR = .TRUE.
NUM_WANN = 26
NBANDS = 48
ALGO = EXACT
NELM = 100
LWANNIER90 = .TRUE.
LWRITE_MMN_AMN = .TRUE.
LWRITE_UNK = .TRUE.
WANNIER90_WIN = "
# disentanglement
dis_win_min = -11
dis_win_max = 8.9
# wannier minimization
num_iter = 500
num_print_cycles = 50
wannier_plot = true
begin projections
Mo:d
S:s;p
end projections
"
NCSHMEM = -1 ; FFTWMAKEPLAN = E; PREC = Normal
##################################################
Then run "mpirun -np <nrank> wannier90.x wannier90".
You will receive the following error message:
forrtl: severe (24): end-of-file during read, unit 11, file *****/UNK00001.NC
Image PC Routine Line Source
wannier90.x 0000000000570357 Unknown Unknown Unknown
wannier90.x 00000000004E812C Unknown Unknown Unknown
wannier90.x 00000000004E551F Unknown Unknown Unknown
wannier90.x 00000000004061D1 Unknown Unknown Unknown
wannier90.x 000000000040547D Unknown Unknown Unknown
libc.so.6 00007F826A519D90 Unknown Unknown Unknown
libc.so.6 00007F826A519E40 __libc_start_main Unknown Unknown
wannier90.x 0000000000405395 Unknown Unknown Unknown
There is no test case with "LWRITE_UNK=.TRUE." in the testsuite, while mlwf_mos2_soc_wannier90 contains "LWRITE_WANNIER_XSF=.TRUE." to plot Wannier functions with SOC in XFS format.
Unfortunately, I cannot obtain the XSF files using the original INCAR of mlwf_mos2_soc_wannier90.
The vasp in wannier90 library mode does not finish after several hours of running.
I can obtain them using the INCAR with "LWANNIER90=.TRUE." instead of "LWANNIER90_RUN=.TRUE.".
However, in this case, the UNK files required for the subsequent wannier90.x execution are not generated.
To obtain UNK*****.NC files in addition to wannier90.win, wannier90.amn, and wannier90.mmn, run vasp_ncl with the following INCAR file:
##################################################
SYSTEM = MoS2
EDIFF = 1E-8
MAGMOM = 0 0 1 0 0 1 0 0 1
LSORBIT= .TRUE.
LNONCOLLINEAR = .TRUE.
NUM_WANN = 26
NBANDS = 48
ALGO = EXACT
NELM = 100
LWANNIER90 = .TRUE.
LWRITE_MMN_AMN = .TRUE.
LWRITE_UNK = .TRUE.
WANNIER90_WIN = "
# disentanglement
dis_win_min = -11
dis_win_max = 8.9
# wannier minimization
num_iter = 500
num_print_cycles = 50
wannier_plot = true
begin projections
Mo:d
S:s;p
end projections
"
NCSHMEM = -1 ; FFTWMAKEPLAN = E; PREC = Normal
##################################################
Then run "mpirun -np <nrank> wannier90.x wannier90".
You will receive the following error message:
forrtl: severe (24): end-of-file during read, unit 11, file *****/UNK00001.NC
Image PC Routine Line Source
wannier90.x 0000000000570357 Unknown Unknown Unknown
wannier90.x 00000000004E812C Unknown Unknown Unknown
wannier90.x 00000000004E551F Unknown Unknown Unknown
wannier90.x 00000000004061D1 Unknown Unknown Unknown
wannier90.x 000000000040547D Unknown Unknown Unknown
libc.so.6 00007F826A519D90 Unknown Unknown Unknown
libc.so.6 00007F826A519E40 __libc_start_main Unknown Unknown
wannier90.x 0000000000405395 Unknown Unknown Unknown