~ubuntu-branches/ubuntu/saucy/nwchem/saucy

« back to all changes in this revision

Viewing changes to src/tools/ga-5-1/global/examples/md_cluster/estats.F

  • Committer: Package Import Robot
  • Author(s): Michael Banck, Michael Banck, Daniel Leidert
  • Date: 2012-02-09 20:02:41 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120209200241-jgk03qfsphal4ug2
Tags: 6.1-1
* New upstream release.

[ Michael Banck ]
* debian/patches/02_makefile_flags.patch: Updated.
* debian/patches/02_makefile_flags.patch: Use internal blas and lapack code.
* debian/patches/02_makefile_flags.patch: Define GCC4 for LINUX and LINUX64
  (Closes: #632611 and LP: #791308).
* debian/control (Build-Depends): Added openssh-client.
* debian/rules (USE_SCALAPACK, SCALAPACK): Removed variables (Closes:
  #654658).
* debian/rules (LIBDIR, USE_MPIF4, ARMCI_NETWORK): New variables.
* debian/TODO: New file.
* debian/control (Build-Depends): Removed libblas-dev, liblapack-dev and
  libscalapack-mpi-dev.
* debian/patches/04_show_testsuite_diff_output.patch: New patch, shows the
  diff output for failed tests.
* debian/patches/series: Adjusted.
* debian/testsuite: Optionally run all tests if "all" is passed as option.
* debian/rules: Run debian/testsuite with "all" if DEB_BUILD_OPTIONS
  contains "checkall".

[ Daniel Leidert ]
* debian/control: Used wrap-and-sort. Added Vcs-Svn and Vcs-Browser fields.
  (Priority): Moved to extra according to policy section 2.5.
  (Standards-Version): Bumped to 3.9.2.
  (Description): Fixed a typo.
* debian/watch: Added.
* debian/patches/03_hurd-i386_define_path_max.patch: Added.
  - Define MAX_PATH if not defines to fix FTBFS on hurd.
* debian/patches/series: Adjusted.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#if HAVE_CONFIG_H
 
2
#   include "config.fh"
 
3
#endif
 
4
c
 
5
c                                   NOTICE
 
6
c
 
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.
 
15
c
 
16
      subroutine estat
 
17
#include "common.fh"
 
18
c
 
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.
 
25
c
 
26
c                   Contents of nrg()
 
27
c
 
28
c    nrg(1): the total number of degrees of freedom in the system
 
29
c
 
30
c    nrg(2): the total number of degrees of freedom in the system
 
31
c            times Rgas/2
 
32
c
 
33
c    nrg(3): the total energy of the system
 
34
c
 
35
c    nrg(4): the total kinetic energy of the system
 
36
c
 
37
c    nrg(5): temperature (in Kelvin) of the system
 
38
c
 
39
c    nrg(6): potential energy of the system
 
40
c
 
41
c    nrg(7): current pressure (in atmospheres)
 
42
c
 
43
c    nrg(8): the total translational kinetic energy of the system
 
44
c
 
45
c    nrg(9): the instantaneous value of the Hamiltonian
 
46
c
 
47
c    nrg(10): the instantaneous value of the virial
 
48
c
 
49
c    nrg(11): the instantaneous value of the Enthalpy
 
50
c
 
51
c    nrg(12): the instantaneous coulomb energy of the system
 
52
c
 
53
c    nrg(13): the instantaneous repulsion energy of the system
 
54
c
 
55
c    nrg(14): the instantaneous dispersion energy of the system
 
56
c
 
57
c    nrg(15): the virial contribution to the pressure (in atmospheres)
 
58
c
 
59
c    nrg(16): the instantaneous torsional energy of the system
 
60
c
 
61
c    nrg(17): instantaneous energy from harmonic oscillators
 
62
c
 
63
c    nrg(18): x component of virial
 
64
c
 
65
c    nrg(19): y component of virial
 
66
c
 
67
c    nrg(20): z component of virial
 
68
c
 
69
c    nrg(21): instantaneous energy from bond angle bends
 
70
c
 
71
c    nrg(22): x component of total momentum
 
72
c
 
73
c    nrg(23): y component of total momentum
 
74
c
 
75
c    nrg(24): z component of total momentum
 
76
c
 
77
c    nrg(25): total mass
 
78
c
 
79
c                   Contents of anrg(), tmpnrg(), and anrg2()
 
80
c
 
81
c    anrg(1): the average total energy of the system
 
82
c
 
83
c    anrg(2): the average total kinetic energy of the system
 
84
c
 
85
c    anrg(3): the average temperature (in Kelvin) of the system
 
86
c
 
87
c    anrg(4): the average potential energy of the system
 
88
c
 
89
c    anrg(5): the average pressure (in atmospheres)
 
90
c
 
91
c    anrg(6): the average total translational kinetic energy of the system
 
92
c
 
93
c    anrg(7): the average value of the Hamiltonian
 
94
c
 
95
c    anrg(8): the average value of the Enthalpy
 
96
c
 
97
c    anrg(9): the average coulomb energy of the system
 
98
c
 
99
c    anrg(10): the average repulsion energy of the system
 
100
c
 
101
c    anrg(11): the average dispersion energy of the system
 
102
c
 
103
c    anrg(12): the average x dimension of the system
 
104
c
 
105
c    anrg(13): the average y dimension of the system
 
106
c
 
107
c    anrg(14): the average z dimension of the system
 
108
c
 
109
c    anrg(15): the average value of the time scaling parameter
 
110
c
 
111
c    anrg(16): the average volume of the system
 
112
c
 
113
c    anrg(17): mean square total energy
 
114
c
 
115
c    anrg(18): mean square Hamiltonian
 
116
c
 
117
c    anrg(19): mean square kinetic energy
 
118
c
 
119
c    anrg(20): mean square potential energy
 
120
c
 
121
c    anrg(21): mean square pressure (in atmospheres**2)
 
122
c
 
123
c    anrg(22): mean square x dimension
 
124
c
 
125
c    anrg(23): mean square y dimension
 
126
c
 
127
c    anrg(24): mean square z dimension
 
128
c
 
129
c    anrg(25): mean square scaling parameter
 
130
c
 
131
c    anrg(26): mean square temperature
 
132
c
 
133
c    anrg(27): mean square Enthalpy
 
134
c
 
135
c    arng(28): the average torsional energy
 
136
c
 
137
c    arng(29): the average harmonic oscillator energy
 
138
c
 
139
c    arng(30): the average bond angle bend energy
 
140
c
 
141
      nrgcnt = nrgcnt + 1
 
142
c
 
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)
 
173
c
 
174
      return
 
175
      end
 
176
c
 
177
      subroutine prtnrg
 
178
#include "common.fh"
 
179
c
 
180
      double precision bstat,b2stat
 
181
      integer i,ibstat
 
182
c
 
183
      if (nrgcnt.eq.0) return
 
184
c
 
185
      do 25 i = 1, MAXNRG
 
186
        anrg(i) = anrg(i) / dble(nrgcnt)
 
187
   25 continue
 
188
c
 
189
c      call ga_dgop(3,bstat,1,'+')
 
190
c      call ga_dgop(3,b2stat,1,'+')
 
191
c      call ga_igop(3,ibstat,1,'+')
 
192
c
 
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))
 
