Page 1 of 1

constr_cell_relax.F - variable cell constrained relax

Posted: Fri Jan 29, 2016 5:44 pm
by fiori
Hi all.
I have a question concerning the relaxation of the cell constraining the xy axis to fix and letting only the Z axis to relax.

In CONSTR_CELL_RELAX.F I uncomment like that

Code: Select all

SUBROUTINE CONSTR_CELL_RELAX(FCELL)
USE prec
REAL(q) FCELL(3,3)

! just one simple example
! relaxation in x directions only
! SAVE=FCELL(1,1)
! FCELL=0 ! F90 style: set the whole array to zero
! FCELL(1,1)=SAVE
! relaxation in z direction only
SAVE=FCELL(3,3)
FCELL=0 ! F90 style: set the whole array to zero
FCELL(3,3)=SAVE

RETURN
END SUBROUTINE
compiled vasp (5.4.1 patched) and run it with ISIF = 3.
It seems to me from the MAIN.F that the above routine is called only for ISIF==7 and that from the calculation I did all the three lattice constant have been relaxed.
Am I doing something wrong?

Thanks for the attention
Federico Iori

Universite' Paris Sud - CNRS

Re: constr_cell_relax.F - variable cell constrained relax

Posted: Mon Feb 01, 2016 10:36 am
by admin
For advanced manipulations with coordinates contact Tomas Bucko.
tomas.bucko@univie.ac.at

Re: constr_cell_relax.F - variable cell constrained relax

Posted: Tue Nov 01, 2022 6:55 am
by yasuhide_mochizuki1
Hi, I compiled VASP (ver. 5.4.4) in the same way as Federico Iori did.
And I succeeded in fixing a and b lattice parameters and relaxing only c lattice parameter.
The source code of src/constr_cell_relax.F is shown below:

Code: Select all

 27       SUBROUTINE CONSTR_CELL_RELAX(FCELL)
 28       USE prec
 29       REAL(q) FCELL(3,3)
 30
 31       SAVE=FCELL(3,3)
 32       FCELL=0
 33       FCELL(3,3)=SAVE
 34
 35 !     just one simple example
 36 !     relaxation in x directions only
 37 !      SAVE=FCELL(1,1)
 38 !      FCELL=0   ! F90 style: set the whole array to zero
 39 !      FCELL(1,1)=SAVE
 40 !     relaxation in z direction only
 41 !      SAVE=FCELL(3,3)
 42 !      FCELL=0   ! F90 style: set the whole array to zero
 43 !      FCELL(3,3)=SAVE
 44
 45       RETURN
 46       END SUBROUTINE
 47
 

Best,
Yasuhide Mochizuki