C C Program to compute average properties from MREMD/WHAM results C implicit none include 'DIMENSIONS' include 'sizesclu.dat' #ifdef MPI include "mpif.h" integer IERROR,ERRCODE,STATUS(MPI_STATUS_SIZE) include "COMMON.MPI" #endif include 'COMMON.TIME1' include 'COMMON.INTERACT' include 'COMMON.NAMES' include 'COMMON.GEO' include 'COMMON.HEADER' include 'COMMON.CONTROL' include 'COMMON.CHAIN' include 'COMMON.VAR' include 'COMMON.CLUSTER' include 'COMMON.IOUNITS' include 'COMMON.FREE' include 'COMMON.CONTACTS' logical printang(max_cut) integer printpdb(max_cut) integer printmol2(max_cut) character*240 lineh REAL CRIT(maxconf),MEMBR(maxconf) REAL CRITVAL(maxconf-1) INTEGER IA(maxconf),IB(maxconf) INTEGER ICLASS(maxconf,maxconf-1),HVALS(maxconf-1) INTEGER IORDER(maxconf-1),HEIGHT(maxconf-1) integer nn,ndis integer i,j,k,l,m,n,len,lev,idum,ii,ind,ioffset,jj,icut,ncon, & it,ncon_work,ind1,kkk double precision t1,t2,tcpu,difconf double precision varia(maxvar) double precision hrtime,mintime,sectime logical eof #ifdef MPI call MPI_Init( IERROR ) call MPI_Comm_rank( MPI_COMM_WORLD, me, IERROR ) call MPI_Comm_size( MPI_COMM_WORLD, nprocs, IERROR ) Master = 0 if (ierror.gt.0) then write(iout,*) "SEVERE ERROR - Can't initialize MPI." call mpi_finalize(ierror) stop endif if (nprocs.gt.MaxProcs+1) then write (2,*) "Error - too many processors", & nprocs,MaxProcs+1 write (2,*) "Increase MaxProcs and recompile" call MPI_Finalize(IERROR) stop endif #endif call initialize call openunits call parmread call read_control call molread call promienie if (refstr) then call read_ref_structure(*30) call contact(.true.,ncont_ref,icont_ref,nnt,nct) endif write (iout,*) 'MAIN: nnt=',nnt,' nct=',nct call flush(iout) call permut(symetr) write (iout,*) 'MAIN: nnt=',nnt,' nct=',nct call flush(iout) call read_coords(ncon,*20) write (iout,*) 'from read_coords: ncon',ncon call flush(iout) #ifdef MPI call work_partition(.true.,ncon) #endif call ave_property(ncon,*20) t2=tcpu() WRITE (iout,'(/a,1pe14.5,a/)') & 'Time for energy/property calculation:',T2-T1,' sec.' t1=tcpu() PRINT '(a)','End of energy/property computation' call flush(iout) close(icbase,status="delete") write (iout,*) "icbase closed" call flush(iout) #ifdef MPI call MPI_Finalize(MPI_COMM_WORLD,IERROR) write (iout,*) "MPI finalized" call flush(iout) #endif stop '********** Program terminated normally.' 20 write (iout,*) "Error reading coordinates" #ifdef MPI call MPI_Finalize(MPI_COMM_WORLD,IERROR) #endif stop 30 write (iout,*) "Error reading reference structure" #ifdef MPI call MPI_Finalize(MPI_COMM_WORLD,IERROR) #endif stop end