From afa8f7f791bbefc676d7f344d7b4a655f7c29f47 Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Fri, 4 Mar 2016 16:36:50 +0900 Subject: [PATCH] Adam's changes to avoid wrong XG.. or ..GX sequence input --- source/unres/src_MD/energy_p_new_barrier.F | 18 +++++++++++------- source/unres/src_MD/geomout.F | 2 +- source/unres/src_MD/readrtns.F | 14 ++++++++++++++ 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/source/unres/src_MD/energy_p_new_barrier.F b/source/unres/src_MD/energy_p_new_barrier.F index 9c25867..fbc4791 100644 --- a/source/unres/src_MD/energy_p_new_barrier.F +++ b/source/unres/src_MD/energy_p_new_barrier.F @@ -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 diff --git a/source/unres/src_MD/geomout.F b/source/unres/src_MD/geomout.F index 81f8db4..f27391b 100644 --- a/source/unres/src_MD/geomout.F +++ b/source/unres/src_MD/geomout.F @@ -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 diff --git a/source/unres/src_MD/readrtns.F b/source/unres/src_MD/readrtns.F index b861fdb..29253b3 100644 --- a/source/unres/src_MD/readrtns.F +++ b/source/unres/src_MD/readrtns.F @@ -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 -- 1.7.9.5