first and last GLY in seq gives correct energy in unres and wham
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Fri, 1 Apr 2016 19:25:39 +0000 (21:25 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Tue, 12 Apr 2016 16:58:05 +0000 (18:58 +0200)
Conflicts:

source/cluster/wham/src-M/readrtns.F

source/cluster/wham/src-M/readrtns.F
source/cluster/wham/src/readrtns.F
source/unres/src_MD/readrtns.F
source/wham/src/energy_p_new.F
source/wham/src/molread_zs.F

index 4c15495..666754f 100644 (file)
@@ -206,6 +206,19 @@ C Convert sequence to numeric code
       do i=1,nres
         itype(i)=rescode(i,sequence(i),iscode)
       enddo
+      if (itype(2).eq.10.and.itype(1).eq.ntyp1) 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-1).eq.10.and.itype(nres).eq.ntyp1) then
+        write (iout,*)
+     &   "Glycine is the last full residue, terminal dummy deleted"
+        nres=nres-1
+      endif
       print *,nres
       print '(20i4)',(itype(i),i=1,nres)
 
index 037eb1f..435cdb6 100644 (file)
@@ -275,7 +275,7 @@ C Convert sequence to numeric code
       do i=1,nres
         itype(i)=rescode(i,sequence(i),iscode)
       enddo
-      if (itype(2).eq.10) then
+      if (itype(2).eq.10.and.itype(1).eq.ntyp1) then
         write (iout,*)
      &   "Glycine is the first full residue, initial dummy deleted"
         do i=1,nres
@@ -283,7 +283,7 @@ C Convert sequence to numeric code
         enddo
         nres=nres-1
       endif
-      if (itype(nres).eq.10) then
+      if (itype(nres-1).eq.10.and.itype(nres).eq.ntyp1) then
         write (iout,*)
      &   "Glycine is the last full residue, terminal dummy deleted"
         nres=nres-1
index 622d68a..74ba3d8 100644 (file)
@@ -997,7 +997,7 @@ C Convert sequence to numeric code
         do i=1,nres
           itype(i)=rescode(i,sequence(i),iscode)
         enddo
-        if (itype(2).eq.10) then
+        if (itype(2).eq.10.and.itype(1).eq.ntyp1) then
           write (iout,*) 
      &     "Glycine is the first full residue, initial dummy deleted"
           do i=1,nres
@@ -1005,7 +1005,7 @@ C Convert sequence to numeric code
           enddo
           nres=nres-1
         endif
-        if (itype(nres).eq.10) then
+        if (itype(nres-1).eq.10.and.itype(nres).eq.ntyp1) then
           write (iout,*) 
      &     "Glycine is the last full residue, terminal dummy deleted"
           nres=nres-1
index 81abea5..78be320 100644 (file)
@@ -5228,6 +5228,7 @@ c      write (iout,*) "EBACK_SC_COR",itau_start,itau_end,nterm_sccor
       esccor=0.0D0
       do i=itau_start,itau_end
         esccor_ii=0.0D0
+        if ((itype(i-2).eq.ntyp1).or.(itype(i-1).eq.ntyp1)) cycle
         isccori=isccortyp(itype(i-2))
         isccori1=isccortyp(itype(i-1))
         phii=phi(i)
index 9c999cc..5ddff14 100644 (file)
@@ -57,7 +57,7 @@ C Convert sequence to numeric code
       do i=1,nres
         itype(i)=rescode(i,sequence(i),iscode)
       enddo
-      if (itype(2).eq.10) then
+      if (itype(2).eq.10.and.itype(1).eq.ntyp1) then
         write (iout,*)
      &   "Glycine is the first full residue, initial dummy deleted"
         do i=1,nres
@@ -65,7 +65,7 @@ C Convert sequence to numeric code
         enddo
         nres=nres-1
       endif
-      if (itype(nres).eq.10) then
+      if (itype(nres-1).eq.10.and.itype(nres).eq.ntyp1) then
         write (iout,*)
      &   "Glycine is the last full residue, terminal dummy deleted"
         nres=nres-1