c parameter (maxconts=50)
C Max. number of interactions within cutoff per residue
integer maxint_res
- parameter (maxint_res=200)
+ parameter (maxint_res=250)
C Max. number od residues within distance cufoff from a given residue to
C include in template-based/contact distance restraints.
integer maxcont_res
implicit none
include "DIMENSIONS"
include "COMMON.IOUNITS"
+ include "COMMON.CONTROL"
integer nchain,nres,itype(nres),chain_border(2,maxchain),
& chain_length(nchain),itemp(maxchain),
& npermchain,tabpermchain(maxchain,maxperm),
nchain_group=nchain_group+1
iieq=1
iequiv(iieq,nchain_group)=i
+ if (symetr.eq.1) then
do j=i+1,nchain
if (iflag(j).gt.0.or.chain_length(i).ne.chain_length(j)) cycle
c k=0
iieq=iieq+1
iequiv(iieq,nchain_group)=j
enddo
+ endif
nequiv(nchain_group)=iieq
enddo
write(iout,*) "Number of equivalent chain groups:",nchain_group
if (energy_dec) write (iout,'(a6,2i5,0pf7.3,a3)')
& 'evdw',i,j,evdwij,' ss'
C triple bond artifac removal
- do k=j+1,iend(i,iint)
+c do k=j+1,iend(i,iint)
+ do k=j+1,nct
C search over all next residues
if (dyn_ss_mask(k)) then
C check if they are cysteins
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
335 continue
unres_pdb=.false.
nres_temp=nres
-c call readpdb
- call readpdb_template(nmodel_start+1)
+ call readpdb
close(ipdbin)
if (nres.ge.nres_temp) then
nmodel_start=nmodel_start+1
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
include 'COMMON.IOUNITS'
include 'COMMON.CALC'
include 'COMMON.NAMES'
+ include 'COMMON.SPLITELE'
#ifndef CLUST
#ifndef WHAM
include 'COMMON.MD'
j=resj
ici=icys(i)
icj=icys(j)
+c write (iout,*) "dyn_ssbond",resi,resj,ici,icj
+c call flush(iout)
if (ici.eq.0 .or. icj.eq.0) then
#ifdef MPI
write (*,'(a,i5,2a,a3,i5,5h and ,a3,i5)')
yi=c(2,nres+i)
zi=c(3,nres+i)
call to_box(xi,yi,zi)
+c write (iout,*) "After to_box i",xi,yi,zi
+c call flush(iout)
C define scaling factor for lipids
C if (positi.le.0) positi=positi+boxzsize
C first for peptide groups
c for each residue check if it is in lipid or lipid water border area
call lipid_layer(xi,yi,zi,sslipi,ssgradlipi)
+c write (iout,*) "After lipid_layer"
+c call flush(iout)
itypj=itype(j)
xj=c(1,nres+j)
yj=c(2,nres+j)
zj=c(3,nres+j)
call to_box(xj,yj,zj)
+c write (iout,*) "After to_box j",xj,yj,zj
+c call flush(iout)
call lipid_layer(xj,yj,zj,sslipj,ssgradlipj)
+c write (iout,*) "After lipid_layer"
+c call flush(iout)
aa=aa_lip(itypi,itypj)*(sslipi+sslipj)/2.0d0
& +aa_aq(itypi,itypj)*(2.0d0-sslipi+sslipj)/2.0d0
bb=bb_lip(itypi,itypj)*(sslipi+sslipj)/2.0d0
xj=boxshift(xj-xi,boxxsize)
yj=boxshift(yj-yi,boxysize)
zj=boxshift(zj-zi,boxzsize)
+c write (iout,*) "After boxshift"
+c call flush(iout)
dxj=dc_norm(1,nres+j)
dyj=dc_norm(2,nres+j)
dzj=dc_norm(3,nres+j)
rrij=1.0D0/(xj*xj+yj*yj+zj*zj)
rij=dsqrt(rrij) ! sc_angular needs rij to really be the inverse
- sss=sscale((1.0d0/rij)/sigma(itypi,itypj))
- sssgrad=sscagrad((1.0d0/rij)/sigma(itypi,itypj))
+ sss=sscale((1.0d0/rij)/sigma(itypi,itypj),r_cut_int)
+ sssgrad=sscagrad((1.0d0/rij)/sigma(itypi,itypj),r_cut_int)
c The following are set in sc_angular
c erij(1)=xj*rij
c erij(2)=yj*rij
c om1=dxi*erij(1)+dyi*erij(2)+dzi*erij(3)
c om2=dxj*erij(1)+dyj*erij(2)+dzj*erij(3)
c om12=dxi*dxj+dyi*dyj+dzi*dzj
+c write (iout,*) "Calling sc_angular"
+c call flush(iout)
call sc_angular
+c write (iout,*) "After sc_angular"
+c call flush(iout)
rij=1.0D0/rij ! Reset this so it makes sense
sig0ij=sigma(itypi,itypj)
c-------TESTING CODE
c Stop and plot energy and derivative as a function of distance
+c write (iout,*) "checkstop",checkstop
+c call flush(iout)
if (checkstop) then
ssm=ssC-0.25D0*ssB*ssB/ssA
ljm=-0.25D0*ljB*bb/aa
endif
+c write (iout,*) "havebond",havebond
+c call flush(iout)
if (havebond) then
#ifndef CLUST
#ifndef WHAM
cgrad enddo
do l=1,3
- gvdwc(l,i)=gvdwc(l,i)-gg(l)+gg_lipi(k)
- gvdwc(l,j)=gvdwc(l,j)+gg(l)+gg_lipj(k)
+ gvdwc(l,i)=gvdwc(l,i)-gg(l)+gg_lipi(l)
+ gvdwc(l,j)=gvdwc(l,j)+gg(l)+gg_lipj(l)
enddo
return
include "COMMON.FREE"
include "COMMON.SBRIDGE"
real*4 csingle(3,maxres2)
- character*64 nazwa,bprotfile_temp
+ character*256 nazwa,bprotfile_temp
character*3 liczba
integer i,is,ie,j,ii,jj,k,kk,l,ll,mm,if
integer nrec,nlines,iscor,islice
include 'COMMON.VAR'
include 'COMMON.GEO'
include 'COMMON.PROT'
- character*64 nazwa,bprotfile_temp
+ character*256 nazwa,bprotfile_temp
real*4 rtime,rpotE,ruconst,rt_bath,rprop(maxQ)
double precision time
integer iret,itmp,itraj,ntraj
double precision tt
integer snk_p(MaxR,MaxT_h,Max_parm)
logical lerr
- character*64 bprotfile_temp
+ character*256 bprotfile_temp
call opentmp(islice,ientout,bprotfile_temp)
iii=0
ii=0
include "COMMON.CONTACTS1"
character*64 nazwa
character*80 bxname,cxname
- character*64 bprotfile_temp
+ character*256 bprotfile_temp
character*3 liczba,licz
character*2 licz2
integer i,itj,ii,iii,j,k,l
include "COMMON.PROTFILES"
include "COMMON.PROT"
include "COMMON.FREE"
- character*64 bprotfile_temp
+ character*256 bprotfile_temp
character*3 liczba,liczba2
character*2 liczba1
integer iunit,islice
include "COMMON.SBRIDGE"
include "COMMON.OBCINKA"
real*4 csingle(3,maxres2)
- character*64 nazwa,bprotfile_temp
+ character*256 nazwa,bprotfile_temp
character*3 liczba
character*2 liczba1
integer i,j,ii,jj(maxslice),k,kk(maxslice),l,
include "COMMON.SBRIDGE"
include "COMMON.OBCINKA"
real*4 csingle(3,maxres2)
- character*64 nazwa,bprotfile_temp
+ character*256 nazwa,bprotfile_temp
integer i,j,k,l,ii,jj(maxslice),kk(maxslice),ll(maxslice),
& mm(maxslice)
integer iscor,islice,islice1,slice