wham and cluster_wham Adam's new constr_dist multichain
[unres.git] / source / unres / src_MD-M / shift.F
1 c---------------------------------
2       subroutine csa_read
3       implicit real*8 (a-h,o-z)
4       include 'DIMENSIONS'
5       include 'COMMON.CSA'
6       include 'COMMON.BANK'
7       include 'COMMON.IOUNITS'
8
9       open(icsa_in,file=csa_in,status="old",err=100)
10        read(icsa_in,*) nconf
11        read(icsa_in,*) jstart,jend
12        read(icsa_in,*) nstmax
13        read(icsa_in,*) n1,n2,n3,n4,n5,n6,n7,n8,is1,is2
14        read(icsa_in,*) nran0,nran1,irr
15        read(icsa_in,*) nseed
16        read(icsa_in,*) ntotal,cut1,cut2
17        read(icsa_in,*) estop
18        read(icsa_in,*) icmax,irestart
19        read(icsa_in,*) ntbankm,dele,difcut
20        read(icsa_in,*) iref,rmscut,pnccut
21        read(icsa_in,*) ndiff
22       close(icsa_in)
23
24       return
25
26  100  continue
27       return
28       end
29 c---------------------------------
30       subroutine initial_write
31       implicit real*8 (a-h,o-z)
32       include 'DIMENSIONS'
33       include 'COMMON.CSA'
34       include 'COMMON.BANK'
35       include 'COMMON.IOUNITS'
36
37       open(icsa_seed,file=csa_seed,status="unknown")
38        write(icsa_seed,*) "seed"
39       close(31)
40 #if defined(AIX) || defined(PGI)
41        open(icsa_history,file=csa_history,status="unknown",
42      &  position="append")
43 #else
44        open(icsa_history,file=csa_history,status="unknown",
45      &  access="append")
46 #endif
47        write(icsa_history,*) nconf
48        write(icsa_history,*) jstart,jend
49        write(icsa_history,*) nstmax
50        write(icsa_history,*) n1,n2,n3,n4,n5,n6,n7,n8,is1,is2
51        write(icsa_history,*) nran0,nran1,irr
52        write(icsa_history,*) nseed
53        write(icsa_history,*) ntotal,cut1,cut2
54        write(icsa_history,*) estop
55        write(icsa_history,*) icmax,irestart
56        write(icsa_history,*) ntbankm,dele,difcut
57        write(icsa_history,*) iref,rmscut,pnccut
58        write(icsa_history,*) ndiff
59
60        write(icsa_history,*)
61       close(icsa_history)
62
63       open(icsa_bank1,file=csa_bank1,status="unknown")
64        write(icsa_bank1,*) 0
65       close(icsa_bank1)
66
67       return
68       end
69 c---------------------------------
70       subroutine restart_write
71       implicit real*8 (a-h,o-z)
72       include 'DIMENSIONS'
73       include 'COMMON.IOUNITS'
74       include 'COMMON.CSA'
75       include 'COMMON.BANK'
76
77 #if defined(AIX) || defined(PGI)
78        open(icsa_history,file=csa_history,position="append")
79 #else
80        open(icsa_history,file=csa_history,access="append")
81 #endif
82        write(icsa_history,*)
83        write(icsa_history,*) "This is restart"
84        write(icsa_history,*)
85        write(icsa_history,*) nconf
86        write(icsa_history,*) jstart,jend
87        write(icsa_history,*) nstmax
88        write(icsa_history,*) n1,n2,n3,n4,n5,n6,n7,n8,is1,is2
89        write(icsa_history,*) nran0,nran1,irr
90        write(icsa_history,*) nseed
91        write(icsa_history,*) ntotal,cut1,cut2
92        write(icsa_history,*) estop
93        write(icsa_history,*) icmax,irestart
94        write(icsa_history,*) ntbankm,dele,difcut
95        write(icsa_history,*) iref,rmscut,pnccut
96        write(icsa_history,*) ndiff
97        write(icsa_history,*)
98        write(icsa_history,*) "irestart is: ", irestart
99
100        write(icsa_history,*)
101       close(icsa_history)
102
103       return
104       end
105 c---------------------------------