first and last GLY in seq gives correct energy in unres and wham
[unres.git] / source / unres / src_MD / readrtns.F
index 332a2f7..fd00153 100644 (file)
@@ -940,8 +940,8 @@ C 10/03/12 Adam: Recalculate coordinates with new side chain positions
          call chainbuild
         endif  
 C Following 2 lines for diagnostics; comment out if not needed
-        write (iout,*) "After sideadd"
-        call intout
+c        write (iout,*) "After sideadd"
+c        call intout
       endif
       if (indpdb.eq.0) then
 C Read sequence if not taken from the pdb 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.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
+
 C Assign initial virtual bond lengths
         do i=2,nres
           vbld(i)=vbl
@@ -1357,7 +1371,8 @@ C Check whether the specified bridging residues are cystines.
 C Read preformed bridges.
       if (ns.gt.0) then
       read (inp,*) nss,(ihpb(i),jhpb(i),i=1,nss)
-      write (iout,*) 'nss=',nss,' ihpb,jhpb: ',(ihpb(i),jhpb(i),i=1,nss)
+      if(fg_rank.eq.0)
+     & write(iout,*)'nss=',nss,' ihpb,jhpb: ',(ihpb(i),jhpb(i),i=1,nss)
       if (nss.gt.0) then
         nhpb=nss
 C Check if the residues involved in bridges are in the specified list of
@@ -2485,7 +2500,7 @@ c        write (iout,*) i,ifrag_(1,i),ifrag_(2,i),wfrag_(i)
         if (wfrag_(i).gt.0.0d0) then
         do j=ifrag_(1,i),ifrag_(2,i)-1
           do k=j+1,ifrag_(2,i)
-            write (iout,*) "j",j," k",k
+c            write (iout,*) "j",j," k",k
             ddjk=dist(j,k)
             if (constr_dist.eq.1) then
             nhpb=nhpb+1