Adam's changes to avoid wrong XG.. or ..GX sequence input
authorCezary Czaplewski <czarek@cell.kias.re.kr>
Fri, 4 Mar 2016 07:36:50 +0000 (16:36 +0900)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 4 Mar 2016 07:56:52 +0000 (08:56 +0100)
source/unres/src_MD/energy_p_new_barrier.F
source/unres/src_MD/geomout.F
source/unres/src_MD/readrtns.F

index 9c25867..fbc4791 100644 (file)
@@ -1679,9 +1679,10 @@ c     &        " eps3rt",eps3rt," eps1",eps1," e1",e1," e2",e2
      &        evdwij
             endif
 
-            if (energy_dec) write (iout,'(a6,2i5,0pf7.3)') 
-     &                        'evdw',i,j,evdwij
-
+            if (energy_dec) then
+              write (iout,'(a6,2i5,0pf7.3)') 'evdw',i,j,evdwij
+              call flush(iout)
+            endif
 C Calculate gradient components.
             e1=e1*eps1*eps2rt**2*eps3rt**2
             fac=-expon*(e1+evdwij)*rij_shift
@@ -4513,9 +4514,12 @@ c
             diff=vbld(i+nres)-vbldsc0(1,iti)
 c            write (iout,*) i,iti,vbld(i+nres),vbldsc0(1,iti),diff,
 c     &      AKSC(1,iti),AKSC(1,iti)*diff*diff
-            if (energy_dec)  write (iout,*) 
-     &      "estr sc",i,iti,vbld(i+nres),vbldsc0(1,iti),diff,
-     &      AKSC(1,iti),AKSC(1,iti)*diff*diff
+            if (energy_dec)  then
+              write (iout,*) 
+     &         "estr sc",i,iti,vbld(i+nres),vbldsc0(1,iti),diff,
+     &         AKSC(1,iti),AKSC(1,iti)*diff*diff
+              call flush(iout)
+            endif
             estr=estr+0.5d0*AKSC(1,iti)*diff*diff
             do j=1,3
               gradbx(j,i)=AKSC(1,iti)*diff*dc(j,i+nres)/vbld(i+nres)
@@ -4806,7 +4810,7 @@ C
           sinkt(k)=dsin(k*theti2)
         enddo
 C        if (i.gt.3) then
-         if (i.gt.3 .and. itype(i-3).ne.ntyp1) then
+        if (i.gt.3 .and. itype(imax0(i-3,1)).ne.ntyp1) then
 #ifdef OSF
           phii=phi(i)
           if (phii.ne.phii) phii=150.0
index 81f8db4..f27391b 100644 (file)
@@ -9,7 +9,7 @@
       include 'COMMON.SBRIDGE'
       include 'COMMON.DISTFIT'
       include 'COMMON.MD'
-      character*50 tytul
+      character*(*) tytul
       dimension ica(maxres)
       write (iunit,'(3a,1pe15.5)') 'REMARK ',tytul,' ENERGY ',etot
 cmodel      write (iunit,'(a5,i6)') 'MODEL',1
index b861fdb..29253b3 100644 (file)
@@ -956,6 +956,20 @@ C Convert sequence to numeric code
         do i=1,nres
           itype(i)=rescode(i,sequence(i),iscode)
         enddo
+        if (itype(2).eq.10) then
+          write (iout,*) 
+     &     "Glycine is the first full residue, initial dummy deleted"
+          do i=1,nres
+            itype(i)=itype(i+1)
+          enddo
+          nres=nres-1
+        endif
+        if (itype(nres).eq.10) then
+          write (iout,*) 
+     &     "Glycine is the last full residue, terminal dummy deleted"
+          nres=nres-1
+        endif
+
 C Assign initial virtual bond lengths
         do i=2,nres
           vbld(i)=vbl