Hi Gregorio,
Very easy, you just have to make 0 all stress components apart from
stress(1,1). Your constr.f file should like this (and yes, you have to
compile again every time you modify this file):
subroutine constr( cell, na, isa, amass, xa, stress, fa, ntcon )
c *****************************************************************
c User-written routine to implement specific geometric constraints,
c by orthogonalizing the forces and stress to undesired changes.
c Arguments:
c real*8 cell(3,3) : input lattice vectors (Bohr)
c integer na : input number of atoms
c integer isa(na) : input species indexes
c real*8 amass(na) : input atomic masses
c real*8 xa(3,na) : input atomic cartesian coordinates (Bohr)
c real*8 stress( 3,3) : input/output stress tensor (Ry/Bohr**3)
c real*8 fa(3,na) : input/output atomic forces (Ry/Bohr)
c integer ntcon : total number of positions constr. imposed
c *****************************************************************
implicit none
integer na, isa(na), ntcon, ia
double precision amass(na), cell(3,3), fa(3,na),
. stress(3,3), xa(3,na)
double precision fav, stressav
c Write here your problem-specific code.
stress(1,2) = 0.0d0
stress(1,3) = 0.0d0
stress(2,1) = 0.0d0
stress(2,2) = 0.0d0
stress(2,3) = 0.0d0
stress(3,1) = 0.0d0
stress(3,2) = 0.0d0
stress(3,3) = 0.0d0
end
Best regards,
Pablo
--------------------------------------------------
Pablo Aguado Puente
DCITIMAC
Facultad de Ciencias - Universidad de Cantabria
Av. de los Castros s/n 39005 Santander
SPAIN
Tel. +34 942 20 15 15
Fax. +34 942 20 14 02
[email protected]
http://personales.unican.es/aguadop
--------------------------------------------------