3 C Define constants and zero out tables.
5 implicit real*8 (a-h,o-z)
8 include 'COMMON.IOUNITS'
10 include 'COMMON.INTERACT'
12 include 'COMMON.LOCAL'
13 include 'COMMON.TORSION'
14 include 'COMMON.FFIELD'
15 include 'COMMON.SBRIDGE'
16 include 'COMMON.MINIM'
17 include 'COMMON.DERIV'
18 include "COMMON.NAMES"
19 include "COMMON.TIME1"
21 C The following is just to define auxiliary variables used in angle conversion
60 C Set default weights of the energy terms.
106 athet(j,i,ichir1,ichir2)=0.0D0
107 bthet(j,i,ichir1,ichir2)=0.0D0
127 gaussc(l,k,j,i)=0.0D0
140 v1(k,j,i,iblock)=0.0D0
141 v2(k,j,i,iblock)=0.0D0
151 v1c(1,l,i,j,k,iblock)=0.0D0
152 v1s(1,l,i,j,k,iblock)=0.0D0
153 v1c(2,l,i,j,k,iblock)=0.0D0
154 v1s(2,l,i,j,k,iblock)=0.0D0
158 v2c(m,l,i,j,k,iblock)=0.0D0
159 v2s(m,l,i,j,k,iblock)=0.0D0
170 C Initialize the bridge arrays
189 C Initialize variables used in minimization.
198 C Initialize the variables responsible for the mode of gradient storage.
204 if (print_order(i).eq.j) then
212 C Set timers and counters for the respective routines
231 nprint_ene=nprint_ene-1
235 c-------------------------------------------------------------------------
237 implicit real*8 (a-h,o-z)
239 include 'sizesclu.dat'
240 include 'COMMON.NAMES'
241 include 'COMMON.FFIELD'
243 &'DD','DAU','DAI','DDB','DSM','DPR','DLY','DAR','DHI','DAS','DGL',
244 & 'DSG','DGN','DSN','DTH',
245 &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
246 &'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
247 &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','SME','DBZ',
250 &'z','z','z','z','z','p','k','r','h','d','e','n','q','s','t','g',
251 &'a','y','w','v','l','i','f','m','c','x',
252 &'C','M','F','I','L','V','W','Y','A','G','T',
253 &'S','Q','N','E','D','H','R','K','P','z','z','z','z','X'/
254 data potname /'LJ','LJK','BP','GB','GBV'/
256 & "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
257 & "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ",
258 & "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB","EVDWPP",
259 & "EVDW2_14","ESTR","ESCCOR","EDIHC","EVDW_T","ELIPTRAN",
260 & "EAFM","ETHETC","EMPTY"/
262 & "WSC","WSCP","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC",
263 & "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR","WTORD",
264 & "WHPB","WVDWPP","WSCP14","WBOND","WSCCOR","WDIHC","WSC",
265 & "WLIPTRAN","WAFM","WTHETC","WSHIELD"/
267 data print_order /1,2,3,18,11,12,13,14,4,5,6,7,8,9,10,19,
268 & 16,15,17,20,21,24,22,23,1/
270 c---------------------------------------------------------------------------
271 subroutine init_int_table
272 implicit real*8 (a-h,o-z)
274 include 'COMMON.CHAIN'
275 include 'COMMON.INTERACT'
276 include 'COMMON.LOCAL'
277 include 'COMMON.SBRIDGE'
278 include 'COMMON.IOUNITS'
279 include "COMMON.TORCNSTR"
280 logical scheck,lprint
296 cd write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb',
297 cd & (ihpb(i),jhpb(i),i=1,nss)
302 if (ihpb(ii).eq.i+nres) then
309 cd write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
315 else if (jj.eq.nct) then
330 ind_scint=int_scint+nct-i
337 write (iout,'(a)') 'Interaction array:'
339 write (iout,'(i3,2(2x,2i3))')
340 & i,(istart(i,iint),iend(i,iint),iint=1,nint_gr(i))
351 write (iout,'(a)') 'Electrostatic interaction array:'
353 write (iout,'(i3,2(2x,2i3))') i,ielstart(i),ielend(i)
358 C Partition the SC-p interaction array
362 if (i.lt.nnt+iscp) then
364 iscpstart(i,1)=i+iscp
366 elseif (i.gt.nct-iscp) then
374 iscpstart(i,2)=i+iscp
379 write (iout,'(a)') 'SC-p interaction array:'
380 do i=iatscp_s,iatscp_e
381 write (iout,'(i3,2(2x,2i3))')
382 & i,(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
385 C Partition local interactions
397 idihconstr_end=ndih_constr
399 ithetaconstr_end=ntheta_constr
404 c---------------------------------------------------------------------------
405 subroutine int_partition(int_index,lower_index,upper_index,atom,
406 & at_start,at_end,first_atom,last_atom,int_gr,jat_start,jat_end,*)
407 implicit real*8 (a-h,o-z)
409 include 'COMMON.IOUNITS'
410 integer int_index,lower_index,upper_index,atom,at_start,at_end,
411 & first_atom,last_atom,int_gr,jat_start,jat_end
414 if (lprn) write (iout,*) 'int_index=',int_index
415 int_index_old=int_index
416 int_index=int_index+last_atom-first_atom+1
418 & write (iout,*) 'int_index=',int_index,
419 & ' int_index_old',int_index_old,
420 & ' lower_index=',lower_index,
421 & ' upper_index=',upper_index,
422 & ' atom=',atom,' first_atom=',first_atom,
423 & ' last_atom=',last_atom
424 if (int_index.ge.lower_index) then
426 if (at_start.eq.0) then
428 jat_start=first_atom-1+lower_index-int_index_old
432 if (lprn) write (iout,*) 'jat_start',jat_start
433 if (int_index.ge.upper_index) then
435 jat_end=first_atom-1+upper_index-int_index_old
440 if (lprn) write (iout,*) 'jat_end',jat_end
444 c------------------------------------------------------------------------------
445 subroutine hpb_partition
446 implicit real*8 (a-h,o-z)
448 include 'COMMON.SBRIDGE'
449 include 'COMMON.IOUNITS'
452 cd write (iout,*) 'Processor',MyID,' MyRank',MyRank,
453 cd & ' nhpb',nhpb,' link_start=',link_start,
454 cd & ' link_end',link_end