Merge branch 'devel' of mmka:unres into devel
authorDawid Jagiela <lightnir@chem.univ.gda.pl>
Sun, 5 Apr 2015 21:04:43 +0000 (23:04 +0200)
committerDawid Jagiela <lightnir@chem.univ.gda.pl>
Sun, 5 Apr 2015 21:04:43 +0000 (23:04 +0200)
bin/unres/MD/unres-mult-symetr_ifort_MPICH_E0LL2Y.exe [new file with mode: 0755]
source/unres/src_MD-M/arcos.f
source/unres/src_MD-M/checkder_p.F
source/unres/src_MD-M/cinfo.f
source/unres/src_MD-M/energy_p_new_barrier.F
source/unres/src_MD-M/lagrangian_lesyng.F
source/unres/src_MD-M/readrtns_CSA.F
source/unres/src_MD-M/refsys.f
source/unres/src_MD-M/unres.F

diff --git a/bin/unres/MD/unres-mult-symetr_ifort_MPICH_E0LL2Y.exe b/bin/unres/MD/unres-mult-symetr_ifort_MPICH_E0LL2Y.exe
new file mode 100755 (executable)
index 0000000..3128072
Binary files /dev/null and b/bin/unres/MD/unres-mult-symetr_ifort_MPICH_E0LL2Y.exe differ
index f054118..1e355ec 100644 (file)
@@ -1,4 +1,4 @@
-      FUNCTION ARCOS(X)
+      double precision FUNCTION ARCOS(X)
       implicit real*8 (a-h,o-z)
       include 'COMMON.GEO'
       IF (DABS(X).LT.1.0D0) GOTO 1
index 0539e48..b017e1c 100644 (file)
@@ -281,7 +281,7 @@ C Check the gradient of the energy in Cartesian coordinates.
 c      call intcartderiv
 c      call checkintcartgrad
       call zerograd
-      aincr=1.0D-5
+      aincr=10.0D-6
       write(iout,*) 'Calling CHECK_ECARTINT.'
       nf=0
       icall=0
@@ -362,6 +362,7 @@ c      call checkintcartgrad
       endif
       write (iout,'(/a/)') 'Gradient in virtual-bond and SC vectors'
       do i=0,nres
+        print *,i
         do j=1,3
          xx(j)=c(j,i+nres)
          ddc(j)=dc(j,i) 
index c1716e6..c7b5141 100644 (file)
@@ -1,32 +1,33 @@
 C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 2 3 3500
+C 0 40360 9
       subroutine cinfo
       include 'COMMON.IOUNITS'
       write(iout,*)'++++ Compile info ++++'
-      write(iout,*)'Version 2.3 build 3500'
-      write(iout,*)'compiled Wed Jun 18 15:52:43 2014'
-      write(iout,*)'compiled by czarek@piasek3'
+      write(iout,*)'Version 0.40360 build 9'
+      write(iout,*)'compiled Fri Jan 23 21:00:08 2015'
+      write(iout,*)'compiled by adam@mmka'
       write(iout,*)'OS name:    Linux '
-      write(iout,*)'OS release: 3.2.0-59-generic '
+      write(iout,*)'OS release: 3.2.0-72-generic '
       write(iout,*)'OS version:',
-     & ' #90-Ubuntu SMP Tue Jan 7 22:43:51 UTC 2014 '
+     & ' #107-Ubuntu SMP Thu Nov 6 14:24:01 UTC 2014 '
       write(iout,*)'flags:'
       write(iout,*)'INSTALL_DIR = /users/software/mpich-1.2.7p1_int...'
       write(iout,*)'FC= ifort'
-      write(iout,*)'OPT =  -O3 -ip -w'
-      write(iout,*)'CFLAGS = -DSGI -c'
-      write(iout,*)'FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include'
-      write(iout,*)'FFLAGS1 = -c -w -g -d2 -CA -CB -I$(INSTALL_DIR)...'
-      write(iout,*)'FFLAGS2 = -c -w -O0 -I$(INSTALL_DIR)/include'
-      write(iout,*)'FFLAGSE = -c -w -O3 -ipo -ipo_obj  -opt_report ...'
-      write(iout,*)'LIBS = -L$(INSTALL_DIR)/lib -lmpich ../../lib/x...'
+      write(iout,*)'OPT =  -O3 -ip '
+      write(iout,*)'FFLAGS = -c ${OPT} -I$(INSTALL_DIR)/include '
+      write(iout,*)'FFLAGS1 = -c  -g -CA -CB -I$(INSTALL_DIR)/inclu...'
+      write(iout,*)'FFLAGS2 = -c  -g -O0 -I$(INSTALL_DIR)/include  '
+      write(iout,*)'FFLAGSE = -c  -O3 -ipo  -opt_report -I$(INSTALL...'
+      write(iout,*)'LIBS = -L$(INSTALL_DIR)/lib -lmpich xdrf/libxdr...'
       write(iout,*)'ARCH = LINUX'
       write(iout,*)'PP = /lib/cpp -P'
       write(iout,*)'object = unres.o arcos.o cartprint.o chainbuild...'
