Merge branch 'devel' of mmka:unres into devel
[unres.git] / source / wham / src-M / enecalc1.F
index b4de54c..8e4fa74 100644 (file)
@@ -347,6 +347,7 @@ c------------------------------------------------------------------------------
       include "COMMON.ENERGIES"
       include "COMMON.COMPAR"
       include "COMMON.PROT"
+      include "COMMON.CONTACTS1"
       character*64 nazwa
       character*80 bxname,cxname
       character*64 bprotfile_temp
@@ -361,6 +362,7 @@ c------------------------------------------------------------------------------
       integer ilen,iroof
       external ilen,iroof
       integer ir,ib,iparm
+      integer isecstr(maxres)
       write (licz2,'(bz,i2.2)') islice
       call opentmp(islice,ientout,bprotfile_temp)
       write (iout,*) "bprotfile_temp ",bprotfile_temp
@@ -459,8 +461,12 @@ c        write (iout,*) iR,ib,iparm,eini,efree
         iscore=0
 c        write (iout,*) "Calling conf_compar",i
 c        call flush(iout)
+         anatemp= 1.0d0/(beta_h(ib,iparm)*1.987D-3)
         if (indpdb.gt.0) then
           call conf_compar(i,.false.,.true.)
+c        else
+c            call elecont(.false.,ncont,icont,nnt,nct)
+c            call secondary2(.false.,.false.,ncont,icont,isecstr)
         endif
 c        write (iout,*) "Exit conf_compar",i
 c        call flush(iout)
@@ -717,7 +723,7 @@ c------------------------------------------------------------------------------
       endif
       call int_from_cart1(.false.)
       do j=nnt+1,nct
-        if (itype(j-1).ne.21 .and. itype(j).ne.21 .and. 
+        if (itype(j-1).ne.ntyp1 .and. itype(j).ne.ntyp1 .and. 
      &    (vbld(j).lt.2.0d0 .or. vbld(j).gt.5.0d0)) then
           if (iprint.gt.0) 
      &    write (iout,*) "Bad CA-CA bond length",j," ",vbld(j),
@@ -742,7 +748,7 @@ c------------------------------------------------------------------------------
       enddo
       do j=nnt,nct
         itj=itype(j)
-        if (itype(j).ne.10 .and.itype(j).ne.21 .and. 
+        if (itype(j).ne.10 .and.itype(j).ne.ntyp1 .and. 
      &     (vbld(nres+j)-dsc(iabs(itj))).gt.2.0d0) then
           if (iprint.gt.0) 
      &    write (iout,*) "Bad CA-SC bond length",j," ",vbld(nres+j),