3 C Define constants and zero out tables.
5 implicit real*8 (a-h,o-z)
7 include 'DIMENSIONS.ZSCOPT'
11 include 'COMMON.IOUNITS'
12 include 'COMMON.CHAIN'
13 include 'COMMON.INTERACT'
15 include 'COMMON.LOCAL'
16 include 'COMMON.TORSION'
17 include 'COMMON.FFIELD'
18 include 'COMMON.SBRIDGE'
19 include 'COMMON.MINIM'
20 include 'COMMON.DERIV'
21 include "COMMON.WEIGHTS"
22 include "COMMON.NAMES"
23 include "COMMON.TIME1"
24 include "COMMON.THERMAL"
25 include "COMMON.TORCNSTR"
27 C The following is just to define auxiliary variables used in angle conversion
64 C CSA I/O units (separated from others especially for Jooyoung)
75 icsa_bank_reminimized=38
79 C Set default weights of the energy terms.
124 athet(j,i,ichir1,ichir2)=0.0D0
125 bthet(j,i,ichir1,ichir2)=0.0D0
145 gaussc(l,k,j,i)=0.0D0
158 v1(k,j,i,iblock)=0.0D0
159 v2(k,j,i,iblock)=0.0D0
168 C Initialize the bridge arrays
187 C Initialize variables used in minimization.
196 C Initialize the variables responsible for the mode of gradient storage.
202 if (print_order(i).eq.j) then
210 C Set timers and counters for the respective routines
229 nprint_ene=nprint_ene-1
233 c-------------------------------------------------------------------------
235 implicit real*8 (a-h,o-z)
237 include 'DIMENSIONS.ZSCOPT'
238 include 'COMMON.NAMES'
239 include 'COMMON.WEIGHTS'
240 include 'COMMON.FFIELD'
242 &'DD','DAU','DAI','DDB','DSM','DPR','DLY','DAR','DHI','DAS','DGL',
243 & 'DSG','DGN','DSN','DTH',
244 &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
245 &'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
246 &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','SME','DBZ',
249 &'z','z','z','z','z','p','k','r','h','d','e','n','q','s','t','g',
250 &'a','y','w','v','l','i','f','m','c','x',
251 &'C','M','F','I','L','V','W','Y','A','G','T',
252 &'S','Q','N','E','D','H','R','K','P','z','z','z','z','X'/
253 data potname /'LJ','LJK','BP','GB','GBV','MM'/
255 & "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
256 & "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ",
257 & "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB","EVDWPP",
258 & "ESTR","EVDW2_14","ESCCOR","EDIHC","EVDW_T","ELIPTRAN",
259 & "EAFM","ETHETC","EMPTY"/
261 & "WSC","WSCP","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC",
262 & "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR","WTORD",
263 & "WHPB","WVDWPP","WBOND","WSCP14","WSCCOR","WDIHC","WSC",
264 & "WLIPTRAN","WAFM","WTHETC","WSHIELD"/
265 data ww0 /1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,
266 & 1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,0.0d0,1.0d0,
267 & 0.0d0,0.0,0.0d0,0.0d0,0.0d0,0.0d0/
269 data print_order /1,2,3,17,11,12,13,14,4,5,6,7,8,9,10,19,16,15,18,
272 c---------------------------------------------------------------------------
273 subroutine init_int_table
274 implicit real*8 (a-h,o-z)
276 include 'DIMENSIONS.ZSCOPT'
281 include 'COMMON.INFO'
283 include 'COMMON.CHAIN'
284 include 'COMMON.INTERACT'
285 include 'COMMON.LOCAL'
286 include 'COMMON.SBRIDGE'
287 include 'COMMON.IOUNITS'
288 logical scheck,lprint
304 cd write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb',
305 cd & (ihpb(i),jhpb(i),i=1,nss)
309 if (ihpb(ii).eq.i+nres) then
316 cd write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
322 else if (jj.eq.nct) then
337 ind_scint=int_scint+nct-i
344 write (iout,'(a)') 'Interaction array:'
346 write (iout,'(i3,2(2x,2i3))')
347 & i,(istart(i,iint),iend(i,iint),iint=1,nint_gr(i))
358 write (iout,'(a)') 'Electrostatic interaction array:'
360 write (iout,'(i3,2(2x,2i3))') i,ielstart(i),ielend(i)
365 C Partition the SC-p interaction array
369 if (i.lt.nnt+iscp) then
371 iscpstart(i,1)=i+iscp
373 elseif (i.gt.nct-iscp) then
381 iscpstart(i,2)=i+iscp
386 write (iout,'(a)') 'SC-p interaction array:'
387 do i=iatscp_s,iatscp_e
388 write (iout,'(i3,2(2x,2i3))')
389 & i,(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
392 C Partition local interactions
404 idihconstr_end=ndih_constr
406 ithetaconstr_end=ntheta_constr
411 c---------------------------------------------------------------------------
412 subroutine int_partition(int_index,lower_index,upper_index,atom,
413 & at_start,at_end,first_atom,last_atom,int_gr,jat_start,jat_end,*)
414 implicit real*8 (a-h,o-z)
416 include 'DIMENSIONS.ZSCOPT'
417 include 'COMMON.IOUNITS'
418 integer int_index,lower_index,upper_index,atom,at_start,at_end,
419 & first_atom,last_atom,int_gr,jat_start,jat_end
422 if (lprn) write (iout,*) 'int_index=',int_index
423 int_index_old=int_index
424 int_index=int_index+last_atom-first_atom+1
426 & write (iout,*) 'int_index=',int_index,
427 & ' int_index_old',int_index_old,
428 & ' lower_index=',lower_index,
429 & ' upper_index=',upper_index,
430 & ' atom=',atom,' first_atom=',first_atom,
431 & ' last_atom=',last_atom
432 if (int_index.ge.lower_index) then
434 if (at_start.eq.0) then
436 jat_start=first_atom-1+lower_index-int_index_old
440 if (lprn) write (iout,*) 'jat_start',jat_start
441 if (int_index.ge.upper_index) then
443 jat_end=first_atom-1+upper_index-int_index_old
448 if (lprn) write (iout,*) 'jat_end',jat_end
452 c------------------------------------------------------------------------------
453 subroutine hpb_partition
454 implicit real*8 (a-h,o-z)
456 include 'DIMENSIONS.ZSCOPT'
457 include 'COMMON.SBRIDGE'
458 include 'COMMON.IOUNITS'
461 cd write (iout,*) 'Processor',MyID,' MyRank',MyRank,
462 cd & ' nhpb',nhpb,' link_start=',link_start,
463 cd & ' link_end',link_end