From: czarek Date: Sun, 27 Feb 2022 21:07:15 +0000 (+0100) Subject: dist1cut X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?p=unres.git;a=commitdiff_plain;h=8bb1cdb2042196e72a125024b254c96a72d7c7ef dist1cut --- diff --git a/source/cluster/wham/src-HCD-5D/COMMON.HOMOLOGY b/source/cluster/wham/src-HCD-5D/COMMON.HOMOLOGY index d149f8d..e0cb0cf 100644 --- a/source/cluster/wham/src-HCD-5D/COMMON.HOMOLOGY +++ b/source/cluster/wham/src-HCD-5D/COMMON.HOMOLOGY @@ -1,8 +1,8 @@ - logical l_homo + logical l_homo,dist1cut integer iset,ihset real*8 waga_homology real*8 waga_dist, waga_angle, waga_theta, waga_d, dist_cut, & dist2_cut common /homol/ waga_homology(10), & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,dist2_cut, - & iset,ihset,l_homo(max_template,maxdim_cont) + & iset,ihset,l_homo(max_template,maxdim_cont),dist1cut diff --git a/source/cluster/wham/src-HCD-5D/read_constr_homology.F b/source/cluster/wham/src-HCD-5D/read_constr_homology.F index 2a8f127..c8b3cf0 100644 --- a/source/cluster/wham/src-HCD-5D/read_constr_homology.F +++ b/source/cluster/wham/src-HCD-5D/read_constr_homology.F @@ -60,6 +60,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) call readi(controlcard,"IHSET",ihset,1) @@ -220,7 +221,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 @@ -260,6 +273,7 @@ c & constr_homology ct ii=ii+1 ct l_homo(k,ii)=.false. endif + endif enddo enddo lim_odl=ii diff --git a/source/unres/src-HCD-5D/COMMON.CONTROL b/source/unres/src-HCD-5D/COMMON.CONTROL index 32ecc93..77f008a 100644 --- a/source/unres/src-HCD-5D/COMMON.CONTROL +++ b/source/unres/src-HCD-5D/COMMON.CONTROL @@ -12,7 +12,8 @@ & out_int,vdisulf,searchsc,lmuca,dccart,extconf,out1file,gmatout, & gnorm_check,gradout,split_ene,with_theta_constr, & with_dihed_constr,read2sigma,start_from_model,read_homol_frag, - & out_template_coord,out_template_restr,usampl,loc_qlike,adaptive + & out_template_coord,out_template_restr,usampl,loc_qlike,adaptive, + & dist1cut double precision aincr common /cntrl/ aincr,modecalc,iscode,indpdb,indback,indphi, & iranconf, @@ -21,7 +22,8 @@ & unres_pdb,out_cart,out_int,vdisulf,searchsc,lmuca,dccart,mucadyn, & extconf,out1file,gmatout,selfguide,AFMlog,shield_mode,tor_mode, & tubelog,constr_dist,gnorm_check,gradout,split_ene, - & with_theta_constr,with_dihed_constr,symetr,npermut,usampl,loc_ - & qlike, + & with_theta_constr,with_dihed_constr,symetr,npermut,usampl, + & loc_qlike, + & dist1cut, & adaptive,constr_homology,homol_nset,read2sigma,start_from_model, & read_homol_frag,out_template_coord,out_template_restr diff --git a/source/unres/src-HCD-5D/readrtns_CSA.F b/source/unres/src-HCD-5D/readrtns_CSA.F index aeafdc3..afad609 100644 --- a/source/unres/src-HCD-5D/readrtns_CSA.F +++ b/source/unres/src-HCD-5D/readrtns_CSA.F @@ -3105,6 +3105,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) start_from_model=(index(controlcard,'START_FROM_MODELS').gt.0) @@ -3247,7 +3248,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 @@ -3287,6 +3300,7 @@ c & constr_homology c ii=ii+1 c l_homo(k,ii)=.false. endif + endif enddo enddo lim_odl=ii diff --git a/source/wham/src-HCD-5D/COMMON.HOMOLOGY b/source/wham/src-HCD-5D/COMMON.HOMOLOGY index ea57f19..22ba0db 100644 --- a/source/wham/src-HCD-5D/COMMON.HOMOLOGY +++ b/source/wham/src-HCD-5D/COMMON.HOMOLOGY @@ -1,8 +1,8 @@ - logical l_homo + logical l_homo,dist1cut integer iset,ihset real*8 waga_homology real*8 waga_dist, waga_angle, waga_theta, waga_d, dist_cut, & dist2_cut common /homol/ waga_homology(maxR), & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,dist2_cut, - & iset,ihset,l_homo(max_template,maxdim_cont) + & iset,ihset,l_homo(max_template,maxdim_cont),dist1cut \ No newline at end of file diff --git a/source/wham/src-HCD-5D/read_constr_homology.F b/source/wham/src-HCD-5D/read_constr_homology.F index 239a49e..042e920 100644 --- a/source/wham/src-HCD-5D/read_constr_homology.F +++ b/source/wham/src-HCD-5D/read_constr_homology.F @@ -63,6 +63,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) call readi(controlcard,"IHSET",ihset,1) @@ -222,7 +223,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 @@ -262,6 +275,7 @@ c & constr_homology ct ii=ii+1 ct l_homo(k,ii)=.false. endif + endif enddo enddo lim_odl=ii