Page 1 of 1
Hessian disappeared from OUTCAR
Posted: Thu Jun 22, 2023 1:49 pm
by alex
Hi there,
after some time I'm in need of the Hesse matrix (=second derivative matrix) after frequency calculation, but it seems to have been lost from VASP5 to 6. However, it is plotted to vasprun.xml.
So I just wonder if there is some magic switch to plot it into OUTCAR again?
An example is attached (H2)
Thanks,
Alex
Re: Hessian disappeared from OUTCAR
Posted: Thu Jun 22, 2023 4:08 pm
by fabien_tran1
Hi,
In finite_diff.F there are lines that were commented (already in 2012 at the time of vasp.5.3.x) for the case IBRION=6:
! clumsy and unreadable output (write eigenvectors to vasprun.xml instead)
! IF (IU6>=0) THEN
! WRITE (IU6,*)
! WRITE (IU6,*) 'SECOND DERIVATIVES (NOT SYMMETRIZED)'
! WRITE (IU6,*) '------------------------------------'
! CALL PRINT_SECOND_DERIV(NIONS,DOF,SECOND_DERIV,T_INFO%LSFOR,T_INFO%LSDYN,IU6)
! END IF
The first line seems to give the reason. A solution would be to reactivate these lines and compare the results to what is in vasprun.xml (they may slightly differ due to symmetrization). An alternative is to use the computationally more involved IBRION=5 (no symmetry applied).
Re: Hessian disappeared from OUTCAR
Posted: Fri Jun 23, 2023 2:55 pm
by alex
Hi Fabian,
thanks a lot for clarification!
Cheers,
alex
Re: Hessian disappeared from OUTCAR
Posted: Tue Jun 27, 2023 10:52 am
by alex
Hello again,
I'm somehow stuck with the transformation of the units of the 'hessian' section in vasprun.xml to that in OUTCAR 'SECOND DERIVATIVE'.
Any advice is very much welcome!
Thanks a lot,
alex
Re: Hessian disappeared from OUTCAR
Posted: Tue Jun 27, 2023 1:10 pm
by fabien_tran1
Hi,
From "SECOND DERIVATIVE" in OUTCAR to "hessian" in vasprun.xml three transformations are done (see finite_diff.F):
1) Symmetrization, which should have a small influence:
Code: Select all
DO N=1,DOF
DO M=N+1,DOF
X=0.5_q*(SECOND_DERIV(N,M)+SECOND_DERIV(M,N))
!WRITE(0,*) N,M,SECOND_DERIV(N,M),SECOND_DERIV(M,N),X
SECOND_DERIV(N,M)=X
SECOND_DERIV(M,N)=X
!WRITE(0,*) N,M,SECOND_DERIV(N,M),SECOND_DERIV(M,N),X
END DO
END DO
2) Calculation of Hessian, where MASSES are POMASS read from POTCAR:
Code: Select all
! Compute Hessian (mass normalized force-constants)
N=1
DO I=1,NTYP
DO J=1,NITYP(I)
DO K=1,3
CALL FIND_DOF_INDEX(NIONS,LSFOR,LSDYN,K,N,M)
IF (M>0) SECOND_DERIV(:,M)=SECOND_DERIV(:,M)/SQRT(MASSES(I))
IF (M>0) SECOND_DERIV(M,:)=SECOND_DERIV(M,:)/SQRT(MASSES(I))
END DO
N=N+1
END DO
END DO
3) Unit conversion, which should correspond to 244.4001408103826:
Code: Select all
CALL XML_ARRAY_REAL(CONVERT_FREQUENCY(EIGENVECTORS, UNIT_INTERNAL, UNIT_HZ, 2._q) * 1E-24_q)
Re: Hessian disappeared from OUTCAR
Posted: Tue Jun 27, 2023 3:05 pm
by alex
Thanks Fabien, I missed the part with the masses. :-(