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
46
logical geom_tag_to_charge_gen
47
external geom_tag_to_charge_gen
49
pname = "smd_atom_init"
51
write(*,*) "in "//pname
53
c get total number of atoms from pdb file
54
c ---------------------------------------
55
call smd_coordfile_natoms(nt)
58
> pname//'no atoms ',0, RTDB_ERR)
61
c create atom namespace
62
c ---------------------
63
call smd_namespace_create(namespace)
65
c create atom data structures
66
c ---------------------------
68
call smd_data_create_get(namespace,tag,1,MT_INT,i_iconst)
70
call smd_data_create_get(namespace,tag,nt,MT_STR,i_t)
72
call smd_data_create_get(namespace,tag,nt,MT_STR,i_tr)
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)
83
c fill in names from pdb file
84
c ---------------------------
85
call smd_coordfile_read_atomres(nt,
91
if(.not.geom_tag_to_charge_gen(nt,smd_string_size,
92
> byte_mb(i_t),dbl_mb(i_qf)))
94
> pname//'error setting formal charge',0, RTDB_ERR)
99
subroutine smd_atom_ntot(ntot)
101
#include "errquit.fh"
103
#include "mafdecls.fh"
115
pname = "smd_atom_ntot"
117
call smd_get_ind(tag,i_iconst,result)
120
> pname//'error getting ntot '//tag,0, RTDB_ERR)
121
ntot = int_mb(i_iconst)
126
subroutine smd_atom_nres(namespace,nr)
128
#include "errquit.fh"
130
#include "mafdecls.fh"
135
character*(*) namespace
145
pname = "smd_atom_nres"
147
call smd_data_get_index(namespace,tag,i_ir,result)
150
> pname//'error getting '//tag,0, RTDB_ERR)
151
call smd_data_get_size(namespace,tag,nt,result)
154
> pname//'error getting size '//tag,0, RTDB_ERR)
159
ir = int_mb(i_ir+i-1)
169
subroutine smd_atom_ntot1(namespace,ntot)
171
#include "errquit.fh"
173
#include "mafdecls.fh"
178
character*(*) namespace
185
pname = "smd_atom_ntot"
187
call smd_data_get_size(namespace,tag,ntot,result)
190
> pname//'error getting size for '//tag,0, RTDB_ERR)