2 C Program to compute average properties from MREMD/WHAM results
9 integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE)
12 include 'COMMON.TIME1'
13 include 'COMMON.INTERACT'
14 include 'COMMON.NAMES'
16 include 'COMMON.HEADER'
17 include 'COMMON.CONTROL'
18 include 'COMMON.CHAIN'
20 include 'COMMON.CLUSTER'
21 include 'COMMON.IOUNITS'
23 include 'COMMON.CONTACTS'
24 logical printang(max_cut)
25 integer printpdb(max_cut)
26 integer printmol2(max_cut)
28 REAL CRIT(maxconf),MEMBR(maxconf)
29 REAL CRITVAL(maxconf-1)
30 INTEGER IA(maxconf),IB(maxconf)
31 INTEGER ICLASS(maxconf,maxconf-1),HVALS(maxconf-1)
32 INTEGER IORDER(maxconf-1),HEIGHT(maxconf-1)
34 integer i,j,k,l,m,n,len,lev,idum,ii,ind,ioffset,jj,icut,ncon,
35 & it,ncon_work,ind1,kkk
36 double precision t1,t2,tcpu,difconf
38 double precision varia(maxvar)
39 double precision hrtime,mintime,sectime
42 call MPI_Init( IERROR )
43 call MPI_Comm_rank( MPI_COMM_WORLD, me, IERROR )
44 call MPI_Comm_size( MPI_COMM_WORLD, nprocs, IERROR )
47 write(iout,*) "SEVERE ERROR - Can't initialize MPI."
48 call mpi_finalize(ierror)
51 if (nprocs.gt.MaxProcs+1) then
52 write (2,*) "Error - too many processors",
54 write (2,*) "Increase MaxProcs and recompile"
55 call MPI_Finalize(IERROR)
66 call read_ref_structure(*30)
67 call contact(.true.,ncont_ref,icont_ref,nnt,nct)
69 write (iout,*) 'MAIN: nnt=',nnt,' nct=',nct
72 write (iout,*) 'MAIN: nnt=',nnt,' nct=',nct
74 call read_coords(ncon,*20)
75 write (iout,*) 'from read_coords: ncon',ncon
78 call work_partition(.true.,ncon)
81 call ave_property(ncon,*20)
84 WRITE (iout,'(/a,1pe14.5,a/)')
85 & 'Time for energy/property calculation:',T2-T1,' sec.'
87 PRINT '(a)','End of energy/property computation'
89 close(icbase,status="delete")
90 write (iout,*) "icbase closed"
93 call MPI_Finalize(MPI_COMM_WORLD,IERROR)
94 write (iout,*) "MPI finalized"
97 stop '********** Program terminated normally.'
98 20 write (iout,*) "Error reading coordinates"
100 call MPI_Finalize(MPI_COMM_WORLD,IERROR)
103 30 write (iout,*) "Error reading reference structure"
105 call MPI_Finalize(MPI_COMM_WORLD,IERROR)