Dear Users

I´d like to apply a restrict geometry optimization considering the atom 1 and
atom 2 form an angle of 45 graus and fix it. Using the constr.f file tha
calculation not converge.

I am using the file contr.f
     subroutine constr( cell, na, isa, amass, xa, stress, fa )
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        : output total number of position constraints
c                        imposed in this routine
     integer na, isa(na), ntcon
     double precision amass(na), cell(3,3), fa(3,na),
    .                 stress(3,3), xa(3,na), fz
     fxy1 = (fa(1,1) + fa(2,1))/2.
     fxy2 = (fa(1,2) + fa(2,2))/2.
     fa(1,1) = fxy1
     fa(2,1) = fxy1
     fa(1,2) = fxy2
     fa(2,2) = fxy2

     ntcon=2
     end
best regards
luis

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

Reply via email to