-      write(iout,*)'GAB: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNRES ...'
-      write(iout,*)'GAB: BIN = ../../../bin/unres/MD-M/unres_ifort_...'
-      write(iout,*)'E0LL2Y: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DUNR...'
-      write(iout,*)'E0LL2Y: BIN = ../../../bin/unres/MD-M/unres_ifo...'
+      write(iout,*)'GAB: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD64 ...'
+      write(iout,*)'GAB: BIN = ../../../bin/unres/MD/unres-mult-sym...'
+      write(iout,*)'4P: CPPFLAGS = -DLINUX -DPGI -DAMD64 -DUNRES -D...'
+      write(iout,*)'4P: BIN = ../../../bin/unres/MD/unres-mult-syme...'
+      write(iout,*)'E0LL2Y: CPPFLAGS = -DPROCOR -DLINUX -DPGI -DAMD...'
+      write(iout,*)'E0LL2Y: BIN = ../../../bin/unres/MD/unres-mult-...'
       write(iout,*)'++++ End of compile info ++++'
       return
       end
index fa6c1de..e7199c4 100644 (file)
@@ -4574,7 +4574,9 @@ C
       logical lprn /.false./, lprn1 /.false./
       etheta=0.0D0
       do i=ithet_start,ithet_end
-        if (itype(i-1).eq.ntyp1) cycle
+        if ((itype(i-1).eq.ntyp1).or.(itype(i-2).eq.ntyp1).or.
+     &(itype(i).eq.ntyp1)) cycle
+C        print *,i,theta(i)
         if (iabs(itype(i+1)).eq.20) iblock=2
         if (iabs(itype(i+1)).ne.20) iblock=1
         dethetai=0.0d0
@@ -4586,7 +4588,9 @@ C
           coskt(k)=dcos(k*theti2)
           sinkt(k)=dsin(k*theti2)
         enddo
-        if (i.gt.3 .and. itype(i-2).ne.ntyp1) then
+C        print *,ethetai
+
+        if (i.gt.3 .and. itype(i-3).ne.ntyp1) then
 #ifdef OSF
           phii=phi(i)
           if (phii.ne.phii) phii=150.0
@@ -4601,13 +4605,13 @@ C propagation of chirality for glycine type
           enddo
         else
           phii=0.0d0
-          ityp1=nthetyp+1
           do k=1,nsingle
+          ityp1=ithetyp((itype(i-2)))
             cosph1(k)=0.0d0
             sinph1(k)=0.0d0
           enddo 
         endif
-        if (i.lt.nres .and. itype(i).ne.ntyp1) then
+        if (i.lt.nres .and. itype(i+1).ne.ntyp1) then
 #ifdef OSF
           phii1=phi(i+1)
           if (phii1.ne.phii1) phii1=150.0
@@ -4622,7 +4626,7 @@ C propagation of chirality for glycine type
           enddo
         else
           phii1=0.0d0
-          ityp3=nthetyp+1
+          ityp3=ithetyp((itype(i)))
           do k=1,nsingle
             cosph2(k)=0.0d0
             sinph2(k)=0.0d0
@@ -4672,6 +4676,7 @@ C propagation of chirality for glycine type
         enddo
         write(iout,*) "ethetai",ethetai
         endif
+C       print *,ethetai
         do m=1,ntheterm2
           do k=1,nsingle
             aux=bbthet(k,m,ityp1,ityp2,ityp3,iblock)*cosph1(k)
@@ -4692,10 +4697,16 @@ C propagation of chirality for glycine type
      &         ccthet(k,m,ityp1,ityp2,ityp3,iblock)," ddthet",
      &         ddthet(k,m,ityp1,ityp2,ityp3,iblock)," eethet",
      &         eethet(k,m,ityp1,ityp2,ityp3,iblock)," ethetai",ethetai
+C        print *,"tu",cosph1(k),sinph1(k),cosph2(k),sinph2(k)
           enddo
         enddo
+C        print *,"cosph1", (cosph1(k), k=1,nsingle)
+C        print *,"cosph2", (cosph2(k), k=1,nsingle)
+C        print *,"sinph1", (sinph1(k), k=1,nsingle)
+C        print *,"sinph2", (sinph2(k), k=1,nsingle)
         if (lprn)
      &  write(iout,*) "ethetai",ethetai
