X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=source%2Funres%2Fsrc_MD%2Finitialize_p.F;h=2b88edf33f9b5159039518274d1b70e43b21d626;hb=3e42b5f53e0ec03cd03009f3b857931ce7ee25c2;hp=62706fba9a6bf6b405ea9f0e6fb5cb10c173d441;hpb=d209eee3dec438628ee9d5a9c990ad9ca9dec1c5;p=unres.git diff --git a/source/unres/src_MD/initialize_p.F b/source/unres/src_MD/initialize_p.F index 62706fb..2b88edf 100644 --- a/source/unres/src_MD/initialize_p.F +++ b/source/unres/src_MD/initialize_p.F @@ -37,8 +37,9 @@ cMS$ATTRIBUTES C :: proc_proc include 'COMMON.MINIM' include 'COMMON.DERIV' include 'COMMON.SPLITELE' + include 'COMMON.MD' c Common blocks from the diagonalization routines - COMMON /IOFILE/ IR,IW,IP,IJK,IPK,IDAF,NAV,IODA(400) + COMMON /IOFILE/ IR,IW,IPP,IJK,IPK,IDAF,NAV,IODA(400) COMMON /MACHSW/ KDIAG,ICORFL,IXDR logical mask_r c real*8 text1 /'initial_i'/ @@ -191,37 +192,15 @@ c call memmon_print_usage() enddo nlob(ntyp1)=0 dsc(ntyp1)=0.0D0 - do i=-maxtor,maxtor + do i=1,maxtor itortyp(i)=0 - do iblock=1,2 - do j=-maxtor,maxtor + do j=1,maxtor do k=1,maxterm - v1(k,j,i,iblock)=0.0D0 - v2(k,j,i,iblock)=0.0D0 + v1(k,j,i)=0.0D0 + v2(k,j,i)=0.0D0 enddo enddo - enddo enddo - do iblock=1,2 - do i=-maxtor,maxtor - do j=-maxtor,maxtor - do k=-maxtor,maxtor - do l=1,maxtermd_1 - v1c(1,l,i,j,k,iblock)=0.0D0 - v1s(1,l,i,j,k,iblock)=0.0D0 - v1c(2,l,i,j,k,iblock)=0.0D0 - v1s(2,l,i,j,k,iblock)=0.0D0 - enddo !l - do l=1,maxtermd_2 - do m=1,maxtermd_2 - v2c(m,l,i,j,k,iblock)=0.0D0 - v2s(m,l,i,j,k,iblock)=0.0D0 - enddo !m - enddo !l - enddo !k - enddo !j - enddo !i - enddo !iblock do i=1,maxres itype(i)=0 itel(i)=0 @@ -267,6 +246,7 @@ C #ifndef SPLITELE nprint_ene=nprint_ene-1 #endif + usampl=.true. return end c------------------------------------------------------------------------- @@ -276,13 +256,9 @@ c------------------------------------------------------------------------- include 'COMMON.NAMES' include 'COMMON.FFIELD' data restyp / - &'DD' ,'DPR','DLY','DAR','DHI','DAS','DGL','DSG','DGN','DSN','DTH', - &'DYY','DAL','DTY','DTR','DVA','DLE','DIL','DPN','MED','DCY','ZER', &'CYS','MET','PHE','ILE','LEU','VAL','TRP','TYR','ALA','GLY','THR', &'SER','GLN','ASN','GLU','ASP','HIS','ARG','LYS','PRO','D'/ data onelet / - &'z','p','k','r','h','d','e','n','q','s','t','g', - &'a','y','w','v','l','i','f','m','c','x', &'C','M','F','I','L','V','W','Y','A','G','T', &'S','Q','N','E','D','H','R','K','P','X'/ data potname /'LJ','LJK','BP','GB','GBV'/ @@ -290,15 +266,16 @@ c------------------------------------------------------------------------- & "EVDW SC-SC","EVDW2 SC-p","EES p-p","ECORR4 ","ECORR5 ", & "ECORR6 ","EELLO ","ETURN3 ","ETURN4 ","ETURN6 ", & "EBE bend","ESC SCloc","ETORS ","ETORSD ","EHPB ","EVDWPP ", - & "ESTR ","EVDW2_14 ","UCONST ", " ","ESCCOR"," "," "/ + & "ESTR ","EVDW2_14 ","UCONST ", " ","ESCCOR"," "," ", + & "Ehomology","DFA DIS","DFA TOR","DFA NEI","DFA BET"/ data wname / & "WSC","WSCP","WELEC","WCORR","WCORR5","WCORR6","WEL_LOC", & "WTURN3","WTURN4","WTURN6","WANG","WSCLOC","WTOR","WTORD", & "WSTRAIN","WVDWPP","WBOND","SCAL14"," "," ","WSCCOR", - & " "," "/ - data nprint_ene /20/ + & " "," ","EHOMO","WDFAD","WDFAT","WDFAN","WDFAB"/ + data nprint_ene /25/ data print_order/1,2,3,11,12,13,14,4,5,6,7,8,9,10,19,18,15,17,16, - & 21,0,0,0/ + & 21,24,25,26,27,28,0,0,0/ end c--------------------------------------------------------------------------- subroutine init_int_table @@ -318,11 +295,12 @@ c--------------------------------------------------------------------------- include 'COMMON.IOUNITS' include 'COMMON.DERIV' include 'COMMON.CONTACTS' - common /przechowalnia/ iturn3_start_all(0:MaxProcs), - & iturn3_end_all(0:MaxProcs),iturn4_start_all(0:MaxProcs), - & iturn4_end_all(0:MaxProcs),iatel_s_all(0:MaxProcs), - & iatel_e_all(0:MaxProcs),ielstart_all(maxres,0:MaxProcs-1), - & ielend_all(maxres,0:MaxProcs-1), + include 'COMMON.MD' + common /przechowalnia/ iturn3_start_all(0:max_fg_procs), + & iturn3_end_all(0:max_fg_procs),iturn4_start_all(0:max_fg_procs), + & iturn4_end_all(0:max_fg_procs),iatel_s_all(0:max_fg_procs), + &iatel_e_all(0:max_fg_procs),ielstart_all(maxres,0:max_fg_procs-1), + & ielend_all(maxres,0:max_fg_procs-1), & ntask_cont_from_all(0:max_fg_procs-1), & itask_cont_from_all(0:max_fg_procs-1,0:max_fg_procs-1), & ntask_cont_to_all(0:max_fg_procs-1), @@ -371,6 +349,7 @@ cd write (iout,*) 'ns=',ns,' nss=',nss,' ihpb,jhpb', cd & (ihpb(i),jhpb(i),i=1,nss) do i=nnt,nct-1 scheck=.false. + if (dyn_ss) goto 10 do ii=1,nss if (ihpb(ii).eq.i+nres) then scheck=.true. @@ -583,6 +562,7 @@ C Partition local interactions call int_bounds(nres-2,ithet_start,ithet_end) ithet_start=ithet_start+2 ithet_end=ithet_end+2 + write (iout,*) "ithet_start",ithet_start," ithet_end",ithet_end call int_bounds(nct-nnt-2,iturn3_start,iturn3_end) iturn3_start=iturn3_start+nnt iphi_start=iturn3_start+2 @@ -1142,15 +1122,16 @@ c--------------------------------------------------------------------------- include "COMMON.INTERACT" include "COMMON.SETUP" include "COMMON.IOUNITS" - integer ii,jj,itask(4),ntask_cont_to,itask_cont_to(0:MaxProcs-1) + integer ii,jj,itask(4), + & ntask_cont_to,itask_cont_to(0:max_fg_procs-1) logical flag integer iturn3_start_all,iturn3_end_all,iturn4_start_all, & iturn4_end_all,iatel_s_all,iatel_e_all,ielstart_all,ielend_all - common /przechowalnia/ iturn3_start_all(0:MaxProcs), - & iturn3_end_all(0:MaxProcs),iturn4_start_all(0:MaxProcs), - & iturn4_end_all(0:MaxProcs),iatel_s_all(0:MaxProcs), - & iatel_e_all(0:MaxProcs),ielstart_all(maxres,0:MaxProcs-1), - & ielend_all(maxres,0:MaxProcs-1) + common /przechowalnia/ iturn3_start_all(0:max_fg_procs), + & iturn3_end_all(0:max_fg_procs),iturn4_start_all(0:max_fg_procs), + & iturn4_end_all(0:max_fg_procs),iatel_s_all(0:max_fg_procs), + &iatel_e_all(0:max_fg_procs),ielstart_all(maxres,0:max_fg_procs-1), + & ielend_all(maxres,0:max_fg_procs-1) integer iproc,isent,k,l c Determines whether to send interaction ii,jj to other processors; a given c interaction can be sent to at most 2 processors. @@ -1232,15 +1213,15 @@ c--------------------------------------------------------------------------- include "COMMON.SETUP" include "COMMON.IOUNITS" integer ii,jj,itask(2),ntask_cont_from, - & itask_cont_from(0:MaxProcs-1) + & itask_cont_from(0:max_fg_procs-1) logical flag integer iturn3_start_all,iturn3_end_all,iturn4_start_all, & iturn4_end_all,iatel_s_all,iatel_e_all,ielstart_all,ielend_all - common /przechowalnia/ iturn3_start_all(0:MaxProcs), - & iturn3_end_all(0:MaxProcs),iturn4_start_all(0:MaxProcs), - & iturn4_end_all(0:MaxProcs),iatel_s_all(0:MaxProcs), - & iatel_e_all(0:MaxProcs),ielstart_all(maxres,0:MaxProcs-1), - & ielend_all(maxres,0:MaxProcs-1) + common /przechowalnia/ iturn3_start_all(0:max_fg_procs), + & iturn3_end_all(0:max_fg_procs),iturn4_start_all(0:max_fg_procs), + & iturn4_end_all(0:max_fg_procs),iatel_s_all(0:max_fg_procs), + &iatel_e_all(0:max_fg_procs),ielstart_all(maxres,0:max_fg_procs-1), + & ielend_all(maxres,0:max_fg_procs-1) integer iproc,k,l do iproc=fg_rank+1,nfgtasks-1 do k=iturn3_start_all(iproc),iturn3_end_all(iproc) @@ -1292,7 +1273,7 @@ c--------------------------------------------------------------------------- subroutine add_task(iproc,ntask_cont,itask_cont) implicit none include "DIMENSIONS" - integer iproc,ntask_cont,itask_cont(0:MaxProcs-1) + integer iproc,ntask_cont,itask_cont(0:max_fg_procs-1) integer ii do ii=1,ntask_cont if (itask_cont(ii).eq.iproc) return @@ -1401,6 +1382,7 @@ c------------------------------------------------------------------------------ include 'COMMON.IOUNITS' include 'COMMON.SETUP' include 'COMMON.CONTROL' +c write(2,*)"hpb_partition: nhpb=",nhpb #ifdef MPI call int_bounds(nhpb,link_start,link_end) if (.not. out1file) @@ -1412,5 +1394,49 @@ c------------------------------------------------------------------------------ link_start=1 link_end=nhpb #endif +c write(2,*)"hpb_partition: link_start=",nhpb," link_end=",link_end + return + end +c------------------------------------------------------------------------------ + subroutine homology_partition + implicit real*8 (a-h,o-z) + include 'DIMENSIONS' +#ifdef MPI + include 'mpif.h' +#endif + include 'COMMON.SBRIDGE' + include 'COMMON.IOUNITS' + include 'COMMON.SETUP' + include 'COMMON.CONTROL' + include 'COMMON.MD' + include 'COMMON.INTERACT' +cd write(iout,*)"homology_partition: lim_odl=",lim_odl, +cd & " lim_dih",lim_dih +#ifdef MPI + if (me.eq.king .or. .not. out1file) write (iout,*) "MPI" + call int_bounds(lim_odl,link_start_homo,link_end_homo) + call int_bounds(lim_dih,idihconstr_start_homo, + & idihconstr_end_homo) + idihconstr_start_homo=idihconstr_start_homo+nnt-1+3 + idihconstr_end_homo=idihconstr_end_homo+nnt-1+3 + if (me.eq.king .or. .not. out1file) + & write (iout,*) 'Processor',fg_rank,' CG group',kolor, + & ' absolute rank',MyRank, + & ' lim_odl',lim_odl,' link_start=',link_start_homo, + & ' link_end',link_end_homo,' lim_dih',lim_dih, + & ' idihconstr_start_homo',idihconstr_start_homo, + & ' idihconstr_end_homo',idihconstr_end_homo +#else + write (iout,*) "Not MPI" + link_start_homo=1 + link_end_homo=lim_odl + idihconstr_start_homo=nnt+3 + idihconstr_end_homo=lim_dih+nnt-1+3 + write (iout,*) + & ' lim_odl',lim_odl,' link_start=',link_start_homo, + & ' link_end',link_end_homo,' lim_dih',lim_dih, + & ' idihconstr_start_homo',idihconstr_start_homo, + & ' idihconstr_end_homo',idihconstr_end_homo +#endif return end