1
subroutine smd_res_init(namespace,rtdb)
10
character*(*) namespace
15
character*255 filename
20
pname = "smd_res_init"
22
write(*,*) "in "//pname
24
if(.not.rtdb_cget(rtdb,'smd:coordfile',1,filename))
26
> pname//'error reading coordinate file',0, RTDB_ERR)
27
write(*,*) "found coordinates",filename
29
c get number of residues
30
c ----------------------
31
call smd_pdb_nres(filename,nr)
32
write(*,*) "number of res",nr
36
call smd_atom_ntot(namespace,nt)
37
write(*,*) "number of atoms",nt
39
c create residue data structures
40
c ------------------------------
41
call smd_data_create(namespace,"res:name",16*nr,MT_BYTE)
42
call smd_data_create(namespace,"res:size",nr,MT_INT)
43
call smd_data_create(namespace,"res:",nr,MT_INT)
46
call smd_data_get_index(namespace,tag,i_ind,result)
49
> pname//'error getting index for '//tag,0, RTDB_ERR)
52
call smd_data_get_index(namespace,tag,i_s,result)
55
> pname//'error getting index for '//tag,0, RTDB_ERR)
58
call smd_data_get_index(namespace,tag,i_t,result)
61
> pname//'error getting index for '//tag,0, RTDB_ERR)
64
call smd_pdb_read_res(filename,nt,nr,