subroutine openunits #ifdef WIN use dfport #endif implicit real*8 (a-h,o-z) include 'DIMENSIONS' include 'DIMENSIONS.ZSCOPT' #ifdef MPI include 'mpif.h' include 'COMMON.MPI' integer MyRank character*3 liczba #endif include 'COMMON.IOUNITS' integer lenpre,lenpot,ilen external ilen #ifdef MPI MyRank=Me #endif call mygetenv('PREFIX',prefix) call mygetenv('SCRATCHDIR',scratchdir) call mygetenv('POT',pot) lenpre=ilen(prefix) lenpot=ilen(pot) call mygetenv('POT',pot) entname=prefix(:lenpre)//'_'//pot(:lenpot)//'.entr' C Get the names and open the input files open (1,file=prefix(:ilen(prefix))//'.inp',status='old') C Get parameter filenames and open the parameter files. call mygetenv('BONDPAR',bondname) open (ibond,file=bondname,status='old') call mygetenv('THETPAR',thetname) open (ithep,file=thetname,status='old') call mygetenv('ROTPAR',rotname) open (irotam,file=rotname,status='old') call mygetenv('TORPAR',torname) open (itorp,file=torname,status='old') call mygetenv('TORDPAR',tordname) open (itordp,file=tordname,status='old') call mygetenv('FOURIER',fouriername) open (ifourier,file=fouriername,status='old') call mygetenv('SCCORPAR',sccorname) open (isccor,file=sccorname,status='old') call mygetenv('ELEPAR',elename) open (ielep,file=elename,status='old') call mygetenv('SIDEPAR',sidename) open (isidep,file=sidename,status='old') call mygetenv('SIDEP',sidepname) open (isidep1,file=sidepname,status="old") #ifndef OLDSCP C C 8/9/01 In the newest version SCp interaction constants are read from a file C Use -DOLDSCP to use hard-coded constants instead. C call mygetenv('SCPPAR',scpname) open (iscpp,file=scpname,status='old') #endif #ifdef MPL if (MyID.eq.BossID) then MyRank = MyID/fgProcs #endif #ifdef MPI print *,'OpenUnits: processor',MyRank call numstr(MyRank,liczba) outname=prefix(:lenpre)//'.out_'//pot(:lenpot)//liczba #else outname=prefix(:lenpre)//'.out_'//pot(:lenpot) #endif open(iout,file=outname,status='unknown') write (iout,'(80(1h-))') write (iout,'(30x,a)') "FILE ASSIGNMENT" write (iout,'(80(1h-))') write (iout,*) "Input file : ", & prefix(:ilen(prefix))//'.inp' write (iout,*) "Output file : ", & outname(:ilen(outname)) write (iout,*) write (iout,*) "Sidechain potential file : ", & sidename(:ilen(sidename)) #ifndef OLDSCP write (iout,*) "SCp potential file : ", & scpname(:ilen(scpname)) #endif write (iout,*) "Electrostatic potential file : ", & elename(:ilen(elename)) write (iout,*) "Cumulant coefficient file : ", & fouriername(:ilen(fouriername)) write (iout,*) "Torsional parameter file : ", & torname(:ilen(torname)) write (iout,*) "Double torsional parameter file : ", & tordname(:ilen(tordname)) write (iout,*) "Backbone-rotamer parameter file : ", & sccorname(:ilen(sccorname)) write (iout,*) "Bond & inertia constant file : ", & bondname(:ilen(bondname)) write (iout,*) "Bending parameter file : ", & thetname(:ilen(thetname)) write (iout,*) "Rotamer parameter file : ", & rotname(:ilen(rotname)) write (iout,'(80(1h-))') write (iout,*) return end