Luiz, It might be easier to do this using the z-matrix feature; if I'm not mistaken the z-matrix allows you to fix lengths and angles for given atoms. One way I found to generate the z-matrix was to use Molden to write the z-matrix once I had generated the cartesian coordinates. Then I had to change one or two angles, but after you do it twice you already get the feeling of what has to be done.
Cheers, Marcos Vous avez écrit / You have written / Lei ha scritto / Você escreveu... Luis Alberto > 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. > -- Dr. Marcos Verissimo Alves Post-Doctoral Fellow Unité de Physico-Chimie et de Physique des Matériaux (PCPM) Université Catholique de Louvain 1 Place Croix du Sud, B-1348 Louvain-la-Neuve Belgique ------ Gort, Klaatu barada nikto. Klaatu barada nikto. Klaatu barada nikto. Free translation: Gort, Google is your friend. Google is your friend. Google is your friend.