corrections
[unres.git] / source / unres / src-HCD-5D / test.F
index ac867d9..1ea11ab 100644 (file)
@@ -8,7 +8,7 @@
       include 'COMMON.VAR'
       include 'COMMON.INTERACT'
       include 'COMMON.IOUNITS'
-      include 'COMMON.DISTFIT'
+c      include 'COMMON.DISTFIT'
       include 'COMMON.SBRIDGE'
       include 'COMMON.CONTROL'
       include 'COMMON.FFIELD'
@@ -129,7 +129,7 @@ c       call write_pdb(999,'full min',etot)
       include 'COMMON.VAR'
       include 'COMMON.INTERACT'
       include 'COMMON.IOUNITS'
-      include 'COMMON.DISTFIT'
+c      include 'COMMON.DISTFIT'
       include 'COMMON.SBRIDGE'
       include 'COMMON.CONTROL'
       include 'COMMON.FFIELD'
@@ -324,7 +324,7 @@ c------------------------------------------
       include 'COMMON.FFIELD'
       include 'COMMON.MINIM'
 c
-      include 'COMMON.DISTFIT'       
+c      include 'COMMON.DISTFIT'       
       integer if(20,maxres),nif,ifa(20)
       integer ibc(0:maxres,0:maxres),istrand(20)
       integer ibd(maxres),ifb(10,2),nifb,lifb(10),lifb0
@@ -1032,7 +1032,7 @@ c--------------------------------------------------------
       include 'COMMON.FFIELD'
       include 'COMMON.MINIM'
 c
-      include 'COMMON.DISTFIT'       
+c      include 'COMMON.DISTFIT'       
       integer if(3,maxres),nif
       integer ibc(maxres,maxres),istrand(20)
       integer ibd(maxres),ifb(10,2),nifb,lifb(10),lifb0
@@ -1225,7 +1225,7 @@ c
       include 'COMMON.FFIELD'
       include 'COMMON.MINIM'
 c
-      include 'COMMON.DISTFIT'       
+c      include 'COMMON.DISTFIT'       
       integer if(2,2),ind
       integer iff(maxres)
       double precision time0,time1
@@ -1359,11 +1359,11 @@ c-------------------------------------------------
       include 'DIMENSIONS'
       include 'COMMON.CHAIN'
       include 'COMMON.IOUNITS'
-      include 'COMMON.DISTFIT'
+c      include 'COMMON.DISTFIT'
 
-      integer ncont,icont(2,maxres*maxres/2),isec(maxres,3)
+      integer ncont,icont(2,maxres*maxint_res),isec(maxres,3)
       logical lprint,not_done
-      real dcont(maxres*maxres/2),d
+      real dcont(maxres*maxint_res),d
       real rcomp /7.0/ 
       real rbeta /5.2/
       real ralfa /5.2/
@@ -1709,152 +1709,3 @@ c----------------------------------------------------------------------------
       end
 
 c-----------------------------------------------------------
