c ************************************************************** subroutine backnocross(n,index) c parts to check if strand-crossing in past iwr steps (usually 100) c if so, output the related two configurations to fort.219 c and the dtime of crossing to fort.218 c and reset the old configurations, changed the random seeds, and c continued uncrossed configurations implicit double precision(a-h, o-z) parameter(maxa=500,pi=3.1415926535d0,pi2=pi*2.d0) common/matrix/x(maxa,3),bangle(maxa) common/bf_coords/f(maxa,3),v(maxa,3),u(maxa,3) common/xoldtw/olddlk,xold(maxa,3),fold(maxa,3),vold(maxa,3) +,uold(maxa,3) common/ischeme/icircular,iele,ihydro,iclose,iknot +,neuler c write the old and the new conformation to fort.219 c write(219,*) index,0 c write(219,*) ((xold(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((fold(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((vold(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((uold(mi,mii),mii=1,3),mi=1,n) c write(219,*) index,1 c write(219,*) ((x(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((f(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((v(mi,mii),mii=1,3),mi=1,n) c write(219,*) ((u(mi,mii),mii=1,3),mi=1,n) c still use old uncrossed configuration do i=1,n do j=1,3 x(i,j)=xold(i,j) f(i,j)=fold(i,j) v(i,j)=vold(i,j) u(i,j)=uold(i,j) enddo enddo call update_bond(n) if ((icircular .eq. 1).and.(iclose.eq.1)) then call update_euler(n) endif c change the seeds tmp_amean=0.1 tmp_var=0.4 call rannv2(1,tmp_a,tmp_amean,tmp_var) c write(*,*) 'success reset:',index return end