Page 1 of 1

LATTICE_CONSTRAINTS for non-orthorhombic lattices

Posted: Tue Sep 24, 2024 9:12 am
by inigo.robredo

Dear developers,

I want to run a relaxation of a (non-orthorhombic) cell fixing the first two lattice vectors and letting the third one vary freely. I am using VASP 6.4.3 and I set LATTICE_CONSTRAINTS = .FALSE. .FALSE. .TRUE.

I attach the initial POSCAR, INCAR and the resulting CONTCAR. You can see how, instead of fixing the third lattice vector, it fixes the first two components of every lattice vector. I tried modifying the "constr_cell_relax.F" and I got the same result. In that file, it states that the basis vectors A are modified as (A -> A+FCELL.A). The results suggest that the change is actually (A -> A+A.FCELL).

I saw that there is a new powerful functionality to restrict the lattice and atomic positions through the ICONST file. I can see no easy way to implement the total fixing of two lattice vectors and letting the third completely relax.

Thank you for your help,

IƱigo


Re: LATTICE_CONSTRAINTS for non-orthorhombic lattices

Posted: Tue Sep 24, 2024 8:21 pm
by martin.schlipf

LATTICE_CONSTRAINTS works as intended here. It zeros components along the Cartesian axes not along specific lattice vectors.

You could use the ICONST file to fix the lattice vectors. Two length constraints (LR) for the first two lattice vectors combined with a angle constraint (LA) between them should do the job.

Finally, you could rotate the structure. In standard representation, the first lattice vector is along the x-axis and the second one is in the x-y plane. Your LATTICE_CONSTRAINTS will then keep the first two vectors fixed. Notice that only the z component of the third vector should change so the calculation will behave differently from the previous example.