Phonon: Linear Response, Force constants, Hessian Elements not written

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
bolariso
Newbie
Newbie
Posts: 5
Joined: Mon Feb 07, 2022 4:59 pm

Phonon: Linear Response, Force constants, Hessian Elements not written

#1 Post by bolariso » Mon Jan 13, 2025 12:45 pm

Dear Team,

I'm trying to use linear response in VASP to compute force constants in real space. However, there are associated errors. The hessian elements and linear response are not written to the vaspout.h5 and vasprun.xml files.

Below is my INCAR file:

ISTART = 0
ICHARG = 2
PREC = Accurate
ENCUT = 500
ISMEAR = 0
SIGMA = 0.05
EDIFF = 1E-08
IALGO = 38
NSW = 0
IBRION = 8
IVDW = 11
LWAVE = .FALSE.
LCHARG = .FALSE.
ADDGRID = .TRUE
NCORE = 24
LPHON_DISPERSION = True
#LPHON_READ_FORCE_CONSTANTS = True

For the first calculation i used a KPOINT, after which I uncomment the LPHON_READ_FORCE_CONSTANTS and used a QPOINT file with line mode.

Looking forward to your help


alex
Hero Member
Hero Member
Posts: 593
Joined: Tue Nov 16, 2004 2:21 pm
License Nr.: 5-67
Location: Germany

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#2 Post by alex » Mon Jan 13, 2025 1:24 pm

Hi Bolariso,

linear response (IBRION = 7 or 8) does not allow vdW correction, so your calculation should terminate with an error.
Use IBRION = 5 or 6 instead if you must use vdW correction.

Cheers,

alex


ahampel
Global Moderator
Global Moderator
Posts: 36
Joined: Tue Feb 16, 2016 11:41 am

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#3 Post by ahampel » Mon Jan 13, 2025 1:42 pm

Hi Bolariso,

thank you for posting your question on the Forum, and thanks Alex for figuring the problem out and helping here.

If there is still a problem Bolariso please remember to post all input files (INCAR, POSCAR, KPOINTS, and POTCAR) and post your error message / output. This helps to address the issue.

Regarding your question of output. The second derivatives should be stored in the xml and h5 archive (if HDF5 support was enabled while compiling).

See also tutorial: https://vasp.at/tutorials/latest/phonon/part1/ where py4vasp is used to analyze results and hence results are present in the hdf5 archive.

Let us know if your calculations work now.

Best,
Alex H.


bolariso
Newbie
Newbie
Posts: 5
Joined: Mon Feb 07, 2022 4:59 pm

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#4 Post by bolariso » Mon Jan 13, 2025 2:22 pm

Dear Team,

Thank you for your swift response.I have tried the calculation with the vdW commented out, however, the situation persists.

What I am trying to do:
To perform phonon calculation using DFPT method and using phonopy for post processing. Alternatively I do not mind using LPHON_READ_FORCE_CONSTANTS since I am using VASP6.4.2

The Error Message:
After running the calculation, the job gets done after only one ionic iteration. (see std.out file). When I proceed to post-process with phonopy, I get the error message:

'vasprun.xml' dones not contain necessary information.

I believe this error message is associated to the fact that the hessian element is not written in the vasprun.xml file which implies an there is an issue with the linear response.

Kindly find the INCAR, POSCAR, KPOINTS, POTCAR, OUTCAR, std.out, and vasprun.xml file in the attached folder named vasp_forum_phonon.zip

Looking forward to your help.

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

ahampel
Global Moderator
Global Moderator
Posts: 36
Joined: Tue Feb 16, 2016 11:41 am

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#5 Post by ahampel » Mon Jan 13, 2025 3:19 pm

Dear Bolariso,

I checked your input files and output files. You can see that VASP actually does not calculate the phonon properties. You did set IBRION=8, but you also set NSW=0, which prevents VASP from performing the necessary ionic steps. Please try to remove the NSW=0 line and rerun the calculation and check again. Let me know how this goes.

Best,
Alex H.


bolariso
Newbie
Newbie
Posts: 5
Joined: Mon Feb 07, 2022 4:59 pm

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#6 Post by bolariso » Tue Jan 14, 2025 11:53 am

Dear Alex,

