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