X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc-HCD-5D%2Freadrtns_CSA.F;h=4fbc0f121ae9ddd2625a465a0f9e359b9ca8a3cd;hb=ae315105cef83bbcab70e2778ef92459690ee784;hp=d76b29e0bf84b2232c41dc8c0975b47ccd4ce87a;hpb=57038e4bdff4cc9534106b25bfbd4b9a844d47fd;p=unres.git diff --git a/source/unres/src-HCD-5D/readrtns_CSA.F b/source/unres/src-HCD-5D/readrtns_CSA.F index d76b29e..4fbc0f1 100644 --- a/source/unres/src-HCD-5D/readrtns_CSA.F +++ b/source/unres/src-HCD-5D/readrtns_CSA.F @@ -741,7 +741,7 @@ C integer ilen external ilen integer iperm,tperm - integer i,j,ii,k,l,itrial,itmp,i1,i2,it1,it2,nres_temp + integer i,j,ii,k,l,itrial,itmp,i1,i2,it1,it2,nres_temp,itemp double precision sumv C C Read PDB structure if applicable @@ -1195,11 +1195,22 @@ c write (iout,*) "After read_dist_constr nhpb",nhpb enddo enddo else - if (me.eq.king .or. .not. out1file) +c itemp=nres +c nres=nres_temp +c call gen_rand_conf(itemp,*115) +c nmodel_start=nmodel_start+1 +c do i=1,2*nres +c do j=1,3 +c chomo(j,i,nmodel_start)=c(j,i) +c enddo +c enddo +c goto 116 + 115 if (me.eq.king .or. .not. out1file) & write (iout,'(a,2i5,1x,a)') & "Different number of residues",nres_temp,nres, & " model skipped." endif + 116 continue nres=nres_temp enddo 332 continue @@ -1228,11 +1239,16 @@ C initial geometry. read(inp,'(8f10.5)',end=36,err=36) & ((c(l,k),l=1,3),k=1,nres), & ((c(l,k+nres),l=1,3),k=nnt,nct) + if (nnt.gt.1) c(:,nres+1)=c(:,1) + if (nct.lt.nres) c(:,2*nres)=c(:,nres) c write (iout,*) "Exit READ_CART" c write (iout,'(8f10.5)') c & ((c(l,k),l=1,3),k=1,nres), c & ((c(l,k+nres),l=1,3),k=nnt,nct) call cartprint + do j=1,3 + dc(j,0)=c(j,1) + enddo do i=1,nres-1 do j=1,3 dc(j,i)=c(j,i+1)-c(j,i) @@ -1292,7 +1308,7 @@ c return enddo call bond_regular call chainbuild_extconf - else + else if (.not. start_from_model) then if(me.eq.king.or..not.out1file) & write (iout,'(a)') 'Random-generated initial geometry.' call bond_regular @@ -3053,7 +3069,8 @@ c double precision, dimension (max_template,maxres) :: rescore2 double precision, dimension (max_template,maxres) :: rescore3 double precision distal - character*24 pdbfile,tpl_k_rescore + character*24 tpl_k_rescore + character*256 pdbfile c ----------------------------------------------------------------- c Reading multiple PDB ref structures and calculation of retraints c not using pre-computed ones stored in files model_ki_{dist,angle} @@ -3132,6 +3149,7 @@ c do k=1,constr_homology read(inp,'(a)') pdbfile + pdbfiles_chomo(k)=pdbfile if(me.eq.king .or. .not. out1file) & write (iout,'(a,5x,a)') 'HOMOL: Opening PDB file', & pdbfile(:ilen(pdbfile)) @@ -3636,7 +3654,8 @@ c double precision rescore_tmp,x12,y12,z12,rescore2_tmp double precision, dimension (max_template,maxres) :: rescore double precision, dimension (max_template,maxres) :: rescore2 - character*24 pdbfile,tpl_k_rescore + character*24 tpl_k_rescore + character*256 pdbfile c c For new homol impl @@ -3646,6 +3665,7 @@ c call getenv("FRAGFILE",fragfile) open(ientin,file=fragfile,status="old",err=10) read(ientin,*) constr_homology,nclust + nmodel_start=constr_homology l_homo = .false. sigma_theta=0.0 sigma_d=0.0 @@ -3655,6 +3675,7 @@ c Read pdb files read(ientin,'(a)') pdbfile write (iout,'(a,5x,a)') 'KLAPAUCJUSZ: Opening PDB file', & pdbfile(:ilen(pdbfile)) + pdbfiles_chomo(k)=pdbfile open(ipdbin,file=pdbfile,status='old',err=33) goto 34 33 write (iout,'(a,5x,a)') 'Error opening PDB file',