X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2Freadrtns.F;h=38c79ccff38719c296501e2bd94f9ae649f9cd62;hb=5316f1d82cb17d390be734cefbfca809cc65dcc4;hp=c5dc889a90ace99b76a8b26af1fa0a39e314ba14;hpb=6faa406438bff5968dc4a386929745cfaf554352;p=unres.git diff --git a/source/unres/src_MD/readrtns.F b/source/unres/src_MD/readrtns.F index c5dc889..38c79cc 100644 --- a/source/unres/src_MD/readrtns.F +++ b/source/unres/src_MD/readrtns.F @@ -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. @@ -972,9 +972,9 @@ c print *,nres c print '(20i4)',(itype(i),i=1,nres) do i=1,nres #ifdef PROCOR - if (itype(i).eq.21 .or. itype(i+1).eq.21) then + if (itype(i).eq.ntyp1 .or. itype(i+1).eq.ntyp1) then #else - if (itype(i).eq.21) then + if (itype(i).eq.ntyp1) then #endif itel(i)=0 #ifdef PROCOR @@ -1037,8 +1037,8 @@ C 8/13/98 Set limits to generating the dihedral angles #endif nct=nres cd print *,'NNT=',NNT,' NCT=',NCT - if (itype(1).eq.21) nnt=2 - if (itype(nres).eq.21) nct=nct-1 + if (itype(1).eq.ntyp1) nnt=2 + if (itype(nres).eq.ntyp1) nct=nct-1 if (pdbref) then if(me.eq.king.or..not.out1file) & write (iout,'(a,i3)') 'nsup=',nsup @@ -1127,8 +1127,8 @@ czscore call geom_to_var(nvar,coord_exp_zs(1,1)) c write (iout,*) "constr_dist",constr_dist,nstart_sup,nsup if (constr_dist.gt.0) then call read_dist_constr - call hpb_partition endif + if (nhpb.gt.0) call hpb_partition c write (iout,*) "After read_dist_constr nhpb",nhpb c call flush(iout) if (indpdb.eq.0 .and. modecalc.ne.2 .and. modecalc.ne.4 @@ -1251,18 +1251,6 @@ C Generate distance constraints, if the PDB structure is to be regularized. write (iout,'(20i4)') (iss(i),i=1,ns) if (dyn_ss) then write(iout,*)"Running with dynamic disulfide-bond formation" - do i=nss+1,nhpb - ihpb(i-nss)=ihpb(i) - jhpb(i-nss)=jhpb(i) - forcon(i-nss)=forcon(i) - dhpb(i-nss)=dhpb(i) - enddo - nhpb=nhpb-nss - nss=0 - call hpb_partition - do i=1,ns - dyn_ss_mask(iss(i))=.true. - enddo else write (iout,'(/a/)') 'Pre-formed links are:' do i=1,nss @@ -1270,14 +1258,27 @@ C Generate distance constraints, if the PDB structure is to be regularized. i2=jhpb(i)-nres it1=itype(i1) it2=itype(i2) - if (me.eq.king.or..not.out1file) - & write (iout,'(2a,i3,3a,i3,a,3f10.3)') + write (iout,'(2a,i3,3a,i3,a,3f10.3)') & restyp(it1),'(',i1,') -- ',restyp(it2),'(',i2,')',dhpb(i), & ebr,forcon(i) enddo write (iout,'(a)') endif endif + if (ns.gt.0.and.dyn_ss) then + do i=nss+1,nhpb + ihpb(i-nss)=ihpb(i) + jhpb(i-nss)=jhpb(i) + forcon(i-nss)=forcon(i) + dhpb(i-nss)=dhpb(i) + enddo + nhpb=nhpb-nss + nss=0 + call hpb_partition + do i=1,ns + dyn_ss_mask(iss(i))=.true. + enddo + endif if (i2ndstr.gt.0) call secstrp2dihc c call geom_to_var(nvar,x) c call etotal(energia(0)) @@ -1356,7 +1357,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 @@ -1950,7 +1952,12 @@ c---------------------------------------------------------------------------- do i=1,dim tablica(i)=default enddo +#ifdef G77 + aux=lancuch(:ilen(lancuch))//"=" + iread=index(rekord,aux) +#else iread=index(rekord,lancuch(:ilen(lancuch))//"=") +#endif if (iread.eq.0) return iread=iread+ilen(lancuch)+1 read (rekord(iread:),*,end=10,err=10) (tablica(i),i=1,dim) @@ -1968,7 +1975,12 @@ c---------------------------------------------------------------------------- do i=1,dim tablica(i)=default enddo +#ifdef G77 + aux=lancuch(:ilen(lancuch))//"=" + iread=index(rekord,aux) +#else iread=index(rekord,lancuch(:ilen(lancuch))//"=") +#endif if (iread.eq.0) return iread=iread+ilen(lancuch)+1 read (rekord(iread:),*,end=10,err=10) (tablica(i),i=1,dim) @@ -2484,7 +2496,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 @@ -2609,12 +2621,14 @@ c------------------------------------------------------------------------------ include "DIMENSIONS" include "COMMON.IOUNITS" character*(*) source + character* 256 tmpfile integer ilen external ilen + tmpfile=source(:ilen(source)) write (*,*) "Moving ",source(:ilen(source)), & " from temporary directory to working directory" - write (*,*) "/bin/mv "//source(:ilen(source))//" "//curdir - call system("/bin/mv "//source(:ilen(source))//" "//curdir) + write (*,*) "/bin/mv "//tmpfile//" "//curdir + call system("/bin/mv "//tmpfile//" "//curdir) return end c------------------------------------------------------------------------------