Thanks for noting that. I removed the NSW=0 and the linear response calculation was added. Sadly, I ended up with an error after the first iteration cycle. The error reads as below:

VASP internal routines have requested a change of the k-point set. |
| Unfortunately, this is only possible if NPAR=number of nodes. |
| Please remove the tag NPAR from the INCAR file and restart the |
| calculation.

However, there is no NPAR set in my INCAR, I only have NCORE=24 which is optimized for VASP on my HPC (Preliminary tests shows that NPAR is not favourable for our architecture). I tried switching off the calculation became super slow. I tried NCORE = 12 and 48, I ended up with the same error. I switched off the ADDGRID tag and I ended up with the same error.

Kindly find attached the std.out file

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

ahampel
Global Moderator
Global Moderator
Posts: 36
Joined: Tue Feb 16, 2016 11:41 am

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#7 Post by ahampel » Tue Jan 14, 2025 12:52 pm

Hi Bolariso,

unfortunately parallelization of NCORE / NPAR together with IBRION=8 is not implemented. NPAR and NCORE do the same thing just interfaced differently to the user, hence you have to remove it from the input tags. What you can do is to use KPAR . If the system is not too large try avoid inter-node communication (run on one node only) and then set KPAR=4 or even 6 or 8. This parallelizes the calculation over k points. The other tags are not related to the problem.

Another thing that does work in OpenMP threading. If you compile VASP with -D_OPENMP you can use multiple threads per mpi rank instead of NCORE. See wiki/index.php/Combining_MPI_and_OpenMP for more details. With that I could get a good performance running your calculation.

Best regards,
Alex H.


bolariso
Newbie
Newbie
Posts: 5
Joined: Mon Feb 07, 2022 4:59 pm

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#8 Post by bolariso » Thu Jan 16, 2025 1:54 pm

Hi Alex,

Thank you very much. This now works like a charm. The Linear response calculation is also included and the hessian elements are written to the vaspout.h5 as expected.

To proceed to get the phonon dispersions, since I am using VASP6.4.2, I wanted to try using VASP without phonopy code for the post processing.

For that, I performed the calculation as before using KPOINTS file. Then:
I provided a QPOINTS file (in line mode)
I copied vaspout.h5 to vaspin.h5
I set LPHON_READ_FORCE_CONSTANTS and LPHON_DISPERSION to True

The std.out file (see attached) reads as below:

LDA part: xc-table for Pade appr. of Perdew
Start phonon computation
Finished phonon computation
Job Done

I can see the phonons written in the OUTCAR file (file attached)

I am however unclear how to proceed to plot the phonon dispersion from here without using py4vasp. I was expecting say a new file output that will contain the phonon dispersions where I can then plot using whatever software that is convenient for me. to put this in a question format,
1. Is the procedure above correct? If not, how do I proceed? If so...
2. where do I find the phonon dispersion data (x,y data format) after this run?

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

ahampel
Global Moderator
Global Moderator
Posts: 36
Joined: Tue Feb 16, 2016 11:41 am

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#9 Post by ahampel » Fri Jan 17, 2025 8:50 am

The phonon dispersion is only written to the OUTCAR file and the vaspout.h5 file if VASP is compiled with HDF5 support. Did you do this?

Is there a specific reason why you do not like to use py4vasp for post-processing? You do not have to plot the data using py4vasp but you can store the phonon dispersion in a csv formatted file as you requested easily via py4vasp: https://www.vasp.at/py4vasp/latest/calc ... onon_band/ using the function calculation.phonon_band.to_csv(filename='file.dat') . Then you can plot and process the file.dat the way you like. Is that a viable way forward?

The amount of information in the OUTCAR for the phonon dispersion can be set via: https://www.vasp.at/wiki/index.php/PHON_NWRITE .

Best,
Alex H.


bolariso
Newbie
Newbie
Posts: 5
Joined: Mon Feb 07, 2022 4:59 pm

Re: Phonon: Linear Response, Force constants, Hessian Elements not written

#10 Post by bolariso » Fri Jan 17, 2025 2:26 pm

Thank you Alex,

Yes, my VASP is compiled with HDF5. I will check out the py4vasp and proceed appropriately. Thank you once again, you have been a great support in getting this right.

Cheers,


Post Reply