21INTEGER (KIND=c_int) FUNCTION chemistry () bind (C,NAME='chemistry_')
31INTEGER :: ref1, ref2, ref3
32INTEGER,
DIMENSION(:),
ALLOCATABLE :: index_form
33INTEGER,
DIMENSION(:),
ALLOCATABLE :: refp
35LOGICAL :: unclear, unfrac
41if (
allocated(index_form))
deallocate(index_form)
42allocate(index_form(
nsp), stat=
err)
44 call show_error (
"Impossible to allocate memory"//char(0), &
45 "Function: chemistry"//char(0),
"Table: INDEX_FORM"//char(0))
50if (
allocated(refp))
deallocate(refp)
51allocate(refp(
nsp), stat=
err)
53 call show_error (
"Impossible to allocate memory"//char(0), &
54 "Function: chemistry"//char(0),
"Table: REFP"//char(0))
74 if (ref3 .ne. ref1) ref2=
i
90 do while (mod(
m*refp(
i),ref1).ne.0 .and.
m.lt.ref1)
93 if (mod(
m*refp(
i),ref1) .eq. 0)
then
94 index_form(
i)=
m*refp(
i)/ref1
107 index_form(ref2)=
nbspbs(ref2)
109 index_form(ref2)=refp(ref2)/
nbspbs(ref2)
115 y=dble(index_form(
i))/dble(index_form(
j))
117 if (
y .ne.
z) unclear=.true.
129call send_chem_info (index_form)
135if (
allocated(index_form))
deallocate(index_form)
136if (
allocated(refp))
deallocate(refp)
integer(kind=c_int) function chemistry()
void show_error(char *error, int val, GtkWidget *win)
show error message
integer, dimension(:), allocatable nbspbs