From 855057911aaa7d3d083c300f4a9b1e7323f5d7da Mon Sep 17 00:00:00 2001 From: Cezary Czaplewski Date: Fri, 18 Oct 2019 14:15:33 +0200 Subject: [PATCH] dist1cut wham & cluster --- source/cluster/wham/src-M/COMMON.CONTROL | 4 ++-- source/cluster/wham/src-M/readrtns.F | 16 +++++++++++++++- source/wham/src-M/COMMON.CONTROL | 5 +++-- source/wham/src-M/molread_zs.F | 16 +++++++++++++++- 4 files changed, 35 insertions(+), 6 deletions(-) diff --git a/source/cluster/wham/src-M/COMMON.CONTROL b/source/cluster/wham/src-M/COMMON.CONTROL index b6f1d92..bb11a5e 100644 --- a/source/cluster/wham/src-M/COMMON.CONTROL +++ b/source/cluster/wham/src-M/COMMON.CONTROL @@ -13,14 +13,14 @@ & with_dihed_constr,with_theta_constr,out1file, & print_homology_restraints, & print_contact_map,print_homology_models, - & read2sigma,l_homo,read_homol_frag + & read2sigma,l_homo,read_homol_frag,dist1cut common /cntrl/ betaT,iscode,indpdb,refstr,pdbref,outpdb,outmol2, & punch_dist,print_dist,caonly,lside,lprint_cart,lprint_int, & from_cart,from_bx,from_cx, with_dihed_constr,with_theta_constr, & efree,iopt,nstart,nend,symetr, & tor_mode,shield_mode, & constr_dist,out1file, - & constr_homology,homol_nset,read2sigma,read_homol_frag + & constr_homology,homol_nset,read2sigma,read_homol_frag,dist1cut common /homol/ waga_homology(10), & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,dist2_cut, & iset,ihset,l_homo(max_template,maxdim), diff --git a/source/cluster/wham/src-M/readrtns.F b/source/cluster/wham/src-M/readrtns.F index 7635d58..05d6f22 100644 --- a/source/cluster/wham/src-M/readrtns.F +++ b/source/cluster/wham/src-M/readrtns.F @@ -1229,6 +1229,7 @@ c Alternative: reading from input call reada(controlcard,"HOMOL_SCD",waga_d,1.0d0) ! new call reada(controlcard,'DIST_CUT',dist_cut,5.0d0) ! for diff ways of calc sigma call reada(controlcard,'DIST2_CUT',dist2_cut,9999.0d0) + dist1cut=(index(controlcard,'DIST1CUT').gt.0) call readi(controlcard,"HOMOL_NSET",homol_nset,1) read2sigma=(index(controlcard,'READ2SIGMA').gt.0) if (homol_nset.gt.1)then @@ -1389,7 +1390,19 @@ c write(iout,*) "rescore(",k,irec,") =",rescore(k,irec) z12=c(3,i)-c(3,j) distal=dsqrt(x12*x12+y12*y12+z12*z12) c write (iout,*) k,i,j,distal,dist2_cut - + if (dist1cut .and. k.gt.1) then + ii=ii+1 + if (l_homo(1,ii)) then + ii_in_use(ii)=1 + l_homo(k,ii)=.true. + ires_homo(ii)=i + jres_homo(ii)=j + odl(k,ii)=distal + sigma_odl(k,ii)=sigma_odl(1,ii) + else + l_homo(k,ii)=.false. + endif + else if (idomain(k,i).eq.idomain(k,j).and.idomain(k,i).ne.0 & .and. distal.le.dist2_cut ) then @@ -1429,6 +1442,7 @@ c & constr_homology ii=ii+1 l_homo(k,ii)=.false. endif + endif enddo enddo lim_odl=ii diff --git a/source/wham/src-M/COMMON.CONTROL b/source/wham/src-M/COMMON.CONTROL index d0a7a07..ec8917f 100644 --- a/source/wham/src-M/COMMON.CONTROL +++ b/source/wham/src-M/COMMON.CONTROL @@ -10,7 +10,7 @@ logical refstr,pdbref,punch_dist,print_rms,caonly,verbose, & merge_helices,bxfile,cxfile,histfile,entfile,zscfile, & rmsrgymap,with_dihed_constr,check_conf,histout,out1file, - & read2sigma,l_homo,with_theta_constr,read_homol_frag + & read2sigma,l_homo,with_theta_constr,read_homol_frag,dist1cut common /cntrl/ iscode,indpdb,refstr,pdbref,outpdb,outmol2, & punch_dist,print_rms,caonly,verbose,icomparfunc,pdbint, & merge_helices,bxfile,cxfile,histfile,entfile,zscfile,rmsrgymap, @@ -18,7 +18,8 @@ & with_theta_constr, & symetr, & constr_dist, - & constr_homology,out1file,homol_nset,read2sigma,read_homol_frag + & constr_homology,out1file,homol_nset,read2sigma,read_homol_frag, + & dist1cut common /homol/ waga_homology(maxR), & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,dist2_cut, & iset,ihset,l_homo(max_template,maxdim) diff --git a/source/wham/src-M/molread_zs.F b/source/wham/src-M/molread_zs.F index eeb7655..ed6a161 100644 --- a/source/wham/src-M/molread_zs.F +++ b/source/wham/src-M/molread_zs.F @@ -455,6 +455,7 @@ c Alternative: reading from input call reada(controlcard,"HOMOL_SCD",waga_d,1.0d0) ! new call reada(controlcard,'DIST_CUT',dist_cut,5.0d0) ! for diff ways of calc sigma call reada(controlcard,'DIST2_CUT',dist2_cut,9999.0d0) + dist1cut=(index(controlcard,'DIST1CUT').gt.0) call readi(controlcard,"HOMOL_SET",homol_nset,1) read2sigma=(index(controlcard,'READ2SIGMA').gt.0) call readi(controlcard,"IHSET",ihset,1) @@ -602,7 +603,19 @@ c write(iout,*) "rescore(",k,irec,") =",rescore(k,irec) z12=c(3,i)-c(3,j) distal=dsqrt(x12*x12+y12*y12+z12*z12) c write (iout,*) k,i,j,distal,dist2_cut - + if (dist1cut .and. k.gt.1) then + ii=ii+1 + if (l_homo(1,ii)) then + ii_in_use(ii)=1 + l_homo(k,ii)=.true. + ires_homo(ii)=i + jres_homo(ii)=j + odl(k,ii)=distal + sigma_odl(k,ii)=sigma_odl(1,ii) + else + l_homo(k,ii)=.false. + endif + else if (idomain(k,i).eq.idomain(k,j).and.idomain(k,i).ne.0 & .and. distal.le.dist2_cut ) then @@ -642,6 +655,7 @@ c & constr_homology ii=ii+1 l_homo(k,ii)=.false. endif + endif enddo enddo lim_odl=ii -- 1.7.9.5