unres_pdb last dummy residue corrected as in prerelease
authorCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 27 Apr 2016 17:39:14 +0000 (19:39 +0200)
committerCezary Czaplewski <czarek@chem.univ.gda.pl>
Wed, 27 Apr 2016 17:39:14 +0000 (19:39 +0200)
source/unres/src_MD/readpdb.F

index 745b256..042a20f 100644 (file)
@@ -165,11 +165,24 @@ C Calculate the CM of the last side chain.
       if (itype(nres).ne.10) then
         nres=nres+1
         itype(nres)=21
+        if (unres_pdb) then
+C 2/15/2013 by Adam: corrected insertion of the last dummy residue
+          call refsys(nres-3,nres-2,nres-1,e1,e2,e3,fail)
+          if (fail) then
+            e2(1)=0.0d0
+            e2(2)=1.0d0
+            e2(3)=0.0d0
+          endif
+          do j=1,3
+            c(j,nres)=c(j,nres-1)-3.8d0*e2(j)
+          enddo
+        else
         do j=1,3
           dcj=c(j,nres-2)-c(j,nres-3)
           c(j,nres)=c(j,nres-1)+dcj
           c(j,2*nres)=c(j,nres)
         enddo
+        endif
       endif
       do i=2,nres-1
         do j=1,3