+C        print *,"tu",cosph1(k),sinph1(k),cosph2(k),sinph2(k)
         do m=1,ntheterm3
           do k=2,ndouble
             do l=1,k-1
@@ -4731,6 +4742,7 @@ C propagation of chirality for glycine type
         enddo
 10      continue
 c        lprn1=.true.
+C        print *,ethetai
         if (lprn1) 
      &    write (iout,'(i2,3f8.1,9h ethetai ,f10.5)') 
      &   i,theta(i)*rad2deg,phii*rad2deg,
@@ -4739,7 +4751,7 @@ c        lprn1=.false.
         etheta=etheta+ethetai
         if (i.gt.3) gloc(i-3,icg)=gloc(i-3,icg)+wang*dephii
         if (i.lt.nres) gloc(i-2,icg)=gloc(i-2,icg)+wang*dephii1
-        gloc(nphi+i-2,icg)=wang*dethetai
+        gloc(nphi+i-2,icg)=gloc(nphi+i-2,icg)+wang*dethetai
       enddo
       return
       end
index f8834ea..024c6d1 100644 (file)
@@ -476,7 +476,7 @@ c---------------------------------------------------------------------------
       include 'COMMON.TIME1'
       include 'COMMON.MD'
       double precision z(dimen3),d_a_tmp(dimen3),temp(maxres6),time00
-     &time01
+     &,time01,zcopy(dimen3)
 #ifdef MPI
       if (nfgtasks.gt.1) then
         if (fg_rank.eq.0) then
@@ -497,11 +497,12 @@ c        call MPI_Barrier(FG_COMM,IERROR)
         time00=MPI_Wtime()
         call MPI_Scatterv(z,ng_counts(0),ng_start(0),
      &    MPI_DOUBLE_PRECISION,
-     &    z,3*my_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERR)
+     &    zcopy,3*my_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERR)
 c        write (2,*) "My chunk of z"
-c        do i=1,3*my_ng_count
+        do i=1,3*my_ng_count
+          z(i)=zcopy(i)
 c          write (2,*) i,z(i)
-c        enddo
+        enddo
 c        write (2,*) "After SCATTERV"
 c        call flush(2)
 c        write (2,*) "MPI_Wtime",MPI_Wtime()
@@ -628,7 +629,7 @@ c---------------------------------------------------------------------------
       include 'COMMON.LANGEVIN.lang0'
 #endif
       double precision z(dimen3),d_a_tmp(dimen3),temp(maxres6),time00
-     &time01
+     &,time01,zcopy(dimen3)
 #ifdef MPI
       if (nfgtasks.gt.1) then
         if (fg_rank.eq.0) then
@@ -642,11 +643,12 @@ c        call MPI_Barrier(FG_COMM,IERROR)
         time00=MPI_Wtime()
         call MPI_Scatterv(z,ng_counts(0),ng_start(0),
      &    MPI_DOUBLE_PRECISION,
-     &    z,3*my_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERR)
+     &    zcopy,3*my_ng_count,MPI_DOUBLE_PRECISION,king,FG_COMM,IERR)
 c        write (2,*) "My chunk of z"
-c        do i=1,3*my_ng_count
+        do i=1,3*my_ng_count
+          z(i)=zcopy(i)
 c          write (2,*) i,z(i)
-c        enddo
+        enddo
         time_scatter=time_scatter+MPI_Wtime()-time00
 #ifdef TIMING
         time_scatter_fmatmult=time_scatter_fmatmult+MPI_Wtime()-time00
index f538a00..8dbd3fa 100644 (file)
@@ -722,9 +722,11 @@ C 12/1/95 Added weight for the multi-body term WCORR
   33    write (iout,'(a)') 'Error opening PDB file.'
         stop
   34    continue
-c        print *,'Begin reading pdb data'
+c        write (iout,*) 'Begin reading pdb data'
+c        call flush(iout)
         call readpdb
-c        print *,'Finished reading pdb data'
+c        write (iout,*) 'Finished reading pdb data'
+c        call flush(iout)
         if(me.eq.king.or..not.out1file)
      &   write (iout,'(a,i3,a,i3)')'nsup=',nsup,
      &   ' nstart_sup=',nstart_sup
