Merge branch 'adasko' into devel
authorAdam Sieradzan <adasko@piasek2.(none)>
Tue, 5 Nov 2013 13:51:57 +0000 (14:51 +0100)
committerAdam Sieradzan <adasko@piasek2.(none)>
Tue, 5 Nov 2013 13:51:57 +0000 (14:51 +0100)
Conflicts:
source/unres/src_MD/Makefile

1  2 
source/unres/src_MD/CMakeLists.txt
source/unres/src_MD/readrtns.F

@@@ -161,11 -161,6 +161,11 @@@ elseif (Fortran_COMPILER_NAME STREQUAL 
    set(FFLAGS2 "-std=legacy -I. ")
    #set(FFLAGS3 "-c -w -O3 -ipo -ipo_obj -opt_report" )
    set(FFLAGS3 "-std=legacy -I. " )
 +elseif (Fortran_COMPILER_NAME STREQUAL "g77")
 +  set(FFLAGS0 "-I ${CMAKE_CURRENT_SOURCE_DIR} " ) 
 +  set(FFLAGS1 "-g -I ${CMAKE_CURRENT_SOURCE_DIR} " ) 
 +  set(FFLAGS2 "-I ${CMAKE_CURRENT_SOURCE_DIR} ")
 +  set(FFLAGS3 "-I ${CMAKE_CURRENT_SOURCE_DIR} " )
  endif (Fortran_COMPILER_NAME STREQUAL "ifort")
  
  
@@@ -187,14 -182,14 +187,14 @@@ set_property(SOURCE ${UNRES_MD_SRC3} PR
  #=========================================
  if(UNRES_MD_FF STREQUAL "GAB" )
    # set preprocesor flags   
-   set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" )
+   set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DCRYST_BOND -DCRYST_THETA -DCRYST_SC -DSCCORPDB" )
  
  #=========================================
  #  Settings for E0LL2Y force field
  #=========================================
  elseif(UNRES_MD_FF STREQUAL "E0LL2Y")
    # set preprocesor flags   
-   set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0" )
+   set(CPPFLAGS "PROCOR -DUNRES -DISNAN -DSPLITELE -DLANG0 -DSCCORPDB" )
  endif(UNRES_MD_FF STREQUAL "GAB")
  
  #=========================================
@@@ -217,9 -212,6 +217,9 @@@ elseif (Fortran_COMPILER_NAME STREQUAL 
  elseif (Fortran_COMPILER_NAME STREQUAL "gfortran")
    # Add old gfortran flags
    set(CPPFLAGS "${CPPFLAGS} -DG77") 
 +elseif (Fortran_COMPILER_NAME STREQUAL "g77")
 +  # Add old gfortran flags
 +  set(CPPFLAGS "${CPPFLAGS} -DG77")
  else(Fortran_COMPILER_NAME STREQUAL "ifort")
    # Default preprocessor flag
    set(CPPFLAGS "${CPPFLAGS} -DPGI")
@@@ -972,9 -972,9 +972,9 @@@ c      print *,nre
  c      print '(20i4)',(itype(i),i=1,nres)
        do i=1,nres
  #ifdef PROCOR
-         if (itype(i).eq.21 .or. itype(i+1).eq.21) then
+         if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then
  #else
-         if (itype(i).eq.21) then
+         if (itype(i).eq.ntyp1) then
  #endif
            itel(i)=0
  #ifdef PROCOR
@@@ -1037,8 -1037,8 +1037,8 @@@ C 8/13/98 Set limits to generating the 
  #endif
        nct=nres
  cd      print *,'NNT=',NNT,' NCT=',NCT
-       if (itype(1).eq.21) nnt=2
-       if (itype(nres).eq.21) nct=nct-1
+       if (itype(1).eq.ntyp1) nnt=2
+       if (itype(nres).eq.ntyp1) nct=nct-1
        if (pdbref) then
          if(me.eq.king.or..not.out1file)
       &   write (iout,'(a,i3)') 'nsup=',nsup
@@@ -1952,12 -1952,7 +1952,12 @@@ c--------------------------------------
        do i=1,dim
          tablica(i)=default
        enddo
 +#ifdef G77
 +      aux=lancuch(:ilen(lancuch))//"="        
 +      iread=index(rekord,aux)
 +#else
        iread=index(rekord,lancuch(:ilen(lancuch))//"=")
 +#endif
        if (iread.eq.0) return
        iread=iread+ilen(lancuch)+1
        read (rekord(iread:),*,end=10,err=10) (tablica(i),i=1,dim)
@@@ -1975,12 -1970,7 +1975,12 @@@ c--------------------------------------
        do i=1,dim
          tablica(i)=default
        enddo
 +#ifdef G77
 +      aux=lancuch(:ilen(lancuch))//"="
 +      iread=index(rekord,aux)
 +#else
        iread=index(rekord,lancuch(:ilen(lancuch))//"=")
 +#endif
        if (iread.eq.0) return
        iread=iread+ilen(lancuch)+1
        read (rekord(iread:),*,end=10,err=10) (tablica(i),i=1,dim)
@@@ -2621,14 -2611,12 +2621,14 @@@ c--------------------------------------
        include "DIMENSIONS"
        include "COMMON.IOUNITS"
        character*(*) source
 +      character* 256 tmpfile
        integer ilen
        external ilen
 +      tmpfile=source(:ilen(source))
        write (*,*) "Moving ",source(:ilen(source)),
       & " from temporary directory to working directory"
 -      write (*,*) "/bin/mv "//source(:ilen(source))//" "//curdir
 -      call system("/bin/mv "//source(:ilen(source))//" "//curdir)
 +      write (*,*) "/bin/mv "//tmpfile//" "//curdir
 +      call system("/bin/mv "//tmpfile//" "//curdir)
        return
        end
  c------------------------------------------------------------------------------