update new files
[unres.git] / source / wham / src-M-homology / promienie.f
1       subroutine promienie(*)
2       implicit none
3       include 'DIMENSIONS'
4       include 'DIMENSIONS.FREE'
5       include 'COMMON.CONTROL'
6       include 'COMMON.INTERACT'
7       include 'COMMON.IOUNITS'
8       include 'COMMON.CONTPAR'
9       include 'COMMON.LOCAL'
10       integer i,j
11       real*8 facont /1.569D0/  ! facont = (2/(1-sqrt(1-1/4)))**(1/6)
12       character*8 contfunc
13       character*8 contfuncid(5)/'GB','DIST','CEN','ODC','SIG'/
14       character*8 ucase
15       call getenv("CONTFUNC",contfunc)
16       contfunc=ucase(contfunc)
17       do icomparfunc=1,5
18         if (contfunc.eq.contfuncid(icomparfunc)) goto 10
19       enddo     
20    10 continue
21       write (iout,*) "Sidechain contact function is ",contfunc,
22      &  "icomparfunc",icomparfunc 
23       do i=1,ntyp
24         do j=1,ntyp
25           if (icomparfunc.lt.3) then
26             read(isidep1,*) chi_comp(i,j),chip_comp(i,j),sig_comp(i,j),
27      &       sc_cutoff(i,j)
28           else if (icomparfunc.lt.5) then
29             read(isidep1,*) sc_cutoff(i,j)
30           else if (icomparfunc.eq.5) then
31             sc_cutoff(i,j)=dsqrt(sigma0(i)**2+sigma0(j)**2)*facont
32           else
33             write (iout,*) "Error - Unknown contact function"
34             return1
35           endif
36         enddo
37       enddo
38       close (isidep1)
39       do i=1,ntyp1
40         if (i.eq.10 .or. i.eq.ntyp1) then
41           dsc_inv(i)=0.0d0
42         else
43           dsc_inv(i)=1.0d0/dsc(i)
44         endif
45       enddo
46       return
47       end