Constrained variable cell relaxation using ICONST

Question on input files/tags, interpreting output, etc.

Please check whether the answer to your question is given in the VASP online manual or has been discussed in this forum previously!

Moderators: Moderator, Global Moderator

Post Reply
Message
Author
LassiL
Newbie
Newbie
Posts: 3
Joined: Wed Oct 11, 2023 9:45 am

Constrained variable cell relaxation using ICONST

#1 Post by LassiL » Thu Nov 30, 2023 9:23 pm

Hello, I have the following POSCAR:

Ni Al Cr
1.0000000000000000
2.8554233500000001 0.0000000000000000 0.0000000000000000
0.0000000000000000 2.8554233500000001 0.0000000000000000
0.0000000000000000 0.0000000000000000 28.5542335000000023
Ni Al Cr
5 5 10
Cartesian
0.0000000000000000 0.0000000000000000 0.0000000000000000
0.0000000000000000 0.0000000000000000 2.8554233500000001
0.0000000000000000 0.0000000000000000 5.7108467000000003
...

which corresponds to a coherent interface between BCC Cr(100) and BCC NiAl(100). Now I am trying to perform a constrained relaxation such that the ions are let to relax in x, y and z directions, but the cell is let to relax only in the third lattice vector direction, (preferably even only along the z-direction of the third lattice vector, for future purposes). Is this possible to achieve with VASP directly, without having to modify the source code?

I read that there exist the ICONST file, and I tried with the following ICONST file:

LA 1 2 0
LA 1 3 0
LA 2 3 0
LR 1 0
LR 2 0

which, if I understood correctly, should fix all the cell angles (LA i j 0), and also fix the first and second cell vector lengths (LR 1 0 and LR 2 0), but when I run the relaxation using ibrion=2 and isif=3, all the cell vectors were still relaxed. Is there something wrong here?

I also read that there exist the INCAR tag LATTICE_CONSTRAINTS and I tried with the line LATTICE_CONSTRAINTS = .FALSE. .FALSE. .TRUE., in the INCAR file, which according to the documentation should fix a1 and a2 and only relax along a3, but still all lattice vectors were relaxed.

I am using VASP 6.4.2.

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

jonathan_lahnsteiner2
Global Moderator
Global Moderator
Posts: 177
Joined: Fri Jul 01, 2022 2:17 pm

Re: Constrained variable cell relaxation using ICONST

#2 Post by jonathan_lahnsteiner2 » Tue Dec 05, 2023 8:05 am

Dear LassiL,

The LATTICE_CONSTRAINTS approach will only be available from vasp6.5.0. Currently, the LATTICE_CONSTRAINTS tag will
not be read from the INCAR file for IBRION=1 or 2, so it will always be set to true. If possible you can adapt the vasp code slightly to enable this feature.
If this is possible for you then open the main.F file in the vasp src folder and look for the following lines

Code: Select all

IF (DYN%IBRION==0) THEN
  CALL DYNCONSTR_INIT(DYN,T_INFO,INFO,LATT_CUR,NHC,IO,g_io)
ENDIF
and replace those by

Code: Select all

IF (DYN%IBRION==0) THEN
  CALL DYNCONSTR_INIT(DYN,T_INFO,INFO,LATT_CUR,NHC,IO,g_io)
ELSE IF ( DYN%IBRION==1 .OR. DYN%IBRION==2 ) THEN
  CALL PROCESS_INCAR(IO%LOPEN, IO%IU0, IO%IU5, 'LATTICE_CONSTRAINTS', LATTICE_CONSTRAINTS_GL, 3, IERR, WRITEXMLINCAR)
  IF (IERR==3) LATTICE_CONSTRAINTS_GL = .TRUE.
ENDIF
Then you have to recompile vasp. With these changes you can use the LATTICE_CONSTRAINTS feature with IBRION=1,2.

A second solution would be to write a bash script in which you scan the lattice parameter that you want to optimize. You could do this by making a
script that changes the z-component of the third lattice vector. For every value of the z-direction, you have to do a structure optimization with constant volume.
By plotting the energy vs the z-component of the third lattice vector you can obtain the optimal value which is determined by the energy minimum.

The ICONST file is only available when doing NPT molecular dynamics. With this setting, you could try to start a molecular dynamics run with your ICONST file at a moderate temperature.
Then you could apply a temperature ramp with TEBEG and TEEND and cool the system down until the atoms freeze in. This approach will most likely not give you the optimal lattice constant but could be used to get a first guess for the other two approaches.

I hope this helps to resolve your issue.
All the best

Jonathan

Post Reply