subroutine str_rasmol(nbin_tot) parameter (nmax = 2000, ifreq=50, infile=5) ! nmax - maximum of particles in each configuration ! ifreq - frequency of 'small' file writing ! infile - number of files for rasmol produced (n<26) real pos(3,nmax) integer i_bin(26) character*9 name(26), atm character*20 title data name/'str11.xyz','str12.xyz','str13.xyz','str14.xyz', 1'str15.xyz','str16.xyz','str17.xyz','str18.xyz','str19.xyz', 2'str20.xyz','str21.xyz','str22.xyz','str23.xyz','str24.xyz', 3'str25.xyz','str26.xyz','str27.xyz','str28.xyz','str29.xyz', 4'str30.xyz','str31.xyz','str32.xyz','str33.xyz','str34.xyz', 5'str35.xyz','str36.xyz'/ data atm/'H'/ i_bin(1)= 1 i_bin(infile+1) = nbin_tot print *, i_bin(1) nstr = int(float(nbin_tot)/infile) do i = 1,infile-1 i_bin(i+1)= i*nstr print *, i_bin(i+1) enddo print *, i_bin(infile+1) title = 'adsorption configuration - working case' !!! pi = 4.*atan(1.) k = 1 ! parametr: i_bin(k) open(60,file='mc.pos',status='old') open(50,file='mcsmall.pos',status='unknown') !smaller version of mc.pos iout = 0 1122 read(60,*,end=1234 ) nbin, natom iout = iout +1 if(iout.eq.ifreq) write(50,*)nbin, natom if(natom.gt.nmax) stop ' too many atoms !!!' do i = 1,natom read(60,*) pos(1,i), pos(2,i), pos(3,i) if(iout.eq.ifreq) write(50,*)pos(1,i), pos(2,i), pos(3,i) enddo if(iout.eq.ifreq)iout = 0 if(nbin.eq.i_bin(k)) then print *, k,' ',name(k) open(k,file=name(k),status='unknown') write(k,*) natom write(k,'(a)') title do i = 1,natom write(k,'(a,3(3x,f12.5))')atm, pos(1,i), pos(2,i), pos(3,i) enddo close(k) if(k.lt.infile+1) k = k + 1 endif go to 1122 1234 close(60) close(50) end