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

« back to all changes in this revision

Viewing changes to src/smd/graveyard/smd-serial/smd_atom.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_atom_init_system()
 
2
      implicit none
 
3
#include "errquit.fh"
 
4
#include "inp.fh"
 
5
#include "mafdecls.fh"
 
6
#include "rtdb.fh"
 
7
#include "util.fh"
 
8
#include "global.fh"
 
9
c     
 
10
      character*32 sp_atom
 
11
      character*32 tag,pname
 
12
      logical result
 
13
 
 
14
      pname = "smd_atom_init_system"
 
15
c
 
16
      tag = "atom"
 
17
      call smd_system_get_component(sp_atom,tag,result)
 
18
      if(.not.result)
 
19
     >  call errquit(
 
20
     >       pname//'no component '//tag,0,0)
 
21
 
 
22
      call smd_atom_init(sp_atom)
 
23
 
 
24
      return
 
25
      end
 
26
 
 
27
      subroutine smd_atom_init(namespace)
 
28
      implicit none
 
29
#include "errquit.fh"
 
30
#include "inp.fh"
 
31
#include "mafdecls.fh"
 
32
#include "rtdb.fh"
 
33
#include "util.fh"
 
34
#include "global.fh"
 
35
#include "smd_const_data.fh"
 
36
#include "geom.fh"
 
37
c     
 
38
      character*(*) namespace
 
39
c
 
40
      character*32 pname
 
41
      character*80 tag
 
42
      integer nt
 
43
      integer i_t,i_tr,i_ir,i_qf
 
44
      integer i_iconst
 
45
c
 
46
      logical geom_tag_to_charge_gen
 
47
      external geom_tag_to_charge_gen
 
48
c
 
49
      pname = "smd_atom_init"
 
50
c
 
51
      write(*,*) "in "//pname
 
52
c
 
53
c     get total number of atoms from pdb file
 
54
c     ---------------------------------------
 
55
      call smd_coordfile_natoms(nt)
 
56
      if(nt.le.0)
 
57
     >  call errquit(
 
58
     >       pname//'no atoms ',0, RTDB_ERR)
 
59
c
 
60
c
 
61
c     create atom namespace
 
62
c     ---------------------
 
63
      call smd_namespace_create(namespace)
 
64
c
 
65
c     create atom data structures
 
66
c     ---------------------------
 
67
      tag = "atom:iconst"
 
68
      call smd_data_create_get(namespace,tag,1,MT_INT,i_iconst)
 
69
      tag = "atom:name"
 
70
      call smd_data_create_get(namespace,tag,nt,MT_STR,i_t)
 
71
      tag  = "atom:resname"
 
72
      call smd_data_create_get(namespace,tag,nt,MT_STR,i_tr)
 
73
      tag = "atom:resid"
 
74
      call smd_data_create_get(namespace,tag,nt,MT_INT,i_ir)
 
75
      tag = "atom:formal_charge"
 
76
      call smd_data_create_get(namespace,tag,nt,MT_DBL,i_qf)
 
77
 
 
78
c
 
79
c    don't ask
 
80
c    --------
 
81
      int_mb(i_iconst) = nt
 
82
c
 
83
c     fill in names from pdb file
 
84
c     ---------------------------
 
85
      call smd_coordfile_read_atomres(nt,
 
86
     +                         byte_mb(i_t),
 
87
     +                         byte_mb(i_tr),
 
88
     +                         int_mb(i_ir))
 
89
 
 
90
c
 
91
      if(.not.geom_tag_to_charge_gen(nt,smd_string_size,
 
92
     >                        byte_mb(i_t),dbl_mb(i_qf)))
 
93
     >  call errquit(
 
94
     >       pname//'error setting formal charge',0, RTDB_ERR)
 
95
 
 
96
      return
 
97
      end
 
98
 
 
99
      subroutine smd_atom_ntot(ntot)
 
100
      implicit none
 
101
#include "errquit.fh"
 
102
#include "inp.fh"
 
103
#include "mafdecls.fh"
 
104
#include "rtdb.fh"
 
105
#include "util.fh"
 
106
#include "global.fh"
 
107
c     
 
108
      integer ntot
 
109
c
 
110
      character*72 tag
 
111
      character*30 pname
 
112
      integer i_iconst
 
113
      logical result
 
114
 
 
115
      pname = "smd_atom_ntot"
 
116
      tag = "atom:iconst"
 
117
      call smd_get_ind(tag,i_iconst,result)
 
118
      if(.not. result) 
 
119
     >  call errquit(
 
120
     >       pname//'error getting ntot '//tag,0, RTDB_ERR)
 
121
      ntot = int_mb(i_iconst)
 
122
 
 
123
      return
 
124
      end
 
125
 
 
126
      subroutine smd_atom_nres(namespace,nr)
 
127
      implicit none
 
128
#include "errquit.fh"
 
129
#include "inp.fh"
 
130
#include "mafdecls.fh"
 
131
#include "rtdb.fh"
 
132
#include "util.fh"
 
133
#include "global.fh"
 
134
c     
 
135
      character*(*) namespace
 
136
      integer nr
 
137
c
 
138
      character*72 tag
 
139
      character*30 pname
 
140
      integer i_ir
 
141
      logical result
 
142
      integer nt
 
143
      integer ir,ir0,i
 
144
 
 
145
      pname = "smd_atom_nres"
 
146
      tag = "atom:resid"
 
147
      call smd_data_get_index(namespace,tag,i_ir,result)
 
148
      if(.not. result) 
 
149
     >  call errquit(
 
150
     >       pname//'error getting '//tag,0, RTDB_ERR)
 
151
      call smd_data_get_size(namespace,tag,nt,result)
 
152
      if(.not. result) 
 
153
     >  call errquit(
 
154
     >       pname//'error getting size '//tag,0, RTDB_ERR)
 
155
 
 
156
      nr = 0
 
157
      ir0 = 0
 
158
      do i=1,nt
 
159
       ir = int_mb(i_ir+i-1)
 
160
       if(ir0.ne.ir) then
 
161
          ir0=ir
 
162
          nr = nr + 1
 
163
       end if
 
164
      end do
 
165
       
 
166
      return
 
167
      end
 
168
 
 
169
      subroutine smd_atom_ntot1(namespace,ntot)
 
170
      implicit none
 
171
#include "errquit.fh"
 
172
#include "inp.fh"
 
173
#include "mafdecls.fh"
 
174
#include "rtdb.fh"
 
175
#include "util.fh"
 
176
#include "global.fh"
 
177
c     
 
178
      character*(*) namespace
 
179
      integer ntot
 
180
c
 
181
      character*72 tag
 
182
      character*30 pname
 
183
      logical result
 
184
 
 
185
      pname = "smd_atom_ntot"
 
186
      tag = "atom:xyz"
 
187
      call smd_data_get_size(namespace,tag,ntot,result)
 
188
      if(.not. result) 
 
189
     >  call errquit(
 
190
     >       pname//'error getting size for '//tag,0, RTDB_ERR)
 
191
      ntot = ntot/3
 
192
 
 
193
      return
 
194
      end
 
195