3 C Define constants and zero out tables.
5 implicit real*8 (a-h,o-z)
7 include 'DIMENSIONS.ZSCOPT'
13 include 'COMMON.IOUNITS'
14 include 'COMMON.CHAIN'
15 include 'COMMON.INTERACT'
17 include 'COMMON.LOCAL'
18 include 'COMMON.TORSION'
19 include 'COMMON.FFIELD'
20 include 'COMMON.SBRIDGE'
21 include 'COMMON.MINIM'
22 include 'COMMON.DERIV'
23 include "COMMON.WEIGHTS"
24 include "COMMON.NAMES"
25 include "COMMON.TIME1"
26 include "COMMON.THERMAL"
27 include "COMMON.TORCNSTR"
28 include "COMMON.ENERGIES"
30 C The following is just to define auxiliary variables used in angle conversion
67 C CSA I/O units (separated from others especially for Jooyoung)
78 icsa_bank_reminimized=38
82 C Set default weights of the energy terms.
126 athet(j,i,ichir1,ichir2)=0.0D0
127 bthet(j,i,ichir1,ichir2)=0.0D0
147 gaussc(l,k,j,i)=0.0D0
160 v1(k,j,i,iblock)=0.0D0
161 v2(k,j,i,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
236 c write (iout,*) "maxres6",maxres6
237 c write (iout,*) "Calling MPI_Type_contiguous"
239 call MPI_Type_contiguous(maxres6,MPI_DOUBLE_PRECISION,MPI_FORCE,
241 call MPI_Type_commit(MPI_FORCE,ierror)
242 c write (iout,*) "After MPI_Type_contiguous ierror",ierror
246 c-------------------------------------------------------------------------
248 implicit real*8 (a-h,o-z)
250 include 'DIMENSIONS.ZSCOPT'
251 include 'COMMON.NAMES'
252 include 'COMMON.WEIGHTS'
253 include 'COMMON.FFIELD'
255 &'DD','DAU','DAI','DDB','DSM','DPR','DLY','DAR','DHI','DAS','DGL',
256 & 'DSG','DGN','DSN','DTH',
257 &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER',
258 &'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR',
259 &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','SME','DBZ',
262 &'z','z','z','z','z','p','k','r','h','d','e','n','q','s','t','g',
263 &'a','y','w','v','l','i','f','m','c','x',
264 &'C','M','F','I','L','V','W','Y','A','G','T',
265 &'S','Q','N','E','D','H','R','K','P','z','z','z','z','X'/
266 data potname /'LJ','LJK','BP','GB','GBV','MM'/
268 & "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ",
269 & "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ",
270 & "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB","EVDWPP",
271 & "ESTR","EVDW2_14","ESCCOR","EDIHC","EVDW_T","ELIPTRAN",
272 & "EAFM","ETHETC","EMPTY"/
274 & "WSC","WSCP","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC",
275 & "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR","WTORD",
276 & "WHPB","WVDWPP","WBOND","WSCP14","WSCCOR","WDIHC","WSC_T",
277 & "WLIPTRAN","WAFM","WTHETC","WSHIELD"/
278 data ww0 /1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,
279 & 1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,1.0d0,0.0d0,1.0d0,
280 & 0.0d0,0.0,0.0d0,0.0d0,0.0d0,0.0d0/
282 data print_order /1,2,3,17,11,12,13,14,4,5,6,7,8,9,10,19,16,15,18,
285 c---------------------------------------------------------------------------
286 subroutine init_int_table
287 implicit real*8 (a-h,o-z)
289 include 'DIMENSIONS.ZSCOPT'
294 include 'COMMON.INFO'
296 include 'COMMON.CHAIN'
297 include 'COMMON.INTERACT'
298 include 'COMMON.LOCAL'
299 include 'COMMON.SBRIDGE'
300 include 'COMMON.IOUNITS'
301 logical scheck,lprint
317 cd write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb',
318 cd & (ihpb(i),jhpb(i),i=1,nss)
322 if (ihpb(ii).eq.i+nres) then
329 cd write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
335 else if (jj.eq.nct) then
350 ind_scint=int_scint+nct-i
357 write (iout,'(a)') 'Interaction array:'
359 write (iout,'(i3,2(2x,2i3))')
360 & i,(istart(i,iint),iend(i,iint),iint=1,nint_gr(i))
371 write (iout,'(a)') 'Electrostatic interaction array:'
373 write (iout,'(i3,2(2x,2i3))') i,ielstart(i),ielend(i)
378 C Partition the SC-p interaction array
382 if (i.lt.nnt+iscp) then
384 iscpstart(i,1)=i+iscp
386 elseif (i.gt.nct-iscp) then
394 iscpstart(i,2)=i+iscp
399 write (iout,'(a)') 'SC-p interaction array:'
400 do i=iatscp_s,iatscp_e
401 write (iout,'(i3,2(2x,2i3))')
402 & i,(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
405 C Partition local interactions
417 idihconstr_end=ndih_constr
419 ithetaconstr_end=ntheta_constr
424 c---------------------------------------------------------------------------
425 subroutine int_partition(int_index,lower_index,upper_index,atom,
426 & at_start,at_end,first_atom,last_atom,int_gr,jat_start,jat_end,*)
427 implicit real*8 (a-h,o-z)
429 include 'DIMENSIONS.ZSCOPT'
430 include 'COMMON.IOUNITS'
431 integer int_index,lower_index,upper_index,atom,at_start,at_end,
432 & first_atom,last_atom,int_gr,jat_start,jat_end
435 if (lprn) write (iout,*) 'int_index=',int_index
436 int_index_old=int_index
437 int_index=int_index+last_atom-first_atom+1
439 & write (iout,*) 'int_index=',int_index,
440 & ' int_index_old',int_index_old,
441 & ' lower_index=',lower_index,
442 & ' upper_index=',upper_index,
443 & ' atom=',atom,' first_atom=',first_atom,
444 & ' last_atom=',last_atom
445 if (int_index.ge.lower_index) then
447 if (at_start.eq.0) then
449 jat_start=first_atom-1+lower_index-int_index_old
453 if (lprn) write (iout,*) 'jat_start',jat_start
454 if (int_index.ge.upper_index) then
456 jat_end=first_atom-1+upper_index-int_index_old
461 if (lprn) write (iout,*) 'jat_end',jat_end
465 c------------------------------------------------------------------------------
466 subroutine hpb_partition
467 implicit real*8 (a-h,o-z)
469 include 'DIMENSIONS.ZSCOPT'
470 include 'COMMON.SBRIDGE'
471 include 'COMMON.IOUNITS'
474 cd write (iout,*) 'Processor',MyID,' MyRank',MyRank,
475 cd & ' nhpb',nhpb,' link_start=',link_start,
476 cd & ' link_end',link_end