added source code
[unres.git] / source / unres / src_MD-M / xdrf2pdb / xdrf2x.F
1       real coord(3,1000)
2       real prec,time,potE,uconst,t_bath,qfrag(100)
3       integer ihpb(100),jhpb(100),iset
4       character*80 arg
5       
6       print *,"start"
7       call getarg(1,arg)
8
9       print *,arg
10 #ifdef BLUEGENE
11       call xdrfopen_(ixdrf,arg, "r", iret)
12        
13       do while(.true.) 
14        call xdrffloat_(ixdrf, time, iret)
15        if(iret.eq.0) goto 10
16        call xdrffloat_(ixdrf, potE, iret)
17        call xdrffloat_(ixdrf, uconst, iret)
18        call xdrffloat_(ixdrf, t_bath, iret)
19        call xdrfint_(ixdrf, nss, iret) 
20        do j=1,nss
21         call xdrfint_(ixdrf, ihpb(j), iret)
22         call xdrfint_(ixdrf, jhpb(j), iret)
23        enddo
24        call xdrfint_(ixdrf, nfrag, iret)
25        call xdrfint_(ixdrf, iset, iret)
26        do i=1,nfrag
27         call xdrffloat_(ixdrf, qfrag(i), iret)
28        enddo
29        prec=10000.0
30
31        isize=0
32        call xdrf3dfcoord_(ixdrf, coord, isize, prec, iret)
33 #else
34       call xdrfopen(ixdrf,arg, "r", iret)
35        
36       do while(.true.) 
37        call xdrffloat(ixdrf, time, iret)
38        if(iret.eq.0) goto 10
39        call xdrffloat(ixdrf, potE, iret)
40        call xdrffloat(ixdrf, uconst, iret)
41        call xdrffloat(ixdrf, t_bath, iret)
42        call xdrfint(ixdrf, nss, iret) 
43        do j=1,nss
44         call xdrfint(ixdrf, ihpb(j), iret)
45         call xdrfint(ixdrf, jhpb(j), iret)
46        enddo
47        call xdrfint(ixdrf, nfrag, iret)
48        call xdrfint(ixdrf, iset, iret)
49        do i=1,nfrag
50         call xdrffloat(ixdrf, qfrag(i), iret)
51        enddo
52        prec=10000.0
53
54        isize=0
55        call xdrf3dfcoord(ixdrf, coord, isize, prec, iret)
56 #endif
57
58        write (*,'(e15.8,2e15.5,f12.5,$)') time,potE,uconst,t_bath
59        write (*,'(i4,$)') nss,(ihpb(j),jhpb(j),j=1,nss)
60        write (*,'(i4)') iset
61        write (*,'(i4,20f7.4)') nfrag,(qfrag(i),i=1,nfrag)
62        write (*,'(8f10.5)') ((coord(k,j),k=1,3),j=1,isize)
63       enddo
64   10  continue
65       end