n_try=0
do while (n_try.lt.n_maxtry .and. orig_e-cur_e.lt.e_drop)
c Move the selected residue (don't worry if it fails)
n_try=0
do while (n_try.lt.n_maxtry .and. orig_e-cur_e.lt.e_drop)
c Move the selected residue (don't worry if it fails)
+ alph(res_pick),omeg(res_pick),fail)
c Minimize the side-chains starting from the new arrangement
+ alph(res_pick),omeg(res_pick),fail)
c Minimize the side-chains starting from the new arrangement
- call egb1(evdw)
- call esc(escloc)
- f=wsc*evdw+wscloc*escloc
-cd call etotal(energia(0))
-cd f=wsc*energia(1)+wscloc*energia(12)
+c1 call egb1(evdw)
+c1 call esc(escloc)
+c1 f=wsc*evdw+wscloc*escloc
+ call etotal(energia(0))
+ f=wsc*energia(1)+wscloc*energia(12)
cd print *,f,evdw,escloc,energia(0)
C
C Sum up the components of the Cartesian gradient.
cd print *,f,evdw,escloc,energia(0)
C
C Sum up the components of the Cartesian gradient.
do j=istart(i,iint),iend(i,iint)
IF (mask_side(j).eq.1.or.mask_side(i).eq.1) THEN
ind=ind+1
do j=istart(i,iint),iend(i,iint)
IF (mask_side(j).eq.1.or.mask_side(i).eq.1) THEN
ind=ind+1