1
subroutine smd_shakelist_init_system()
10
character*32 sp_bond,sp_type,sp_shakelist
11
character*32 tag,pname
14
pname = "smd_shakelist_init_system"
17
call smd_system_get_component(sp_bond,tag,result)
18
if(.not.result) goto 200
21
call smd_system_get_component(sp_type,tag,result)
24
> pname//'no component '//tag,0,0)
27
call smd_system_get_component(sp_shakelist,tag,result)
30
> pname//'no component '//tag,0,0)
32
call smd_shakelist_init(sp_shakelist,result)
37
call smd_system_unset_component(tag)
43
subroutine smd_shakelist_init(sp_shakelist,result)
47
#include "mafdecls.fh"
52
character*(*) sp_shakelist
58
character*255 filename
61
integer i_ib1,i_ib2,i_db,i_itb
70
pname = "smd_shakelist_init"
72
c write(*,*) "in "//pname
77
call smd_get_ind_dim(tag,i_it,na,result)
80
> pname//'error getting index for'//tag,0, RTDB_ERR)
85
call smd_get_ind(tag,i_ib1,result)
88
> pname//'error getting index for '//tag,0, 0)
91
call smd_get_ind(tag,i_ib2,result)
94
> pname//'error getting index for '//tag,0, 0)
97
call smd_get_ind(tag,i_db,result)
100
> pname//'error getting index for '//tag,0, 0)
103
call smd_get_ind_dim(tag,i_itb,nb,result)
106
> pname//'error getting index for '//tag,0, 0)
110
c allocate initial storage for shake list
111
c ---------------------------------------
113
if(.not.ma_push_get(mt_int,ns,'tmp i1',h_is1t,i_is1t))
114
+ call errquit(pname//'Failed to allocate memory',
117
if(.not.ma_push_get(mt_int,ns,'tmp i2',h_is2t,i_is2t))
118
+ call errquit(pname//'Failed to allocate memory',
121
if(.not.ma_push_get(mt_dbl,ns,'tmp d',h_dst,i_dst))
122
+ call errquit(pname//'Failed to allocate memory',
126
call smd_shakelist_set(ns,nb,na,
136
c create shake list structure
137
c ---------------------------
142
call smd_namespace_create(sp_shakelist)
144
call smd_data_create_get(sp_shakelist,tag,ns,MT_INT,i_is1)
146
call smd_data_create_get(sp_shakelist,tag,ns,MT_INT,i_is2)
147
tag = "shake:distance"
148
call smd_data_create_get(sp_shakelist,tag,ns,MT_DBL,i_ds)
151
int_mb(i_is1+i-1) = int_mb(i_is1t+i-1)
152
int_mb(i_is2+i-1) = int_mb(i_is2t+i-1)
153
dbl_mb(i_ds+i-1) = dbl_mb(i_dst+i-1)
157
if(.not.ma_pop_stack(h_dst))
158
& call errquit(pname//'Failed to deallocate stack',0,
161
if(.not.ma_pop_stack(h_is2t))
162
& call errquit(pname//'Failed to deallocate stack',0,
165
if(.not.ma_pop_stack(h_is1t))
166
& call errquit(pname//'Failed to deallocate stack',0,
172
subroutine smd_shakelist_set(ns,nb,na,
183
#include "errquit.fh"
185
#include "mafdecls.fh"
193
double precision ds(ns)
197
double precision db(ns)
200
integer i,i1,i2,j,nlist
208
if(it(j).eq.ib1(i)) i1=j
209
if(it(j).eq.ib2(i)) i2=j
212
is1(nlist) = min(i1,i2)
213
is2(nlist) = max(i1,i2)
226
c $Id: smd_shakelist.F 21176 2011-10-10 06:35:49Z d3y133 $