From: Cezary Czaplewski Date: Thu, 25 Feb 2016 03:54:22 +0000 (+0900) Subject: Adam's changes from nostromo to wham with homology X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=commitdiff_plain;h=aa037b39c46474f358b050551261d7c5ac3d2357;p=unres.git Adam's changes from nostromo to wham with homology --- diff --git a/source/wham/src/COMMON.CONTROL b/source/wham/src/COMMON.CONTROL index ed0f98b..209c22a 100644 --- a/source/wham/src/COMMON.CONTROL +++ b/source/wham/src/COMMON.CONTROL @@ -1,6 +1,6 @@ integer iscode,indpdb,outpdb,outmol2,icomparfunc,pdbint, & ensembles,constr_dist,constr_homology,homol_nset, - & iset + & iset,ihset real*8 waga_homology real*8 waga_dist, waga_angle, waga_theta, waga_d, dist_cut logical refstr,pdbref,punch_dist,print_rms,caonly,verbose, @@ -11,5 +11,5 @@ & merge_helices,bxfile,cxfile,histfile,entfile,zscfile,rmsrgymap, & ensembles,with_dihed_constr,check_conf,histout,constr_dist, & constr_homology,out1file,homol_nset - common /homol/ waga_homology(MaxProcs/20), - & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,iset + common /homol/ waga_homology(maxR), + & waga_dist,waga_angle,waga_theta,waga_d,dist_cut,iset,ihset diff --git a/source/wham/src/COMMON.PROTFILES b/source/wham/src/COMMON.PROTFILES index 3287326..d758573 100644 --- a/source/wham/src/COMMON.PROTFILES +++ b/source/wham/src/COMMON.PROTFILES @@ -1,4 +1,4 @@ - character*80 protfiles(maxfile_prot,2,MaxR,MaxT_h,Max_Parm), + character*128 protfiles(maxfile_prot,2,MaxR,MaxT_h,Max_Parm), & bprotfiles integer nfile_bin(MaxR,MaxT_h,Max_Parm), & nfile_asc(MaxR,MaxT_h,Max_Parm), diff --git a/source/wham/src/DIMENSIONS.FREE b/source/wham/src/DIMENSIONS.FREE index 7d5a31e..85a618f 100644 --- a/source/wham/src/DIMENSIONS.FREE +++ b/source/wham/src/DIMENSIONS.FREE @@ -4,7 +4,7 @@ integer MaxSlice parameter (Max_Parm=32) parameter (MaxQ=4,MaxQ1=MaxQ+2) - parameter(MaxR=8,MaxT_h=32) + parameter(MaxR=32,MaxT_h=32) parameter(MaxSlice=40) integer MaxN parameter (MaxN=100) diff --git a/source/wham/src/bxread.F b/source/wham/src/bxread.F index bebf420..112d8ca 100644 --- a/source/wham/src/bxread.F +++ b/source/wham/src/bxread.F @@ -20,7 +20,8 @@ include "COMMON.FREE" include "COMMON.SBRIDGE" real*4 csingle(3,maxres2) - character*64 nazwa,bprotfile_temp + character*64 nazwa + character*128 bprotfile_temp character*3 liczba integer i,is,ie,j,ii,jj,k,kk,l,ll,mm,if,m integer nrec,nlines,iscor,islice diff --git a/source/wham/src/contact.f b/source/wham/src/contact.f index 5b05d57..f6909dd 100644 --- a/source/wham/src/contact.f +++ b/source/wham/src/contact.f @@ -2,6 +2,7 @@ implicit none include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.CONTROL' include 'COMMON.IOUNITS' include 'COMMON.CHAIN' diff --git a/source/wham/src/cxread.F b/source/wham/src/cxread.F index 5c6d751..d7dcbf8 100644 --- a/source/wham/src/cxread.F +++ b/source/wham/src/cxread.F @@ -18,7 +18,8 @@ include 'COMMON.VAR' include 'COMMON.GEO' include 'COMMON.PROT' - character*64 nazwa,bprotfile_temp + character*64 nazwa + character*128 bprotfile_temp real*4 rtime,rpotE,ruconst,rt_bath,rprop(maxQ) double precision time integer iret,itmp,itraj,ntraj diff --git a/source/wham/src/define_pairs.f b/source/wham/src/define_pairs.f index 00866a8..789575b 100644 --- a/source/wham/src/define_pairs.f +++ b/source/wham/src/define_pairs.f @@ -3,6 +3,7 @@ include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' include 'DIMENSIONS.COMPAR' + include 'DIMENSIONS.FREE' include 'COMMON.IOUNITS' include 'COMMON.TIME1' include 'COMMON.SBRIDGE' diff --git a/source/wham/src/enecalc1.F b/source/wham/src/enecalc1.F index 3d878ad..7f6f8d7 100644 --- a/source/wham/src/enecalc1.F +++ b/source/wham/src/enecalc1.F @@ -46,7 +46,7 @@ double precision tt integer snk_p(MaxR,MaxT_h,Max_parm) logical lerr - character*64 bprotfile_temp + character*128 bprotfile_temp integer scount_t(0:maxprocs-1) call opentmp(islice,ientout,bprotfile_temp) iii=0 @@ -165,10 +165,10 @@ c & " kfac",kfac,"quot",quot," fT",fT & wtor_d,wsccor,wbond #endif call etotal(energia(0),fT) - if (constr_homology) energia(0)=energia(0)+ + if (constr_homology.gt.0) energia(0)=energia(0)+ & waga_homology(iset)*energia(22) - write (iout,*) "constr_homology",constr_homology," iset",iset, - & " waga_homology",waga_homology(iset) +c write (iout,*) "constr_homology",constr_homology," iset",iset, +c & " waga_homology",waga_homology(iset) #ifdef DEBUG write (iout,*) "Conformation",i call enerprint(energia(0),fT) @@ -219,6 +219,8 @@ c call pdbout(ii+1,beta_h(ib,ipar),efree,energia(0),0.0d0,rmsdev) & 1.0d0/(1.987D-3*beta_h(ib,ipar)) #ifdef DEBUG call enerprint(energia(0),fT) +#endif +#ifdef DEBUG write (iout,'(4f10.5,2i5)') 0.0,energia(0),0.0, & 1.0d0/(beta_h(ib,ipar)*1.987D-3), & 0,0 diff --git a/source/wham/src/energy_p_new.F b/source/wham/src/energy_p_new.F index 5cfdcce..a954783 100644 --- a/source/wham/src/energy_p_new.F +++ b/source/wham/src/energy_p_new.F @@ -2,6 +2,7 @@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' #ifndef ISNAN external proc_proc @@ -133,7 +134,7 @@ c write (iout,*) "ft(6)",fact(6)," evdw",evdw," evdw_t",evdw_t & +wcorr6*fact(5)*ecorr6+wturn4*fact(3)*eello_turn4 & +wturn3*fact(2)*eello_turn3+wturn6*fact(5)*eturn6 & +wel_loc*fact(2)*eel_loc+edihcnstr+wtor_d*fact(2)*etors_d - & +wbond*estr+wsccor*fact(1)*esccor+ehomology_constr + & +wbond*estr+wsccor*fact(1)*esccor!+ehomology_constr & +wdfa_dist*edfadis+wdfa_tor*edfator+wdfa_nei*edfanei & +wdfa_beta*edfabet #else @@ -144,7 +145,7 @@ c write (iout,*) "ft(6)",fact(6)," evdw",evdw," evdw_t",evdw_t & +wcorr6*fact(5)*ecorr6+wturn4*fact(3)*eello_turn4 & +wturn3*fact(2)*eello_turn3+wturn6*fact(5)*eturn6 & +wel_loc*fact(2)*eel_loc+edihcnstr+wtor_d*fact(2)*etors_d - & +wbond*estr+wsccor*fact(1)*esccor+ehomology_constr + & +wbond*estr+wsccor*fact(1)*esccor!+ehomology_constr & +wdfa_dist*edfadis+wdfa_tor*edfator+wdfa_nei*edfanei & +wdfa_beta*edfabet #endif @@ -1820,6 +1821,7 @@ C implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.CONTROL' include 'COMMON.IOUNITS' include 'COMMON.GEO' @@ -3149,7 +3151,7 @@ c MODELLER restraint function implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' - + include 'DIMENSIONS.FREE' integer nnn, i, j, k, ki, irec, l integer katy, odleglosci, test7 real*8 odleg, odleg2, odleg3, kat, kat2, kat3, gdih(max_template) @@ -3744,6 +3746,7 @@ c implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.LOCAL' include 'COMMON.GEO' include 'COMMON.INTERACT' @@ -4070,6 +4073,7 @@ C implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.LOCAL' include 'COMMON.GEO' include 'COMMON.INTERACT' @@ -4551,6 +4555,7 @@ C implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.GEO' include 'COMMON.LOCAL' include 'COMMON.VAR' @@ -5202,6 +5207,7 @@ c amino-acid residues. implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.VAR' include 'COMMON.GEO' include 'COMMON.LOCAL' @@ -5596,6 +5602,10 @@ c & ' jj=',jj,' kk=',kk C Contacts I-J and (I+1)-(J+1) or (I+1)-(J-1) occur simultaneously. C The system gains extra energy. ecorr=ecorr+ehbcorr(i,j,i+1,j1,jj,kk,0.72D0,0.32D0) +#ifdef DEBUG + write (iout,*) "ecorr",i,j,i+1,j1, + & ehbcorr(i,j,i+1,j1,jj,kk,0.72D0,0.32D0) +#undef DEBUG n_corr=n_corr+1 else if (j1.eq.j) then C Contacts I-J and I-(J+1) occur simultaneously. @@ -5883,11 +5893,11 @@ cd ees0pkl=0.0D0 cd ees0pij=1.0D0 cd ees0mkl=0.0D0 cd ees0mij=1.0D0 -c write (iout,*)'Contacts have occurred for peptide groups',i,j, -c & ' and',k,l -c write (iout,*)'Contacts have occurred for peptide groups', -c & i,j,' fcont:',eij,' eij',' eesij',ees0pij,ees0mij,' and ',k,l -c & ,' fcont ',ekl,' eeskl',ees0pkl,ees0mkl,' ees=',ees +cd write (iout,*)'Contacts have occurred for peptide groups',i,j, +cd & ' and',k,l +cd write (iout,*)'Contacts have occurred for peptide groups', +cd & i,j,' fcont:',eij,' eij',' eesij',ees0pij,ees0mij,' and ',k,l +cd & ,' fcont ',ekl,' eeskl',ees0pkl,ees0mkl,' ees=',ees C Calculate the multi-body contribution to energy. ecorr=ecorr+ekont*ees if (calc_grad) then diff --git a/source/wham/src/initialize_p.F b/source/wham/src/initialize_p.F index 0ba3b77..c1c1950 100644 --- a/source/wham/src/initialize_p.F +++ b/source/wham/src/initialize_p.F @@ -581,6 +581,7 @@ c------------------------------------------------------------------------------ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' #ifdef MPI include 'mpif.h' #endif diff --git a/source/wham/src/molread_zs.F b/source/wham/src/molread_zs.F index a736e9c..34b3210 100644 --- a/source/wham/src/molread_zs.F +++ b/source/wham/src/molread_zs.F @@ -5,6 +5,7 @@ C implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.IOUNITS' include 'COMMON.GEO' include 'COMMON.VAR' @@ -353,6 +354,7 @@ c------------------------------------------------------------------------------- implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.CONTROL' include 'COMMON.CHAIN' include 'COMMON.IOUNITS' @@ -483,6 +485,7 @@ c====------------------------------------------------------------------- include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' #ifdef MPI include 'mpif.h' #endif @@ -532,6 +535,7 @@ c Alternative: reading from input call reada(controlcard,'DIST_CUT',dist_cut,5.0d0) ! for diff ways of calc sigma call readi(controlcard,"HOMOL_NSET",homol_nset,1) + call readi(controlcard,"IHSET",ihset,1) if (homol_nset.gt.1)then call card_concat(controlcard,.true.) read(controlcard,*) (waga_homology(i),i=1,homol_nset) @@ -637,7 +641,7 @@ c write(iout,*) "tpl_k_rescore - ",tpl_k_rescore read (ientin,*,end=1401) rescore_tmp c rescore(k,irec)=rescore_tmp+1.0d0 ! to avoid 0 values rescore(k,irec)=0.5d0*(rescore_tmp+0.5d0) ! alt transf to reduce scores -c write(iout,*) "rescore(",k,irec,") =",rescore(k,irec) +c write(iout,*) "rescore(",k,irec,") =",rescore(k,irec) 1301 continue enddo 1401 continue @@ -679,7 +683,7 @@ c write (iout,*) "dist(",i,j,") =",dist(i,j) c write (iout,*) "distal = ",distal c write (iout,*) "odl(",k,ii,") =",odl(k,ii) c write(iout,*) "rescore(",k,i,") =",rescore(k,i), -c & "rescore(",k,j,") =",rescore(k,j) +c & "rescore(",k,j,") =",rescore(k,j) c c Calculation of sigma from res sim c @@ -690,6 +694,7 @@ c if (odl(k,ii).le.dist_cut) then sigma_odl(k,ii)=rescore(k,i)+rescore(k,j) ! other exprs possible c sigma_odl(k,ii)=hmscore(k)*rescore(k,i)*rescore(k,j) +c write (iout,*) "c sigma_odl",k,ii,sigma_odl(k,ii) else #ifdef OLDSIGMA sigma_odl(k,ii)=(rescore(k,i)+rescore(k,j))* ! sigma ~ rescore ~ error @@ -697,6 +702,8 @@ c sigma_odl(k,ii)=hmscore(k)*rescore(k,i)*rescore(k,j) #else sigma_odl(k,ii)=(rescore(k,i)+rescore(k,j))* ! sigma ~ rescore ~ error & dexp(0.5d0*(odl(k,ii)/dist_cut)**2-0.5d0) +c write (iout,*) "d sigma_odl",k,ii,sigma_odl(k,ii), +c & odl(k,ii),dist_cut #endif c Following expr replaced by a positive exp argument c sigma_odl(k,ii)=(rescore(k,i)+rescore(k,j))* @@ -855,6 +862,7 @@ cd write(iout,*) "waga_theta",waga_theta,"waga_d",waga_d & 1.0d0/dsqrt(sigma_d(ki,i)),ki=1,constr_homology) enddo endif + call flush_(iout) c ----------------------------------------------------------------- return end diff --git a/source/wham/src/proc_cont.f b/source/wham/src/proc_cont.f index 9269496..39ec498 100644 --- a/source/wham/src/proc_cont.f +++ b/source/wham/src/proc_cont.f @@ -2,6 +2,7 @@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'DIMENSIONS.COMPAR' include 'COMMON.IOUNITS' include 'COMMON.TIME1' diff --git a/source/wham/src/promienie.f b/source/wham/src/promienie.f index 66016fd..76923cf 100644 --- a/source/wham/src/promienie.f +++ b/source/wham/src/promienie.f @@ -2,6 +2,7 @@ implicit none include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.CONTROL' include 'COMMON.INTERACT' include 'COMMON.IOUNITS' diff --git a/source/wham/src/read_ref_str.F b/source/wham/src/read_ref_str.F index 4b56181..72e1a47 100644 --- a/source/wham/src/read_ref_str.F +++ b/source/wham/src/read_ref_str.F @@ -6,6 +6,7 @@ C implicit none include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'DIMENSIONS.COMPAR' include 'COMMON.IOUNITS' include 'COMMON.GEO' diff --git a/source/wham/src/readpdb.F b/source/wham/src/readpdb.F index e90d954..ca900d3 100644 --- a/source/wham/src/readpdb.F +++ b/source/wham/src/readpdb.F @@ -4,6 +4,7 @@ C geometry. implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'COMMON.FRAG' include 'COMMON.LOCAL' include 'COMMON.VAR' @@ -290,6 +291,7 @@ c--------------------------------------------------------------------------- implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' #ifdef MPI include "mpif.h" #endif @@ -392,6 +394,7 @@ c------------------------------------------------------------------------------- implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' #ifdef MPI include "mpif.h" #endif diff --git a/source/wham/src/readrtns.F b/source/wham/src/readrtns.F index bc964f3..3d308b4 100644 --- a/source/wham/src/readrtns.F +++ b/source/wham/src/readrtns.F @@ -252,7 +252,7 @@ c----------------------------------------------------------------------------- include "COMMON.NAMES" include "COMMON.FREE" include "COMMON.OBCINKA" - character*64 nazwa + character*128 nazwa character*16000 controlcard integer i,ii,ib,iR,iparm,ilen,iroof,nthr,npars external ilen,iroof @@ -355,7 +355,7 @@ c------------------------------------------------------------------------------- include "COMMON.PROTFILES" include "COMMON.PROT" include "COMMON.FREE" - character*64 bprotfile_temp + character*128 bprotfile_temp character*3 liczba,liczba2 character*2 liczba1 integer iunit,islice @@ -415,7 +415,8 @@ c------------------------------------------------------------------------------- include "COMMON.SBRIDGE" include "COMMON.OBCINKA" real*4 csingle(3,maxres2) - character*64 nazwa,bprotfile_temp + character*64 nazwa + character*128 bprotfile_temp character*3 liczba character*2 liczba1 integer i,j,ii,jj(maxslice),k,kk(maxslice),l, diff --git a/source/wham/src/secondary.f b/source/wham/src/secondary.f index 9c9bc7d..1d194ab 100644 --- a/source/wham/src/secondary.f +++ b/source/wham/src/secondary.f @@ -2,6 +2,7 @@ implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' + include 'DIMENSIONS.FREE' include 'DIMENSIONS.COMPAR' include 'COMMON.IOUNITS' include 'COMMON.TIME1' diff --git a/source/wham/src/wham_calc1.F b/source/wham/src/wham_calc1.F index 300bb86..ce5de23 100644 --- a/source/wham/src/wham_calc1.F +++ b/source/wham/src/wham_calc1.F @@ -696,7 +696,7 @@ c write (iout,*) 1.0d0/(beta_h(ib,iparm)*1.987D-3),ft edihcnstr=enetb(20,i,iparm) ehomology_constr=enetb(22,i,iparm) if (homol_nset.gt.1) - & ehomology_constr=waga_homology(homol_nset)*ehomology_constr + & ehomology_constr=waga_homology(ihset)*ehomology_constr edfadis=enetb(23,i,iparm) edfator=enetb(24,i,iparm) edfanei=enetb(25,i,iparm) @@ -956,7 +956,7 @@ c write (iout,*) "me1",me1," scount",scount(me1) edihcnstr=enetb(20,t,iparm) ehomology_constr=enetb(22,t,iparm) if (homol_nset.gt.1) - & ehomology_constr=waga_homology(homol_nset)*ehomology_constr + & ehomology_constr=waga_homology(ihset)*ehomology_constr edfadis=enetb(23,t,iparm) edfator=enetb(24,t,iparm) edfanei=enetb(25,t,iparm) diff --git a/source/wham/src/xread.F b/source/wham/src/xread.F index ac35de1..9e5efb9 100644 --- a/source/wham/src/xread.F +++ b/source/wham/src/xread.F @@ -23,7 +23,8 @@ include "COMMON.SBRIDGE" include "COMMON.OBCINKA" real*4 csingle(3,maxres2) - character*64 nazwa,bprotfile_temp + character*64 nazwa + character*128 bprotfile_temp integer i,j,k,l,ii,jj(maxslice),kk(maxslice),ll(maxslice), & mm(maxslice) integer iscor,islice,islice1,slice