1
subroutine smd_atom_init_system()
11
character*32 tag,pname
14
pname = "smd_atom_init_system"
17
call smd_system_get_component(sp_atom,tag,result)
20
> pname//'no component '//tag,0,0)
22
call smd_atom_init(sp_atom)
27
subroutine smd_atom_init(namespace)
31
#include "mafdecls.fh"
35
#include "smd_const_data.fh"
38
character*(*) namespace
43
integer i_t,i_tr,i_ir,i_qf
47
logical geom_tag_to_charge_gen
48
external geom_tag_to_charge_gen
50
pname = "smd_atom_init"
52
call util_message("iin "//pname)
53
write(*,*) "in "//pname
55
c get total number of atoms from pdb file
56
c ---------------------------------------
57
call smd_coordfile_natoms(nt)
60
> pname//'no atoms ',0, RTDB_ERR)
63
c create atom namespace
64
c ---------------------
65
call smd_namespace_create(namespace)
67
c create atom data structures
68
c ---------------------------
70
call smd_data_create_get(namespace,tag,1,MT_INT,i_iconst)
72
call smd_data_create_get(namespace,tag,nt,MT_STR,i_t)
74
call smd_data_create_get(namespace,tag,nt,MT_STR,i_tr)
76
call smd_data_create_get(namespace,tag,nt,MT_INT,i_ir)
77
tag = "atom:formal_charge"
78
call smd_data_create_get(namespace,tag,nt,MT_DBL,i_qf)
85
c fill in names from pdb file
86
c ---------------------------
87
call smd_coordfile_read_atomres(nt,
93
call smd_get_size(tag,ns,result)
94
if(.not.result) call errquit(
95
> pname//'error getting size',0, RTDB_ERR)
99
if(.not.geom_tag_to_charge_gen(nt,ns,
100
> byte_mb(i_t),dbl_mb(i_qf)))
102
> pname//'error setting formal charge',0, RTDB_ERR)
104
call util_message("out "//pname)
109
subroutine smd_atom_ntot(ntot)
111
#include "errquit.fh"
113
#include "mafdecls.fh"
125
pname = "smd_atom_ntot"
127
call smd_get_ind(tag,i_iconst,result)
130
> pname//'error getting ntot '//tag,0, RTDB_ERR)
131
ntot = int_mb(i_iconst)
136
subroutine smd_atom_nres(namespace,nr)
138
#include "errquit.fh"
140
#include "mafdecls.fh"
145
character*(*) namespace
155
pname = "smd_atom_nres"
157
call smd_data_get_index(namespace,tag,i_ir,result)
160
> pname//'error getting '//tag,0, RTDB_ERR)
161
call smd_data_get_dim(namespace,tag,nt,result)
164
> pname//'error getting size '//tag,0, RTDB_ERR)
169
ir = int_mb(i_ir+i-1)
179
subroutine smd_atom_ntot1(namespace,ntot)
181
#include "errquit.fh"
183
#include "mafdecls.fh"
188
character*(*) namespace
195
pname = "smd_atom_ntot"
197
call smd_data_get_dim(namespace,tag,ntot,result)
200
> pname//'error getting size for '//tag,0, RTDB_ERR)