bug fix for nares
[unres4.git] / source / unres / energy.F90
index 6c60e98..9d59ebc 100644 (file)
           weights_(41)=wcatcat
           weights_(42)=wcatprot
           weights_(46)=wscbase
-          weights_(47)=wscpho
-          weights_(48)=wpeppho
+          weights_(47)=wpepbase
+          weights_(48)=wscpho
+          weights_(49)=wpeppho
 !          wcatcat= weights(41)
 !          wcatprot=weights(42)
 
           wcatcat= weights(41)
           wcatprot=weights(42)
           wscbase=weights(46)
-          wscpho=weights(47)
-          wpeppho=weights(48)
+          wpepbase=weights(47)
+          wscpho=weights(48)
+          wpeppho=weights(49)
 !      welpsb=weights(28)*fact(1)
 !
 !      wcorr_nucl= weights(37)*fact(1)
       wcorr3_nucl=weights(38)*fact(2)
       wtor_nucl=  weights(35)*fact(1)
       wtor_d_nucl=weights(36)*fact(2)
-
+      wpepbase=weights(47)*fact(1)
       return
       end subroutine rescale_weights
 !-----------------------------------------------------------------------------
       integer :: i,j
       
       if(nres.lt.100) then
-        maxconts=nres
+        maxconts=10*nres
       elseif(nres.lt.200) then
-        maxconts=0.8*nres      ! Max. number of contacts per residue
+        maxconts=10*nres      ! Max. number of contacts per residue
       else
-        maxconts=0.6*nres ! (maxconts=maxres/4)
+        maxconts=10*nres ! (maxconts=maxres/4)
       endif
       maxcont=12*nres      ! Max. number of SC contacts
       maxvar=6*nres      ! Max. number of variables
       enddo
 !      IF ( (wcorr_nucl.gt.0.0d0.or.wcorr3_nucl.gt.0.0d0) .and.
        IF ( j.gt.i+1 .and.&
-          num_conti.le.maxconts) THEN
+          num_conti.le.maxcont) THEN
 !C
 !C Calculate the contact function. The ith column of the array JCONT will 
 !C contain the numbers of atoms that make contacts with the atom I (of numbers
 !C greater than I). The arrays FACONT and GACONT will contain the values of
 !C the contact function and its derivative.
-        r0ij=2.20D0*sigma(itypi,itypj)
+        r0ij=2.20D0*sigma_nucl(itypi,itypj)
 !c        write (2,*) "ij",i,j," rij",1.0d0/rij," r0ij",r0ij
         call gcont(rij,r0ij,1.0D0,0.2d0/r0ij,fcont,fprimcont)
 !c        write (2,*) "fcont",fcont
 
           if (num_conti.gt.maxconts) then
             write (iout,*) 'WARNING - max. # of contacts exceeded;',&
-                          ' will skip next contacts for this conf.'
+                          ' will skip next contacts for this conf.',maxconts
           else
             jcont_hb(num_conti,i)=j
 !c            write (iout,*) "num_conti",num_conti,