double precision function rmsnat(jcon) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'sizesclu.dat' include 'DIMENSIONS.COMPAR' include 'COMMON.IOUNITS' include 'COMMON.CHAIN' include 'COMMON.INTERACT' include 'COMMON.VAR' include 'COMMON.CONTROL' double precision przes(3),obrot(3,3),cc(3,2*maxres), & ccref(3,2*maxres) logical non_conv integer ishif,i,j,resprzesun rminrms=10.0d10 rmsminsing=10d10 nperm=1 c write (iout,*) "tu2", nres,nsup,nperm noverlap=nres if (nres.gt.nsup+nnt-1) noverlap=nsup+nnt-1 c write (iout,*) "tu3,",noverlap do i=1,symetr nperm=nperm*i enddo do kkk=1,nperm nnsup=0 do i=1,noverlap if (itype(i).ne.ntyp1) then nnsup=nnsup+1 do j=1,3 cc(j,nnsup)=c(j,i) ccref(j,nnsup)=cref_pdb(j,i,kkk) enddo c write (iout,'(i5,3f10.5,5x,3f10.5)') c & nnsup,(cc(j,nnsup),j=1,3),(ccref(j,nnsup),j=1,3) endif enddo call fitsq(rms,cc(1,1),ccref(1,1),nnsup,przes,obrot,non_conv) if (non_conv) then print *,'Error: FITSQ non-convergent, jcon',jcon,i rms=1.0d10 else if (rms.lt.-1.0d-6) then print *,'Error: rms^2 = ',rms,jcon,i rms = 1.0d10 else if (rms.ge.1.0d-6 .and. rms.lt.0) then rms=0.0d0 endif if (rms.le.rminrms) rminrms=rms c write (iout,*) "kkk",kkk," rmsnat",rms , rminrms enddo rmsnat = dsqrt(rminrms) C write (iout,*) "analysys",rmsnat, anatemp C liczenie rmsdla pojedynczego lancucha return end c----------------------------------------------------------------------------- double precision function gyrate(jcon) implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'COMMON.INTERACT' include 'COMMON.CHAIN' double precision cen(3),rg do j=1,3 cen(j)=0.0d0 enddo do i=nnt,nct do j=1,3 cen(j)=cen(j)+c(j,i) enddo enddo do j=1,3 cen(j)=cen(j)/dble(nct-nnt+1) enddo rg = 0.0d0 do i = nnt, nct do j=1,3 rg = rg + (c(j,i)-cen(j))**2 enddo end do gyrate = dsqrt(rg/dble(nct-nnt+1)) return end