index 86b0524..b57c201 100644 (file)
@@ -1,22 +1,22 @@
-      subroutine refsys(fail)
-c This subroutine calculates unit vectors of a local reference system
-c defined by atoms (i2), (i3), and (i4). The x axis is the axis from
+      subroutine refsys(i2,i3,i4,e1,e2,e3,fail)
+      implicit real*8 (a-h,o-z)
+      include 'DIMENSIONS'
+c this subroutine calculates unity vectors of a local reference system
+c defined by atoms (i2), (i3), and (i4). the x axis is the axis from
 c atom (i3) to atom (i2), and the xy plane is the plane defined by atoms
 c (i2), (i3), and (i4). z axis is directed according to the sign of the
-c vector product (i3)-(i2) and (i3)-(i4). Sets fail to .true. if atoms
+c vector product (i3)-(i2) and (i3)-(i4). sets fail to .true. if atoms
 c (i2) and (i3) or (i3) and (i4) coincide or atoms (i2), (i3), and (i4)
-c form a linear fragment. Returns vectors e1, e2, and e3.
-      implicit real*8 (a-h,o-z)
-      include 'DIMENSIONS'
+c form a linear fragment. returns vectors e1, e2, and e3.
       logical fail
       double precision e1(3),e2(3),e3(3)
       double precision u(3),z(3)
       include 'COMMON.IOUNITS'
-      include 'COMMON.CHAIN'
-      double precision coinc/1.0D-13/,align /1.0D-13/
+      include "COMMON.CHAIN"
+      data coinc /1.0d-13/,align /1.0d-13/
       fail=.false.
-      s1=0.0
-      s2=0.0
+      s1=0.0d0
+      s2=0.0d0
       do 1 i=1,3
       zi=c(i,i2)-c(i,i3)
       ui=c(i,i4)-c(i,i3)
@@ -29,28 +29,22 @@ c form a linear fragment. Returns vectors e1, e2, and e3.
       if (s1.gt.coinc) goto 2
       write (iout,1000) i2,i3,i1
       fail=.true.
-c     do 3 i=1,3
-c   3 c(i,i1)=0.0D0
       return
     2 if (s2.gt.coinc) goto 4
       write(iout,1000) i3,i4,i1
       fail=.true.
-      do 5 i=1,3
-    5 c(i,i1)=0.0D0
       return
     4 s1=1.0/s1
       s2=1.0/s2
       v1=z(2)*u(3)-z(3)*u(2)
       v2=z(3)*u(1)-z(1)*u(3)
       v3=z(1)*u(2)-z(2)*u(1)
-      anorm=dsqrt(v1*v1+v2*v2+v3*v3)
+      anorm=sqrt(v1*v1+v2*v2+v3*v3)
       if (anorm.gt.align) goto 6
       write (iout,1010) i2,i3,i4,i1
       fail=.true.
-c     do 7 i=1,3
-c   7 c(i,i1)=0.0D0
       return
-    6 anorm=1.0D0/anorm
+    6 anorm=1.0/anorm
       e3(1)=v1*anorm
       e3(2)=v2*anorm
       e3(3)=v3*anorm
@@ -60,9 +54,7 @@ c   7 c(i,i1)=0.0D0
       e2(1)=e1(3)*e3(2)-e1(2)*e3(3)
       e2(2)=e1(1)*e3(3)-e1(3)*e3(1)
       e2(3)=e1(2)*e3(1)-e1(1)*e3(2)
- 1000 format (/1x,' * * * Error - atoms',i4,' and',i4,' coincide.',
-     1 'coordinates of atom',i4,' are set to zero.')
- 1010 format (/1x,' * * * Error - atoms',2(i4,2h, ),i4,' form a linear',
-     1 ' fragment. coordinates of atom',i4,' are set to zero.')
+ 1000 format (/1x,' * * * error - atoms',i4,' and',i4,' coincide.')
+ 1010 format (/1x,' * * * error - atoms',2(i4,2h, ),i4,' form a linear')
       return
       end
index 0039fcc..537a965 100644 (file)
@@ -56,7 +56,6 @@ c      call memmon_print_usage()
       if (me.eq.king) call cinfo
 C Read force field parameters and job setup data
       call readrtns
-      call flush(iout)
 C
       if (me.eq.king .or. .not. out1file) then
        write (iout,'(2a/)') 
@@ -132,9 +131,15 @@ c--------------------------------------------------------------------------
       include 'COMMON.SETUP'
       include 'COMMON.CONTROL'
       include 'COMMON.IOUNITS'
-      if (me.eq.king .or. .not. out1file)
-     &   write (iout,*) "Calling chainbuild"
+c      if (me.eq.king .or. .not. out1file) then
+c        write (iout,*) "Calling chainbuild"
+c        call flush(iout)
+c      endif
       call chainbuild
+c      if (me.eq.king .or. .not. out1file) then
+c        write (iout,*) "Calling MD"
+c        call flush(iout)
+c      endif
       call MD
       return
       end