5/13/2012 by Adam
authorAdam Liwo <adam@matrix.chem.cornell.edu>
Sun, 13 May 2012 20:10:21 +0000 (16:10 -0400)
committerAdam Liwo <adam@matrix.chem.cornell.edu>
Sun, 13 May 2012 20:10:21 +0000 (16:10 -0400)
Minor bugs in the code related to distance restraints fixed: readrtns.F

bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe
bin/unres/MD/unres_ifort_MPICH_GAB.exe
source/unres/src_MD/cinfo.f
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/readrtns.F

index b5077e8..70fd7a9 100755 (executable)
Binary files a/bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe and b/bin/unres/MD/unres_ifort_MPICH_E0LL2Y.exe differ
index 39b0d89..2ffec15 100755 (executable)
Binary files a/bin/unres/MD/unres_ifort_MPICH_GAB.exe and b/bin/unres/MD/unres_ifort_MPICH_GAB.exe differ
index 63ead23..d2c1dce 100644 (file)
@@ -1,10 +1,10 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 2 5 54
+C 2 5 62
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 2.5 build 54'
-      write(iout,*)'compiled Sun May 13 01:59:53 2012'
+      write(iout,*)'Version 2.5 build 62'
+      write(iout,*)'compiled Sun May 13 16:07:22 2012'
       write(iout,*)'compiled by adam@matrix.chem.cornell.edu'
       write(iout,*)'OS name:    Linux '
       write(iout,*)'OS release: 2.6.34.9-69.fc13.x86_64 '
index e3c154e..3feefaa 100644 (file)
@@ -1038,7 +1038,7 @@ C------------------------------------------------------------------------
      & 'ESC=   ',1pE16.6,' WEIGHT=',1pD16.6,' (SC local)'/
      & 'ETORS= ',1pE16.6,' WEIGHT=',1pD16.6,' (torsional)'/
      & 'ETORSD=',1pE16.6,' WEIGHT=',1pD16.6,' (double torsional)'/
-     & 'EHBP=  ',1pE16.6,' WEIGHT=',1pD16.6,
+     & 'EHPB=  ',1pE16.6,' WEIGHT=',1pD16.6,
      & ' (SS bridges & dist. cnstr.)'/
      & 'ECORR4=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/
      & 'ECORR5=',1pE16.6,' WEIGHT=',1pD16.6,' (multi-body)'/
index 08d4125..8f70874 100644 (file)
@@ -1076,11 +1076,6 @@ czscore          call geom_to_var(nvar,coord_exp_zs(1,1))
           enddo
           call contact(.true.,ncont_ref,icont_ref,co)
         endif
-c        write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup
-        call flush(iout)
-        if (constr_dist.gt.0) call read_dist_constr
-c        write (iout,*) "After read_dist_constr nhpb",nhpb
-        call hpb_partition
         if(me.eq.king.or..not.out1file)
      &   write (iout,*) 'Contact order:',co
         if (pdbref) then
@@ -1097,6 +1092,13 @@ c        write (iout,*) "After read_dist_constr nhpb",nhpb
         enddo
         endif
       endif
+c        write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup
+      if (constr_dist.gt.0) then
+        call read_dist_constr
+        call hpb_partition
+      endif
+c      write (iout,*) "After read_dist_constr nhpb",nhpb
+      call flush(iout)
       if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4
      &    .and. modecalc.ne.8 .and. modecalc.ne.9 .and. 
      &    modecalc.ne.10) then
@@ -2402,6 +2404,18 @@ c      write (iout,*) "IPAIR"
 c      do i=1,npair_
 c        write (iout,*) i,ipair_(1,i),ipair_(2,i),wpair_(i)
 c      enddo
+      if (.not.refstr .and. nfrag.gt.0) then
+        write (iout,*) 
+     &  "ERROR: no reference structure to compute distance restraints"
+        write (iout,*)
+     &  "Restraints must be specified explicitly (NDIST=number)"
+        stop 
+      endif
+      if (nfrag.lt.2 .and. npair.gt.0) then 
+        write (iout,*) "ERROR: Less than 2 fragments specified",
+     &   " but distance restraints between pairs requested"
+        stop 
+      endif 
       call flush(iout)
       do i=1,nfrag_
         if (ifrag_(1,i).lt.nstart_sup) ifrag_(1,i)=nstart_sup
@@ -2491,7 +2505,7 @@ c        write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i)
 #ifdef MPI
       if (.not.out1file .or. me.eq.king) then
 #endif
-      do i=1,nhbp
+      do i=1,nhpb
           write (iout,'(a,3i5,2f8.2,i2,f10.1)') "+dist.constr ",
      &     i,ihpb(i),jhpb(i),dhpb(i),dhpb1(i),ibecarb(i),forcon(i)
       enddo