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'/
289 & "WSC ","WSCP ","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC",
291 & "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR ","WTORD",
292 ! 15 16 17 18 19 20 21
293 & "WHPB ","WVDWPP","WSCP14","WBOND","WSCCOR","WDIHC","WSC",
294 ! 22 23 24 25 26 27 28
295 & "WLIPTRAN","WAFM","WTHETC","WSHIELD","WSAXS","WHOMO","WDFAD",
297 & "WDFAT","WDFAN","WDFAB"/
299 #if defined(SCP14) && defined(SPLITELE)
301 data print_order/1,2,18,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
302 & 24,15,26,27,28,29,30,31,22,23,25,20/
305 data print_order/1,2,18,3,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
306 & 24,15,26,27,28,29,30,31,22,23,25,20,0/
307 #elif defined(SPLITELE)
309 data print_order/1,2,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
310 & 24,15,26,27,28,29,30,31,22,23,25,20,0/
313 data print_order/1,2,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
314 & 24,15,26,27,28,29,30,31,22,23,25,20,2*0/
317 #if defined(SCP14) && defined(SPLITELE)
319 data print_order/1,2,18,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
320 & 24,15,26,27,22,23,25,20,4*0/
323 data print_order/1,2,18,3,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
324 & 24,15,26,27,22,23,25,20,5*0/
325 #elif defined(SPLITELE)
327 data print_order/1,2,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
328 & 24,15,26,27,22,23,25,20,5*0/
331 data print_order/1,2,3,16,17,11,12,13,14,4,5,6,7,8,9,10,21,19,
332 & 24,15,26,27,22,23,25,20,6*0/
336 c---------------------------------------------------------------------------
337 subroutine init_int_table
338 implicit real*8 (a-h,o-z)
340 include 'COMMON.CHAIN'
341 include 'COMMON.INTERACT'
342 include 'COMMON.LOCAL'
343 include 'COMMON.SBRIDGE'
344 include 'COMMON.IOUNITS'
345 include "COMMON.TORCNSTR"
346 logical scheck,lprint
362 cd write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb',
363 cd & (ihpb(i),jhpb(i),i=1,nss)
368 if (ihpb(ii).eq.i+nres) then
375 cd write (iout,*) 'i=',i,' scheck=',scheck,' jj=',jj
381 else if (jj.eq.nct) then
396 ind_scint=int_scint+nct-i
403 write (iout,'(a)') 'Interaction array:'
405 write (iout,'(i3,2(2x,2i3))')
406 & i,(istart(i,iint),iend(i,iint),iint=1,nint_gr(i))
417 write (iout,'(a)') 'Electrostatic interaction array:'
419 write (iout,'(i3,2(2x,2i3))') i,ielstart(i),ielend(i)
424 C Partition the SC-p interaction array
428 if (i.lt.nnt+iscp) then
430 iscpstart(i,1)=i+iscp
432 elseif (i.gt.nct-iscp) then
440 iscpstart(i,2)=i+iscp
445 write (iout,'(a)') 'SC-p interaction array:'
446 do i=iatscp_s,iatscp_e
447 write (iout,'(i3,2(2x,2i3))')
448 & i,(iscpstart(i,j),iscpend(i,j),j=1,nscp_gr(i))
451 C Partition local interactions
463 idihconstr_end=ndih_constr
465 ithetaconstr_end=ntheta_constr
470 write (iout,*) "OSAXS_START",isaxs_start," ISAXS_END",isaxs_end
473 c---------------------------------------------------------------------------
474 subroutine int_partition(int_index,lower_index,upper_index,atom,
475 & at_start,at_end,first_atom,last_atom,int_gr,jat_start,jat_end,*)
476 implicit real*8 (a-h,o-z)
478 include 'COMMON.IOUNITS'
479 integer int_index,lower_index,upper_index,atom,at_start,at_end,
480 & first_atom,last_atom,int_gr,jat_start,jat_end
483 if (lprn) write (iout,*) 'int_index=',int_index
484 int_index_old=int_index
485 int_index=int_index+last_atom-first_atom+1
487 & write (iout,*) 'int_index=',int_index,
488 & ' int_index_old',int_index_old,
489 & ' lower_index=',lower_index,
490 & ' upper_index=',upper_index,
491 & ' atom=',atom,' first_atom=',first_atom,
492 & ' last_atom=',last_atom
493 if (int_index.ge.lower_index) then
495 if (at_start.eq.0) then
497 jat_start=first_atom-1+lower_index-int_index_old
501 if (lprn) write (iout,*) 'jat_start',jat_start
502 if (int_index.ge.upper_index) then
504 jat_end=first_atom-1+upper_index-int_index_old
509 if (lprn) write (iout,*) 'jat_end',jat_end
513 c------------------------------------------------------------------------------
514 subroutine hpb_partition
515 implicit real*8 (a-h,o-z)
517 include 'COMMON.SBRIDGE'
518 include 'COMMON.IOUNITS'
523 write (iout,*) 'HPB_PARTITION',
524 & ' nhpb',nhpb,' link_start=',link_start,
525 & ' link_end',link_end,' link_start_peak',link_start_peak,
526 & ' link_end_peak',link_end_peak
529 c------------------------------------------------------------------------------
530 subroutine homology_partition
531 implicit real*8 (a-h,o-z)
533 include 'COMMON.SBRIDGE'
534 include 'COMMON.IOUNITS'
535 include 'COMMON.CONTROL'
536 include 'COMMON.HOMOLOGY'
537 include 'COMMON.HOMRESTR'
538 include 'COMMON.INTERACT'
539 cd write(iout,*)"homology_partition: lim_odl=",lim_odl,
540 cd & " lim_dih",lim_dih
542 link_end_homo=lim_odl
543 idihconstr_start_homo=nnt+3
544 idihconstr_end_homo=lim_dih+nnt-1+3
546 & ' lim_odl',lim_odl,' link_start=',link_start_homo,
547 & ' link_end',link_end_homo,' lim_dih',lim_dih,
548 & ' idihconstr_start_homo',idihconstr_start_homo,
549 & ' idihconstr_end_homo',idihconstr_end_homo