7
c This software is being made available for internal testing and
8
c evaluation purposes only. This software is a pre-release test version
9
c which has not yet been authenticated and cleared for publication. Adherence
10
c to this notice may be necessary for the author, Battelle Memorial
11
c Institute, to successfully assert copyright in and commercialize this
12
c software. This software is not intended for duplication or distribution
13
c to third parties without the permission of the Manager of Software
14
c Products at Pacific Northwest Laboratory, Richland, Washington, 99352.
19
double precision vbox, rmax
22
double precision cluster_check_radius
24
if (istep.gt.3930438) then
30
c This routine guides the MD steps.
31
c Begin the main loop through the MD steps
35
do 5000 istep = 1, nstep
45
c Check to see if there are any special instructions
49
c is end >= istep >= beg
51
if ((istep.ge.isc(i,1)).and.(istep.le.isc(i,2))) then
53
c is mod(istep-beg,inc) = 0
55
if (mod(istep,isc(i,3)).eq.0) then
57
c get next configuration using the appropriate algorithm
59
if (isc(i,4).eq.1) then
62
elseif (isc(i,4).eq.2) then
67
elseif (isc(i,4).eq.3) then
73
elseif (isc(i,4).eq.4) then
78
elseif (isc(i,4).eq.5) then
85
elseif (isc(i,4).eq.6) then
89
elseif (isc(i,4).eq.7) then
96
elseif (isc(i,4).eq.8) then
100
elseif (isc(i,4).eq.9) then
108
elseif (isc(i,4).eq.10) then
121
c get next configuration if no special step is taken
123
if (.not.newcfg) then
124
if (dflalg.eq.1) then
126
elseif (dflalg.eq.2) then
130
elseif (dflalg.eq.3) then
135
elseif (dflalg.eq.4) then
139
elseif (dflalg.eq.5) then
145
elseif (dflalg.eq.6) then
148
elseif (dflalg.eq.9) then
155
elseif (dflalg.eq.10) then
165
write(6,*) ga_nodeid(),' Got to 1 at step ',istep
168
c Update remaining energy quantities
170
nrg(3) = nrg(4) + nrg(6)
171
vbox = xbox*ybox*zbox
172
nrg(7) = nrg(5) * dble(atot-1) / vbox + nrg(15)
174
if (istep.eq.equil_1) then
178
ra(i,j,6) = ra(i,j,1)
183
rmax = cluster_check_radius()
184
if (rmax.gt.r_cluster) r_cluster = rmax + 0.01
186
if (mod(istep,mcfreq).eq.0.and.istep.gt.equil_1) then
188
if (me.eq.0.and.l_rad) write(7,7100) dble(istep)*tau,r_cluster
191
write(6,*) ga_nodeid(),' Got to 2 at step ',istep
193
if (istep.gt.equil_2.and.r_cluster.le.cl_upper)
196
write(6,*) ga_nodeid(),' Got to 3 at step ',istep
198
if (istep.eq.window_1) call cluster_reset_binr(1)
199
if (istep.eq.window_2) call cluster_reset_binr(2)
201
c Perform all statistical operations
202
c on the new configuration.
206
if (mod(istep,istat).eq.0.and.l_stdio) then
208
if (me.eq.0) write(6,6000) nrg(7)
209
if (me.eq.0) write(6,6300) nrg(3)
210
if (me.eq.0) write(6,6700) nrg(6),nrg(4),nrg(5)
211
if (me.eq.0) write(6,6800) xbox,ybox,zbox,scal1
212
if (me.eq.0) write(6,6100) nrg(13),nrg(14),
214
if (me.eq.0) write(6,6900) nrg(9)
217
c accumulate energy statistics
219
if (istep.gt.equil_2) call estat
221
if (me.eq.0.and.l_step.and.mod(istep,1000).eq.0) then
222
open(unit=2,file='step.cnt',status='unknown')
223
write(2,*) 'proc : ',ga_pgroup_nodeid(ga_pgroup_get_world())
224
write(2,*) 'istep : ',istep
226
write(2,6100) nrg(13),nrg(14),nrg(17),nrg(21)
229
write(2,6700) nrg(6),nrg(4),nrg(5)
230
write(2,6800) xbox,ybox,zbox,scal1
231
write(2,7000) r_cluster
232
write(2,7200) cl_lower
233
write(2,7300) cl_upper
238
6000 format(1x,'The instantaneous pressure is ',f12.4)
239
6100 format(1x,'Current energy statistics'/
240
+ ' repulsion: ',f16.4,/
241
+ ' dispersion: ',f16.4,/
244
6200 format(1x,'Statistics at time ',i6,' ps')
245
6300 format(1x,'The total energy is ',f12.4)
246
6700 format(' potential kinetic'/
247
+ ' energy energy temperature'/,
249
6800 format(1x,'The current simulation cell dimensions:'/
254
6820 format(1x,'The current simulation cell dimensions:'/
258
6900 format(1x,'The instantaneous value of the Hamiltonian is ',f12.4)
259
7000 format(1x,'The current value of confining sphere is ',f12.4)
261
7200 format(1x,'Lower bound of confining sphere ',f12.4)
262
7300 format(1x,'Upper bound of confining sphere ',f12.4)