constr_cell_relax.F - variable cell constrained relax

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


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
fiori
Newbie
Newbie
Posts: 2
Joined: Wed Jan 21, 2015 2:13 pm
License Nr.: 5-1264

constr_cell_relax.F - variable cell constrained relax

#1 Post by fiori » Fri Jan 29, 2016 5:44 pm

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
Federico Iori
Laboratoire de Physique des Solides
Universite' Paris Sud - CNRS (Orsay)
federico.iori @ u-psud.fr

admin
Administrator
Administrator
Posts: 2921
Joined: Tue Aug 03, 2004 8:18 am
License Nr.: 458

Re: constr_cell_relax.F - variable cell constrained relax

#2 Post by admin » Mon Feb 01, 2016 10:36 am

For advanced manipulations with coordinates contact Tomas Bucko.
tomas.bucko@univie.ac.at

yasuhide_mochizuki1
Newbie
Newbie
Posts: 1
Joined: Thu Nov 14, 2019 7:54 am

Re: constr_cell_relax.F - variable cell constrained relax

#3 Post by yasuhide_mochizuki1 » Tue Nov 01, 2022 6:55 am

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

Post Reply