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

« back to all changes in this revision

Viewing changes to src/smd/smdlib/smd_coordfile.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
      subroutine smd_coordfile_natoms_par(nt)
 
2
      implicit none
 
3
#include "errquit.fh"
 
4
#include "util.fh"
 
5
#include "global.fh"
 
6
#include "msgids.fh"
 
7
#include "mafdecls.fh"
 
8
#include "rtdb.fh"
 
9
      integer nt
 
10
c
 
11
      character*(33) filename
 
12
      logical result
 
13
      character*30 pname
 
14
      logical rtdb_mode
 
15
      integer master
 
16
c
 
17
      pname = "smd_coordfile_natoms"
 
18
c
 
19
      master = 0
 
20
      rtdb_mode = rtdb_parallel(.false.)
 
21
      write(*,*) "in",pname
 
22
      call util_flush(6)
 
23
      if (ga_nodeid().eq.master) then
 
24
        call smd_coordfile(filename,result)
 
25
        if(.not.result)
 
26
     >    call errquit(
 
27
     >         pname//'no coord file found',0, 0)
 
28
 
 
29
c
 
30
        call smd_pdb_natoms(filename,nt)
 
31
      end if
 
32
      call ga_brdcst(msg_smd,nt,
 
33
     >     ma_sizeof(mt_int,1,mt_byte),master)
 
34
 
 
35
      call ga_sync()
 
36
      rtdb_mode = rtdb_parallel(rtdb_mode)
 
37
      return
 
38
 
 
39
      end
 
40
 
 
41
      subroutine smd_coordfile_read_coords(nt,c)
 
42
      implicit none
 
43
#include "mafdecls.fh"
 
44
#include "errquit.fh"
 
45
#include "util.fh"
 
46
#include "inp.fh"
 
47
#include "msgids.fh"
 
48
#include "global.fh"
 
49
#include "rtdb.fh"
 
50
      integer nt
 
51
      double precision c(nt,3)
 
52
c
 
53
      character*(180) buffer
 
54
      character*(4)  tag
 
55
      integer i
 
56
      integer un
 
57
      character*(30) pname
 
58
      character*(33) filename
 
59
      logical result
 
60
c
 
61
      pname = "smd_coordfile_read_coords"
 
62
c
 
63
c
 
64
      call smd_coordfile_read_coords_seq(nt,c)
 
65
 
 
66
      return
 
67
 
 
68
      end
 
69
      subroutine smd_coordfile_read_coords1(nt,c)
 
70
      implicit none
 
71
#include "mafdecls.fh"
 
72
#include "errquit.fh"
 
73
#include "util.fh"
 
74
#include "inp.fh"
 
75
#include "msgids.fh"
 
76
#include "global.fh"
 
77
#include "rtdb.fh"
 
78
      integer nt
 
79
      double precision c(3,nt)
 
80
c
 
81
      character*(180) buffer
 
82
      character*(4)  tag
 
83
      integer i
 
84
      integer un
 
85
      character*(30) pname
 
86
      character*(33) filename
 
87
      logical result
 
88
c
 
89
      pname = "smd_coordfile_read_coords"
 
90
c
 
91
c
 
92
      call smd_coordfile_read_coords_seq1(nt,c)
 
93
 
 
94
      return
 
95
 
 
96
      end
 
97
      subroutine smd_coordfile_read_coords_par(nt,c)
 
98
      implicit none
 
99
#include "mafdecls.fh"
 
100
#include "errquit.fh"
 
101
#include "util.fh"
 
102
#include "inp.fh"
 
103
#include "msgids.fh"
 
104
#include "global.fh"
 
105
#include "rtdb.fh"
 
106
      integer nt
 
107
      double precision c(nt,3)
 
108
c
 
109
      character*(180) buffer
 
110
      character*(4)  tag
 
111
      integer i
 
112
      integer un
 
113
      character*(30) pname
 
114
      character*(33) filename
 
115
      logical result
 
116
      logical rtdb_mode
 
117
      integer master
 
118
c
 
119
      pname = "smd_coordfile_read_coords"
 
120
c
 
121
c
 
122
      master = 0
 
123
      rtdb_mode = rtdb_parallel(.false.)
 
124
      if (ga_nodeid().eq.master) then
 
125
        call smd_coordfile_read_coords_seq(nt,c)
 
126
      end if
 
127
 
 
128
      call ga_brdcst(msg_smd,c,
 
129
     >     3*nt*ma_sizeof(mt_dbl,1,mt_byte),master)
 
130
      call ga_sync()
 
131
      rtdb_mode = rtdb_parallel(rtdb_mode)
 
132
 
 
133
      return
 
134
 
 
135
      end
 
136
 
 
137
      subroutine smd_coordfile_read_atomres_seq(nt,ta,tr,ir)
 
138
      implicit none
 
139
#include "mafdecls.fh"
 
140
#include "errquit.fh"
 
141
#include "util.fh"
 
142
#include "inp.fh"
 
143
#include "global.fh"
 
144
#include "smd_const_data.fh"
 
145
      integer nt
 
146
      character*(*) ta(nt)
 
147
      character*(*) tr(nt)
 
148
      integer ir(nt)
 
149
c
 
150
      character*(180) buffer
 
151
      character*(4)  tag
 
152
      integer i
 
153
      integer un
 
154
      character*(30) pname
 
155
      character*(33) filename
 
156
      logical result
 
157
c
 
158
      pname = "smd_coordfile_read_atomres"
 
159
c
 
160
c
 
161
      call smd_coordfile(filename,result)
 
162
      if(.not.result)
 
163
     >  call errquit(
 
164
     >       pname//'no coord file found',0, 0)
 
165
c
 
166
      call smd_pdb_read_atomres(filename,nt,ta,tr,ir)
 
167
 
 
168
      return
 
169
 
 
170
      end
 
171
      subroutine smd_coordfile_read_atomres(nt,ta,tr,ir)
 
172
      implicit none
 
173
#include "mafdecls.fh"
 
174
#include "errquit.fh"
 
175
#include "util.fh"
 
176
#include "inp.fh"
 
177
#include "global.fh"
 
178
#include "smd_const_data.fh"
 
179
      integer nt
 
180
      character*(smd_string_size) ta(nt)
 
181
      character*(smd_string_size) tr(nt)
 
182
      integer ir(nt)
 
183
c
 
184
      character*(180) buffer
 
185
      character*(4)  tag
 
186
      integer i
 
187
      integer un
 
188
      character*(30) pname
 
189
      character*(33) filename
 
190
      logical result
 
191
c
 
192
      pname = "smd_coordfile_read_atomres"
 
193
c
 
194
c
 
195
      call smd_coordfile(filename,result)
 
196
      if(.not.result)
 
197
     >  call errquit(
 
198
     >       pname//'no coord file found',0, 0)
 
199
c
 
200
      call smd_pdb_read_atomres(filename,nt,ta,tr,ir)
 
201
 
 
202
      return
 
203
 
 
204
      end
 
205
 
 
206
      subroutine smd_coordfile_natoms_seq(nt)
 
207
      implicit none
 
208
#include "errquit.fh"
 
209
#include "util.fh"
 
210
      integer nt
 
211
c
 
212
      character*(33) filename
 
213
      logical result
 
214
      character*30 pname
 
215
c
 
216
      pname = "smd_coordfile_natoms"
 
217
c
 
218
      call smd_coordfile(filename,result)
 
219
      if(.not.result)
 
220
     >  call errquit(
 
221
     >       pname//'no coord file found',0, 0)
 
222
 
 
223
c
 
224
      call smd_pdb_natoms(filename,nt)
 
225
 
 
226
      end
 
227
 
 
228
      subroutine smd_coordfile_natoms(nt)
 
229
      implicit none
 
230
#include "errquit.fh"
 
231
#include "util.fh"
 
232
      integer nt
 
233
c
 
234
      character*(33) filename
 
235
      logical result
 
236
      character*30 pname
 
237
c
 
238
      pname = "smd_coordfile_natoms"
 
239
c
 
240
      call smd_coordfile(filename,result)
 
241
      if(.not.result)
 
242
     >  call errquit(
 
243
     >       pname//'no coord file found',0, 0)
 
244
 
 
245
c
 
246
      call smd_pdb_natoms(filename,nt)
 
247
 
 
248
      end
 
249
 
 
250
      subroutine smd_coordfile_read_coords_seq(nt,c)
 
251
      implicit none
 
252
#include "mafdecls.fh"
 
253
#include "errquit.fh"
 
254
#include "util.fh"
 
255
#include "inp.fh"
 
256
      integer nt
 
257
      double precision c(nt,3)
 
258
c
 
259
      character*(180) buffer
 
260
      character*(4)  tag
 
261
      integer i
 
262
      integer un
 
263
      character*(30) pname
 
264
      character*(33) filename
 
265
      logical result
 
266
 
 
267
 
 
268
      pname = "smd_coordfile_read_coords"
 
269
c
 
270
c
 
271
      call smd_coordfile(filename,result)
 
272
      if(.not.result)
 
273
     >  call errquit(
 
274
     >       pname//'no coord file found',0, 0)
 
275
 
 
276
c
 
277
      call smd_pdb_read_coords(filename,nt,c)
 
278
 
 
279
      return
 
280
 
 
281
      end
 
282
 
 
283
      subroutine smd_coordfile_read_coords_seq1(nt,c)
 
284
      implicit none
 
285
#include "mafdecls.fh"
 
286
#include "errquit.fh"
 
287
#include "util.fh"
 
288
#include "inp.fh"
 
289
      integer nt
 
290
      double precision c(3,nt)
 
291
c
 
292
      character*(180) buffer
 
293
      character*(4)  tag
 
294
      integer i
 
295
      integer un
 
296
      character*(30) pname
 
297
      character*(33) filename
 
298
      logical result
 
299
 
 
300
 
 
301
      pname = "smd_coordfile_read_coords"
 
302
c
 
303
c
 
304
      call smd_coordfile(filename,result)
 
305
      if(.not.result)
 
306
     >  call errquit(
 
307
     >       pname//'no coord file found',0, 0)
 
308
 
 
309
c
 
310
      call smd_pdb_read_coords1(filename,nt,c)
 
311
 
 
312
      return
 
313
 
 
314
      end
 
315
 
 
316
      subroutine smd_coordfile(filename,result)
 
317
      implicit none
 
318
#include "rtdb.fh"
 
319
#include "smd_rtdb_data.fh"
 
320
#include "mafdecls.fh"
 
321
#include "global.fh"
 
322
 
 
323
c
 
324
      character*(*) filename
 
325
      logical result
 
326
c
 
327
      character*30 pname
 
328
 
 
329
      pname = "smd_coordfile"
 
330
 
 
331
c     first check if source file was already defined in geom
 
332
      result = .true.
 
333
      call smd_rtdb_get_string("geom:source",1,
 
334
     >                          filename,result)
 
335
      if(.not.result)   
 
336
     > call smd_rtdb_get_string("smd:coord:input",1,
 
337
     >                           filename,result)
 
338
 
 
339
      end
 
340
 
 
341
      subroutine smd_coordfile_output(filename,result)
 
342
      implicit none
 
343
#include "rtdb.fh"
 
344
#include "smd_rtdb_data.fh"
 
345
#include "mafdecls.fh"
 
346
#include "global.fh"
 
347
 
 
348
c
 
349
      character*(*) filename
 
350
      logical result
 
351
c
 
352
      character*30 pname
 
353
 
 
354
      pname = "smd_coordfile"
 
355
 
 
356
      call smd_rtdb_get_string("smd:coord:output",1,
 
357
     >                           filename,result)
 
358
 
 
359
      end
 
360
 
 
361
c $Id: smd_coordfile.F 21176 2011-10-10 06:35:49Z d3y133 $