27INTEGER,
INTENT(IN) :: step
28INTEGER,
DIMENSION(TAILLC, NS),
INTENT(IN) :: nri
29INTEGER,
DIMENSION(TAILLC,NUMA,TAILLC),
INTENT(IN) :: rsaved
30INTEGER,
DIMENSION(NUMA) :: chain_list
31INTEGER,
DIMENSION(:),
ALLOCATABLE :: chain_id
32INTEGER :: raa, rab, rac, rad, rae
36 if (nri(raa,step) > 0)
then
38 call allocate_all_chains (step-1, raa, nri(raa,step))
41if (rab.eq.0)
write (6, *)
"Chains RAB=0"
49 do rad=1, nri(rab,step)
51 if (rsaved(rab,rad,rae) .eq. raa)
then
59 if (
allocated(chain_id))
deallocate(chain_id)
60 allocate(chain_id(rac), stat=
err)
62 call show_error (
"Impossible to allocate memory"//char(0), &
63 "Function: CHAINS_TO_OGL"//char(0),
"Table: CHAIN_ID (1)"//char(0))
68 chain_id(rad) = chain_list(rad)
70 if (rac > 0)
call send_atom_chains_id_opengl (step-1, raa-1, rab, rac, chain_id)
75 if (
allocated(chain_id))
deallocate(chain_id)
76 allocate(chain_id(raa), stat=
err)
78 call show_error (
"Impossible to allocate memory"//char(0), &
79 "Function: CHAINS_TO_OGL"//char(0),
"Table: CHAIN_ID (2)"//char(0))
83 if (nri(raa,step) > 0)
then
84 do rab=1, nri(raa,step)
86 chain_id(rac) = rsaved(raa,rab,rac)
88 call send_chains_opengl (step-1, raa, rab-1, chain_id)
95if (
allocated(chain_id))
deallocate(chain_id)