-      subroutine contact_cp2(var,var2,iff,ieval,in_pdb)
-      implicit real*8 (a-h,o-z)
-      include 'DIMENSIONS'
-#ifdef MPI
-      include 'mpif.h'
-#endif
-      include 'COMMON.SBRIDGE'
-      include 'COMMON.FFIELD'
-      include 'COMMON.IOUNITS'
-      include 'COMMON.DISTFIT'
-      include 'COMMON.VAR'
-      include 'COMMON.CHAIN'
-      include 'COMMON.MINIM'
-
-      character*50 linia
-      integer nf,ij(4)
-      double precision var(maxvar),var2(maxvar)
-      double precision time0,time1
-      integer iff(maxres),ieval      
-      double precision theta1(maxres),phi1(maxres),alph1(maxres),     
-     &                 omeg1(maxres)                             
-      
-
-       call var_to_geom(nvar,var)
-       call chainbuild                                                           
-       nhpb0=nhpb
-       ind=0                                                                     
-       do i=1,nres-3                                                             
-         do j=i+3,nres                                                           
-          ind=ind+1                                                              
-          if ( iff(i).eq.1.and.iff(j).eq.1 ) then                                           
-            d0(ind)=DIST(i,j)                                                     
-            w(ind)=10.0                                                           
-            nhpb=nhpb+1                                                           
-            ihpb(nhpb)=i                                                          
-            jhpb(nhpb)=j                                                          
-            forcon(nhpb)=10.0                                                     
-            dhpb(nhpb)=d0(ind)                                                    
-          else
-            w(ind)=0.0
-          endif                                                                  
-         enddo                                                                   
-       enddo                                    
-       call hpb_partition
-
-       do i=1,nres                                                               
-        theta1(i)=theta(i)                                                      
-        phi1(i)=phi(i)                                                          
-        alph1(i)=alph(i)                                                        
-        omeg1(i)=omeg(i)                                                        
-       enddo                      
-
-       call var_to_geom(nvar,var2)
-
-       do i=1,nres                                                             
-          if ( iff(i).eq.1 ) then                                           
-              theta(i)=theta1(i)                                                      
-              phi(i)=phi1(i)                                                          
-              alph(i)=alph1(i)                                                        
-              omeg(i)=omeg1(i)                       
-          endif
-       enddo
-
-       call chainbuild
-cd       call write_pdb(3,'combined structure',0d0)
-cd       time0=MPI_WTIME()
-       
-       NX=NRES-3                                                                 
-       NY=((NRES-4)*(NRES-5))/2 
-       call distfit(.true.,200)
-   
-cd       time1=MPI_WTIME()
-cd       write (iout,'(a,f6.2,a)') ' Time for distfit ',time1-time0,' sec'
-
-       ipot0=ipot
-       maxmin0=maxmin
-       maxfun0=maxfun
-       wstrain0=wstrain
-
-       ipot=6
-       maxmin=2000
-       maxfun=5000
-       call geom_to_var(nvar,var)
-cd       time0=MPI_WTIME()
-       call minimize(etot,var,iretcode,nfun)                               
-       write(iout,*)'SUMSL return code is',iretcode,' eval SOFT',nfun   
-
-cd       time1=MPI_WTIME()
-cd       write (iout,'(a,f6.2,f8.2,a)')' Time for soft min.',time1-time0,
-cd     &         nfun/(time1-time0),' SOFT eval/s'
-        call var_to_geom(nvar,var)
-        call chainbuild
-
-
-        iwsk=0
-        nf=0
-        if (iff(1).eq.1) then
-          iwsk=1
-          nf=nf+1
-          ij(nf)=0
-        endif
-        do i=2,nres
-           if ( iwsk.eq.0.and.iff(i-1).eq.0.and.iff(i).eq.1 ) then
-             iwsk=1
-             nf=nf+1
-             ij(nf)=i
-           endif
-           if ( iwsk.eq.1.and.iff(i-1).eq.1.and.iff(i).eq.0 ) then
-             iwsk=0
-             nf=nf+1
-             ij(nf)=i-1
-           endif
-        enddo
-        if (iff(nres).eq.1) then
-          nf=nf+1
-          ij(nf)=nres
-        endif
-
-
-cd        write(linia,'(a6,i3,a1,i3,a1,i3,a1,i3)')
-cd     &                     "select",ij(1),"-",ij(2),
-cd     &                         ",",ij(3),"-",ij(4)
-cd        call write_pdb(in_pdb,linia,etot)
-
-
-       ipot=ipot0
-       maxmin=maxmin0
-       maxfun=maxfun0
-cd       time0=MPI_WTIME()
-       call minimize(etot,var,iretcode,nfun)
-cd       write(iout,*)'SUMSL DIST return code is',iretcode,' eval ',nfun
-       ieval=nfun
-
-cd       time1=MPI_WTIME()
-cd       write (iout,'(a,f6.2,f8.2,a)')' Time for DIST min.',time1-time0,
-cd     &         nfun/(time1-time0),' eval/s'
-cd       call var_to_geom(nvar,var)
-cd       call chainbuild
-cd       call write_pdb(6,'dist structure',etot)
-
-
-       nhpb= nhpb0                                                                  
-       link_start=1                                                            
-       link_end=nhpb     
-       wstrain=wstrain0
-
-       return
-       end
-c-----------------------------------------------------------