integer modecalc,iscode,indpdb,indback,indphi,iranconf,icheckgrad,
- & inprint,i2ndstr,mucadyn,constr_dist,constr_homology,homol_nset
- real*8 waga_dist1,waga_angle1
+ & iprint,i2ndstr,mucadyn,constr_dist,constr_homology,homol_nset
+ real*8 waga_homology
real*8 waga_dist, waga_angle, waga_theta, waga_d, dist_cut
logical minim,refstr,pdbref,outpdb,outmol2,overlapsc,energy_dec,
& sideadd,lsecondary,read_cart,unres_pdb,
& overlapsc,energy_dec,sideadd,lsecondary,read_cart,unres_pdb
& ,vdisulf,searchsc,lmuca,dccart,mucadyn,extconf,out1file,
& constr_dist,gnorm_check,gradout,split_ene,constr_homology,
- & waga_dist, waga_angle, waga_theta, waga_d, dist_cut,
- & homol_nset
- common /homol/ waga_dist1(maxprocs/20), waga_angle1(maxprocs/20)
+ & waga_dist, waga_angle, waga_theta, waga_d, dist_cut
+ common /homol/ waga_homology(maxprocs/20),homol_nset
C... minim = .true. means DO minimization.
C... energy_dec = .true. means print energy decomposition matrix
endif
mremd_rst_name=prefix(:ilen(prefix))//"_mremd.rst"
-cd print *,'MREMD',nodes
+cd print *,'MREMD',nodes,homol_nset
cd print *,'mmm',me,remd_mlist,(remd_m(i),i=1,nrep)
cde write (iout,*) "Start MREMD: me",me," t_bath",t_bath
C DO NOT EDIT THIS FILE - IT HAS BEEN GENERATED BY COMPINFO.C
-C 0 40376 2
+C 0 40376 14
subroutine cinfo
include 'COMMON.IOUNITS'
write(iout,*)'++++ Compile info ++++'
- write(iout,*)'Version 0.40376 build 2'
- write(iout,*)'compiled Wed Feb 25 14:06:14 2015'
- write(iout,*)'compiled by felipe@piasek4'
+ write(iout,*)'Version 0.40376 build 14'
+ write(iout,*)'compiled Tue Mar 3 11:11:23 2015'
+ write(iout,*)'compiled by czarek@piasek4'
write(iout,*)'OS name: Linux '
write(iout,*)'OS release: 3.2.0-70-generic '
write(iout,*)'OS version:',
c write(iout,*) i, j, k, "TEST K"
enddo
- if (homol_nset.gt.1)then
- grad_odl3=waga_dist1(iset)*sum_sgodl/(sum_godl*dij)
- else
- grad_odl3=waga_dist*sum_sgodl/(sum_godl*dij)
- endif
+ grad_odl3=waga_homology(iset)*waga_dist
+ & *sum_sgodl/(sum_godl*dij)
c grad_odl3=sum_sgodl/(sum_godl*dij)
sum_sgdih=sum_sgdih+sgdih
enddo
c grad_dih3=sum_sgdih/sum_gdih
- if (homol_nset.gt.1)then
- grad_dih3=waga_angle1(iset)*sum_sgdih/sum_gdih
- else
- grad_dih3=waga_angle*sum_sgdih/sum_gdih
- endif
+ grad_dih3=waga_homology(iset)*waga_angle*sum_sgdih/sum_gdih
c write(iout,*)i,k,gdih,sgdih,beta(i+1,i+2,i+3,i+4),grad_dih3
ccc write(iout,747) "GRAD_KAT_1", i, nphi, icg, grad_dih3,
c
c Final value of gradient using same var as in Econstr_back
dutheta(i-2)=sum_sgtheta/sum_gtheta*waga_theta
+ & *waga_homology(iset)
c dutheta(i)=sum_sgtheta/sum_gtheta
c
c Uconst_back=Uconst_back+waga_theta*utheta(i) ! waga_theta added as weight
c
c
c New implementation
- sum_guscdiff = waga_d*sum_guscdiff
+ sum_guscdiff = waga_homology(iset)*waga_d*sum_guscdiff
do jik=1,3
duscdiff(jik,i-1)=duscdiff(jik,i-1)+
& sum_guscdiff*(dXX_C1tab(jik,i)*dxx+
c Addition of energy of theta angle and SC local geom over constr_homologs ref strs
c
c ehomology_constr=odleg+kat
- if (homol_nset.gt.1)then
- ehomology_constr=waga_dist1(iset)*odleg+waga_angle1(iset)*kat
- & +waga_theta*Eval
- & +waga_d*Erot
- else
- ehomology_constr=waga_dist*odleg+waga_angle*kat+waga_theta*Eval
- & +waga_d*Erot
- endif
+ ehomology_constr=(waga_dist*odleg+waga_angle*kat+waga_theta*Eval
+ & +waga_d*Erot)*waga_homology(iset)
c write (iout,*) "odleg",odleg," kat",kat," Uconst_back",Uconst_back
c write (iout,*) "ehomology_constr",ehomology_constr
c ehomology_constr=odleg+kat+Uconst_back
include 'COMMON.CONTROL'
include 'COMMON.MD'
include 'COMMON.INTERACT'
- write(iout,*)"homology_partition: lim_odl=",lim_odl,
- & " lim_dih",lim_dih
+cd write(iout,*)"homology_partition: lim_odl=",lim_odl,
+cd & " lim_dih",lim_dih
#ifdef MPI
- write (iout,*) "MPI"
+ if (me.eq.king .or. .not. out1file) write (iout,*) "MPI"
call int_bounds(lim_odl,link_start_homo,link_end_homo)
call int_bounds(lim_dih-nnt+1,idihconstr_start_homo,
& idihconstr_end_homo)
enddo
call flush(iout)
endif
- write (2,*) "Start reading THETA_PDB"
+cd write (2,*) "Start reading THETA_PDB"
do i=1,ntyp
read (ithep_pdb,*,err=111,end=111) a0thet(i),(athet(j,i),j=1,2),
& (bthet(j,i),j=1,2)
read (ithep_pdb,*,err=111,end=111) theta0(i),sig0(i),sigc0(i)
sigc0(i)=sigc0(i)**2
enddo
- write (2,*) "End reading THETA_PDB"
+cd write (2,*) "End reading THETA_PDB"
close (ithep_pdb)
#endif
close(ithep)
include 'COMMON.SETUP'
integer i,j,ibeg,ishift1,ires,iii,ires_old,ishift,ity,
& ishift_pdb
- logical lprn /.true./,fail
+ logical lprn /.false./,fail
double precision e1(3),e2(3),e3(3)
double precision dcj,efree_temp
character*3 seq,res
endif
endif
enddo
- 10 write (iout,'(a,i5)') ' Number of residues found: ',ires
+ 10 continue
+#ifdef DEBUG
+ write (iout,'(a,i5)') ' Number of residues found: ',ires
+#endif
if (ires.eq.0) return
C Calculate the CM of the last side chain.
if (iii.gt.0) then
call readi(controlcard,"HOMOL_NSET",homol_nset,1)
if (homol_nset.gt.1)then
call card_concat(controlcard)
- read(controlcard,*) (waga_dist1(i),i=1,homol_nset)
- call card_concat(controlcard)
- read(controlcard,*) (waga_angle1(i),i=1,homol_nset)
- write(iout,*) "iset distance_weight angle_weight"
- do i=1,homol_nset
- write(iout,*) i,waga_dist1(i),waga_angle1(i)
- enddo
+ read(controlcard,*) (waga_homology(i),i=1,homol_nset)
+ if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0) then
+ write(iout,*) "iset homology_weight "
+ do i=1,homol_nset
+ write(iout,*) i,waga_homology(i)
+ enddo
+ endif
iset=mod(kolor,homol_nset)+1
else
iset=1
-c call reada(controlcard,"HOMOL_DIST",waga_dist(1),1.0d0)
-c call reada(controlcard,"HOMOL_ANGLE",waga_angle(1),1.0d0)
+ waga_homology(1)=1.0
endif
- write (iout,*) "nnt",nnt," nct",nct
- call flush(iout)
+cd write (iout,*) "nnt",nnt," nct",nct
+cd call flush(iout)
lim_odl=0
if (waga_dist.gt.0.0d0) lim_odl=ii
if (constr_homology.gt.0) call homology_partition
if (constr_homology.gt.0) call init_int_table
- write (iout,*) "homology_partition: lim_theta= ",lim_theta,
- & "lim_xx=",lim_xx
+cd write (iout,*) "homology_partition: lim_theta= ",lim_theta,
+cd & "lim_xx=",lim_xx
c write (iout,*) "ithet_start =",ithet_start,"ithet_end =",ithet_end
c write (iout,*) "loc_start =",loc_start,"loc_end =",loc_end
c
c Print restraints
c
if (.not.lprn) return
- write(iout,*) "waga_theta",waga_theta,"waga_d",waga_d
- write (iout,*) "Distance restraints from templates"
- do ii=1,lim_odl
+cd write(iout,*) "waga_theta",waga_theta,"waga_d",waga_d
+ if(me.eq.king .or. .not. out1file .and. fg_rank.eq.0) then
+ write (iout,*) "Distance restraints from templates"
+ do ii=1,lim_odl
write(iout,'(3i5,10(2f16.2,4x))') ii,ires_homo(ii),jres_homo(ii),
& (odl(ki,ii),1.0d0/dsqrt(sigma_odl(ki,ii)),ki=1,constr_homology)
- enddo
- write (iout,*) "Dihedral angle restraints from templates"
- do i=nnt+3,lim_dih
+ enddo
+ write (iout,*) "Dihedral angle restraints from templates"
+ do i=nnt+3,lim_dih
write (iout,'(i5,10(2f8.2,4x))') i,(rad2deg*dih(ki,i),
& rad2deg/dsqrt(sigma_dih(ki,i)),ki=1,constr_homology)
- enddo
- write (iout,*) "Virtual-bond angle restraints from templates"
- do i=nnt+2,lim_theta
+ enddo
+ write (iout,*) "Virtual-bond angle restraints from templates"
+ do i=nnt+2,lim_theta
write (iout,'(i5,10(2f8.2,4x))') i,(rad2deg*thetatpl(ki,i),
& rad2deg/dsqrt(sigma_theta(ki,i)),ki=1,constr_homology)
- enddo
- write (iout,*) "SC restraints from templates"
- do i=nnt,lim_xx
+ enddo
+ write (iout,*) "SC restraints from templates"
+ do i=nnt,lim_xx
write(iout,'(i5,10(4f8.2,4x))') i,
& (xxtpl(ki,i),yytpl(ki,i),zztpl(ki,i),
& 1.0d0/dsqrt(sigma_d(ki,i)),ki=1,constr_homology)
- enddo
-
+ enddo
+ endif
c -----------------------------------------------------------------
return
end