2 double precision vec(3,1000,20),xtemp,ytemp,ztemp
3 cc vector is in the sequence: position, number of atom, number of chain
4 character*80 inname,outname,incontrol
6 character*3 atype(1000),restyp(1000),atyptemp,resttemp,chain
7 integer natoms,i,ncopies,atnum,renum(1000),irestemp,actatom
9 double precision occupan(1000),tempfact(1000),occutemp,temptemp
11 call getarg(2,outname)
12 call getarg(3,incontrol)
16 open (6,file=incontrol, status='old')
17 read (6,*) natoms,ncopies,unres
18 open (1,file=inname, status='old')
21 read (1,*) junk,atnum,atyptemp,resttemp,chain,irestemp,xtemp,
22 &ytemp, ztemp,occutemp,temptemp
35 read (1,*) junk,atnum,atyptemp,resttemp,irestemp,xtemp,ytemp,
47 write (*,*) "end of reading"
51 if (k.eq.1) chain=" A"
53 actatom=natoms*(k-1)+i
54 write (4,'(a8,i3,a4,a4,a2,i3,f12.3,2f8.3,2f6.2)') junk, actatom
55 &, atype(i),restyp(i),chain,
56 &renum(i), (vec(j,i,k),j=1,3),occupan(i),tempfact(i)
58 write (4,'(a3)') "TER"