program makef2 character*80 fn character*2 sy parameter (nat0=15000) dimension xx(nat0),izz(nat0),yy(nat0),zz(nat0) c write(6,6000) 6000 format(' Making big FILE.X movie file from tinker outputs',/, 1 ' STRUCT.LST ... list of structures ',/,/, 2 ' Interval of atoms, frequency (N1 N2 NF):',$) read(5,*)NA1,NA2,NF istr=0 iwr=0 open(2,file='STRUCT.LST') open(3,file='FILE.X') nacon=-999 1 read(2,200,end=500,err=500)fn 200 format(a80) c istr=istr+1 if(mod(istr,NF).eq.0)then open(4,file=fn) read(4,*)nat if(nacon.eq.-999)nacon=nat if(nacon.ne.nat)then write(6,800)istr,nacon,nat 800 format(3i6,' number of atoms varies') close(4) close(3) stop endif if(NA2.gt.nat)then write(6,*)'Upper limit > total number of atoms' close(4) stop endif if(nat.gt.nat0)then write(6,*)'Too many atoms' close(4) close(3) stop endif iaa=0 do 2 ia=1,nat read(4,400)sy,x,y,z 400 format(7x,a2,2x,3f12.6) iz=0 if(sy.eq.' N')iz=7 if(sy.eq.' O')iz=8 if(sy.eq.' C')iz=6 if(sy.eq.' H')iz=1 if(sy.eq.' S')iz=16 if(iz.eq.0)then write(6,*)'Unknown atom ',sy,ia iz=1 endif if(ia.ge.NA1.and.ia.le.NA2)then iaa=iaa+1 izz(iaa)=iz xx(iaa)=x yy(iaa)=y zz(iaa)=z endif 2 continue close(4) iwr=iwr+1 write(3,200)fn write(3,*)NA2-NA1+1 do 91 iaa=1,NA2-NA1+1 91 write(3,300)izz(iaa),xx(iaa),yy(iaa),zz(iaa) 300 format(i3,3f12.6) endif write(6,200)fn goto 1 500 close(2) close(3) write(6,*)iwr,' of ',istr,' geometries taken' write(6,*)' FILE.X made.' stop end