197
c
 
198
        write(6,50)
 
199
        write(6,100) anrg(1)
 
200
        write(6,200) anrg(2)
 
201
        write(6,300) anrg(3)
 
202
c        write(6,600) anrg(6)
 
203
        write(6,400) anrg(4)
 
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)
 
210
        write(6,500) anrg(5)
 
211
        write(6,700) anrg(7)
 
212
        write(6,800) anrg(8)
 
213
c        write(6,850) bstat
 
214
        write(6,1150)
 
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)
 
220
        write(6,1650)
 
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))
 
230
        write(6,2400)
 
231
     +                   sqrt(abs(anrg(24)-anrg(14)**2))
 
232
        write(6,2500) sqrt(abs(anrg(25)-anrg(15)**2))
 
233
        write(6,2550) b2stat
 
234
      endif
 
235
c
 
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)
 
271
      return
 
272
      end
 
273
c
 
274
      subroutine nrgsum
 
275
#include "common.fh"
 
276
c
 
277
      double precision rbuf(50)
 
278
c
 
279
c   this subroutine does a global add on some of the quantities stored
 
280
c   in the array nrg()
 
281
c
 
282
      rbuf(1) = nrg(3)
 
283
      rbuf(2) = nrg(4)
 
284
      rbuf(3) = nrg(6)
 
285
      rbuf(4) = nrg(8)
 
286
      rbuf(5) = nrg(9)
 
287
      rbuf(6) = nrg(10)
 
288
      rbuf(7) = nrg(11)
 
289
      rbuf(8) = nrg(12)
 
290
      rbuf(9) = nrg(13)
 
291
      rbuf(10) = nrg(14)
 
292
      rbuf(11) = nrg(17)
 
293
      rbuf(12) = nrg(21)
 
294
      rbuf(13) = nrg(22)
 
295
      rbuf(14) = nrg(23)
 
296
      rbuf(15) = nrg(24)
 
297
      rbuf(16) = nrg(25)
 
298
      rbuf(17) = nrg(15)
 
299
c
 
300
      call ga_dgop(3,rbuf,20,'+')
 
301
c
 
302
      nrg(3) = rbuf(1)
 
303
      nrg(4) = rbuf(2)
 
304
      nrg(6) = rbuf(3)
 
305
      nrg(8) = rbuf(4)
 
306
      nrg(9) = rbuf(5)
 
307
      nrg(10) = rbuf(6)
 
308
      nrg(11) = rbuf(7)
 
309
      nrg(12) = rbuf(8)
 
310
      nrg(13) = rbuf(9)
 
311
      nrg(14) = rbuf(10)
 
312
      nrg(17) = rbuf(11)
 
313
      nrg(21) = rbuf(12)
 
314
      nrg(22) = rbuf(13)
 
315
      nrg(23) = rbuf(14)
 
316
      nrg(24) = rbuf(15)
 
317
      nrg(25) = rbuf(16)
 
318
      nrg(15) = rbuf(17)
 
319
c
 
320
      return
 
321
      end