Hi, Forgot the "return" statement ?. R.
> Hi all > I am trying to optimize a crystal with some restrictions, such alpha, > beta, and gamma angles are constants. Moreover, I also want to fix the > unit-cell side lengths to their initial values for b and c. This is my > file constr.f: > > 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
