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