wham and cluster_wham Adam's new constr_dist multichain
[unres.git] / source / unres / src_MD-M / diff12.f
1 cccccccccccccccccccccccccccccccccc
2       subroutine get_diff12(aarray,barray,diff)
3       implicit real*8 (a-h,o-z)
4       include 'DIMENSIONS'
5       include 'COMMON.CSA'
6       include 'COMMON.BANK'
7       include 'COMMON.CHAIN'
8       include 'COMMON.GEO'
9       dimension aarray(mxang,maxres,mxch),
10      & barray(mxang,maxres,mxch)
11
12       diff=0.d0
13       do k=1,numch
14        do j=2,nres-1
15 c       do i=1,4
16 c        do i=1,2
17         do i=1,ndiff
18          dif=rad2deg*dabs(aarray(i,j,k)-barray(i,j,k))
19          if(dif.gt.180.) dif=360.-dif
20          if (dif.gt.diffcut) diff=diff+dif
21         enddo
22        enddo
23       enddo
24
25       return
26       end
27 ccccccccccccccccccccccccccccccccccccccccccccccccc