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
c This subroutine accumulates energy statistics for the simulation.
20
c The averages are stored in the array anrg(). The contents of nrg()
21
c and anrg() are listed below. Temporary values for the averages are
22
c stored in tmpnrg() and the uncertainties are stored anrg2().
23
c Corresponding entries in anrg(), tmpnrg(), and anrg2() are all indexed
24
c by the same variable.
28
c nrg(1): the total number of degrees of freedom in the system
30
c nrg(2): the total number of degrees of freedom in the system
33
c nrg(3): the total energy of the system
35
c nrg(4): the total kinetic energy of the system
37
c nrg(5): temperature (in Kelvin) of the system
39
c nrg(6): potential energy of the system
41
c nrg(7): current pressure (in atmospheres)
43
c nrg(8): the total translational kinetic energy of the system
45
c nrg(9): the instantaneous value of the Hamiltonian
47
c nrg(10): the instantaneous value of the virial
49
c nrg(11): the instantaneous value of the Enthalpy
51
c nrg(12): the instantaneous coulomb energy of the system
53
c nrg(13): the instantaneous repulsion energy of the system
55
c nrg(14): the instantaneous dispersion energy of the system
57
c nrg(15): the virial contribution to the pressure (in atmospheres)
59
c nrg(16): the instantaneous torsional energy of the system
61
c nrg(17): instantaneous energy from harmonic oscillators
63
c nrg(18): x component of virial
65
c nrg(19): y component of virial
67
c nrg(20): z component of virial
69
c nrg(21): instantaneous energy from bond angle bends
71
c nrg(22): x component of total momentum
73
c nrg(23): y component of total momentum
75
c nrg(24): z component of total momentum
79
c Contents of anrg(), tmpnrg(), and anrg2()
81
c anrg(1): the average total energy of the system
83
c anrg(2): the average total kinetic energy of the system
85
c anrg(3): the average temperature (in Kelvin) of the system
87
c anrg(4): the average potential energy of the system
89
c anrg(5): the average pressure (in atmospheres)
91
c anrg(6): the average total translational kinetic energy of the system
93
c anrg(7): the average value of the Hamiltonian
95
c anrg(8): the average value of the Enthalpy
97
c anrg(9): the average coulomb energy of the system
99
c anrg(10): the average repulsion energy of the system
101
c anrg(11): the average dispersion energy of the system
103
c anrg(12): the average x dimension of the system
105
c anrg(13): the average y dimension of the system
107
c anrg(14): the average z dimension of the system
109
c anrg(15): the average value of the time scaling parameter
111
c anrg(16): the average volume of the system
113
c anrg(17): mean square total energy
115
c anrg(18): mean square Hamiltonian
117
c anrg(19): mean square kinetic energy
119
c anrg(20): mean square potential energy
121
c anrg(21): mean square pressure (in atmospheres**2)
123
c anrg(22): mean square x dimension
125
c anrg(23): mean square y dimension
127
c anrg(24): mean square z dimension
129
c anrg(25): mean square scaling parameter
131
c anrg(26): mean square temperature
133
c anrg(27): mean square Enthalpy
135
c arng(28): the average torsional energy
137
c arng(29): the average harmonic oscillator energy
139
c arng(30): the average bond angle bend energy
143
anrg(1) = anrg(1) + nrg(3)
144
anrg(2) = anrg(2) + nrg(4)
145
anrg(3) = anrg(3) + nrg(5)
146
anrg(4) = anrg(4) + nrg(6)
147
anrg(5) = anrg(5) + nrg(7)
148
anrg(6) = anrg(6) + nrg(8)
149
anrg(7) = anrg(7) + nrg(9)
150
anrg(8) = anrg(8) + nrg(11)
151
anrg(9) = anrg(9) + nrg(12)
152
anrg(10) = anrg(10) + nrg(13)
153
anrg(11) = anrg(11) + nrg(14)
154
anrg(12) = anrg(12) + xbox
155
anrg(13) = anrg(13) + ybox
156
anrg(14) = anrg(14) + zbox
157
anrg(15) = anrg(15) + scal1
158
anrg(16) = anrg(16) + vol1
159
anrg(17) = anrg(17) + nrg(3)**2
160
anrg(18) = anrg(18) + nrg(9)**2
161
anrg(19) = anrg(19) + nrg(4)**2
162
anrg(20) = anrg(20) + nrg(6)**2
163
anrg(21) = anrg(21) + nrg(7)**2
164
anrg(22) = anrg(22) + xbox**2
165
anrg(23) = anrg(23) + ybox**2
166
anrg(24) = anrg(24) + zbox**2
167
anrg(25) = anrg(25) + scal1**2
168
anrg(26) = anrg(26) + nrg(5)**2
169
anrg(27) = anrg(27) + nrg(11)**2
170
anrg(28) = anrg(28) + nrg(16)
171
anrg(29) = anrg(29) + nrg(17)
172
anrg(30) = anrg(30) + nrg(21)
180
double precision bstat,b2stat
183
if (nrgcnt.eq.0) return
186
anrg(i) = anrg(i) / dble(nrgcnt)
189
c call ga_dgop(3,bstat,1,'+')
190
c call ga_dgop(3,b2stat,1,'+')
191
c call ga_igop(3,ibstat,1,'+')
193
if (ga_nodeid().eq.0.and.l_stdio) then
194
c if (ibstat.gt.0) bstat = bstat/dble(ibstat)
195
c if (ibstat.gt.0) b2stat = b2stat/dble(ibstat)
196
c b2stat = sqrt(abs(b2stat-bstat**2))
202
c write(6,600) anrg(6)
204
c write(6,900) anrg(9)
205
write(6,1000) anrg(10)
206
write(6,1100) anrg(11)
207
c write(6,2800) anrg(28)
208
write(6,2900) anrg(29)
209
write(6,3000) anrg(30)
215
write(6,1200) anrg(12)
216
write(6,1300) anrg(13)
217
write(6,1400) anrg(14)
218
write(6,1500) anrg(15)
219
write(6,1600) anrg(16)
221
write(6,1700) sqrt(abs(anrg(17)-anrg(1)**2))
222
write(6,1800) sqrt(abs(anrg(18)-anrg(7)**2))
223
write(6,1900) sqrt(abs(anrg(19)-anrg(2)**2))
224
write(6,2000) sqrt(abs(anrg(20)-anrg(4)**2))
225
write(6,2600) sqrt(abs(anrg(26)-anrg(3)**2))
226
write(6,2700) sqrt(abs(anrg(27)-anrg(8)**2))
227
write(6,2100) sqrt(abs(anrg(21)-anrg(5)**2))
228
write(6,2200) sqrt(abs(anrg(22)-anrg(12)**2))
229
write(6,2300) sqrt(abs(anrg(23)-anrg(13)**2))
231
+ sqrt(abs(anrg(24)-anrg(14)**2))
232
write(6,2500) sqrt(abs(anrg(25)-anrg(15)**2))
236
50 format('Average Energy statistics for simulation:')
237
100 format(' <Energy> :',f16.4)
238
200 format(' <Kinetic Energy> :',f16.4)
239
300 format(' <Temperature> :',f16.4)
240
400 format(' <Potential Energy> :',f16.4)
241
500 format(' <Pressure> :',f16.4)
242
600 format(' <T_trans> :',f16.4)
243
700 format(' <Hamiltonian> :',f16.4)
244
800 format(' <Enthalpy> :',f16.4)
245
850 format(' <Bond Length> :',f16.4)
246
900 format(' <Coulomb Energy> :',f16.4)
247
1000 format(' <Repulsion Energy> :',f16.4)
248
1100 format(' <Dispersion Energy> :',f16.4)
249
1150 format('Average system parameters for simulation :')
250
1200 format(' <X> :',f16.4)
251
1300 format(' <Y> :',f16.4)
252
1400 format(' <Z> :',f16.4)
253
1500 format(' <S> :',f16.4)
254
1600 format(' <V> :',f16.4)
255
1650 format('Root mean square fluctuations:')
256
1700 format(' Energy :',f16.4)
257
1800 format(' Hamiltonian :',f16.4)
258
1900 format(' Kinetic Energy :',f16.4)
259
2000 format(' Potential Energy :',f16.4)
260
2100 format(' Pressure :',f16.4)
261
2200 format(' X :',f16.4)
262
2300 format(' Y :',f16.4)
263
2400 format(' Z :',f16.4)
264
2500 format(' S :',f16.4)
265
2550 format(' Bond Length :',f16.4)
266
2600 format(' Temperature :',f16.4)
267
2700 format(' Enthalpy :',f16.4)
268
2800 format(' <Torsional Energy> :',f16.4)
269
2900 format(' <Vibrational Energy>:',f16.4)
270
3000 format(' <Angle Bend Energy> :',f16.4)
277
double precision rbuf(50)
279
c this subroutine does a global add on some of the quantities stored
300
call ga_dgop(3,rbuf,20,'+')