use comm_gucio
use control, only:tcpu
use control_data
+ use minimm, only:minim_dc
#ifdef MPI
include 'mpif.h'
integer :: ierror,ierrcode
!el common /gucio/ cm
!el real(kind=8),dimension(6*nres) :: stochforcvec !(MAXRES6) maxres6=6*maxres
!el common /stochcalc/ stochforcvec
- integer :: itime,icount_scale,itime_scal,i,j,ifac_time
+ integer :: itime,icount_scale,itime_scal,i,j,ifac_time,iretcode
logical :: scalel
real(kind=8) :: epdrift,tt0,fac_time
!
! AL 4/17/17: Reduce the steps if NaNs occurred.
if (potEcomp(0).gt.0.99e18 .or. isnan(potEcomp(0)).gt.0) then
d_time=d_time/10.0
-! write (iout,*) "Tu jest problem",potEcomp(0),d_time
+ if (icount_scale.gt.15) then
+ write (iout,*) "Tu jest problem",potEcomp(0),d_time
+! call gen_rand_conf(1,*335)
+! call minim_dc(potEcomp(0),iretcode,100)
+
+! call zerograd
+! call etotal(potEcomp)
+! write(iout,*) "needed to repara,",potEcomp
+ endif
cycle
+! 335 write(iout,*) "Failed genrand"
+! cycle
endif
! end change
if (large.and. mod(itime,ntwe).eq.0) &
"WTURN3 ","WTURN4 ","WTURN6 ","WANG ","WSCLOC ","WTOR ","WTORD ",&
"WHPB ","WVDWPP ","WSCP14 ","WBOND ","WSCCOR ","WDIHC ","WSC ",&
"WLT "," "," ","WTUBE " ,&
- "WVDWPP ","WELPP ","WVDWPSB ","WELPSB ","WVDWSB ",&
+ "WVDWPP_NUC","WELPP ","WVDWPSB ","WELPSB ","WVDWSB ",&
"WELSB ","WBOND_NUCL","WANG_NUCL ","WSBLOC ","WTOR_NUCL ",&
"WTORD_NUCL","WCORR_NUCL","WCORR3_NUC","WNULL ","WNULL ",&
"WCATPROT ","WCATCAT ","WNULL ","WNULL ","WNULL ",&
enddo
if (nsi.gt.maxsi) return 1
endif ! it1.ne.10
+ write(iout,*) "before origin_frame"
call orig_frame
+ write(iout,*) "after origin_frame"
i=4
nstart=4
else
do i=1,nres_molec(molec)
itmp=itmp+1
istype(itmp)=sugarcode(sequence(i,molec)(1:1),i)
- itype(itmp,molec)=rescode(i,sequence(i,molec)(1:2),iscode,molec)
+ sequence(i,molec)=sequence(i,molec)(1:2)
+ itype(itmp,molec)=rescode(i,sequence(i,molec),iscode,molec)
enddo
endif