21INTEGER (KIND=c_int) FUNCTION bond_angles(nda) bind (C,NAME='bond_angles_')
30INTEGER (KIND=c_int),
INTENT(IN) :: nda
31INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE :: anglea
32INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE :: sum_anga
33DOUBLE PRECISION :: ang
34DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE :: angtab
40 DOUBLE PRECISION FUNCTION angijk (ATG1, ATG2, ATG3, ASTEP)
41 INTEGER,
INTENT(IN) :: atg1, atg2, atg3, astep
45if (
allocated(anglea))
deallocate(anglea)
48 call show_error (
"Impossible to allocate memory"//char(0), &
49 "Function: bond_angles"//char(0),
"Table: ANGLEA"//char(0))
59numth = omp_get_max_threads()
62 if (numth .ge. 2*(
ns-1))
then
69if (all_atoms) doatoms=.true.
152if (
allocated(sum_anga))
deallocate(sum_anga)
155 call show_error (
"Impossible to allocate memory"//char(0), &
156 "Function: bond_angles"//char(0),
"Table: SUM_ANGA"//char(0))
166 sum_anga(
i,
j,
k) = sum_anga(
i,
j,
k) + anglea(
i,
j,
k,
l)
172if (
allocated(angtab))
deallocate(angtab)
173allocate(angtab(nda), stat=
err)
175 call show_error (
"Impossible to allocate memory"//char(0), &
176 "Function: bond_angles"//char(0),
"Table: ANGTAB"//char(0))
186 if (sum_anga(
i,
j,
k) .ne. 0)
then
188 angtab(
l)=100.0*dble(anglea(
i,
j,
k,
l))/dble(sum_anga(
i,
j,
k))
190 call save_curve (nda, angtab,
m,
idan)
192 call save_curve (0, angtab,
m,
idan)
203if (
allocated(anglea))
deallocate(anglea)
204if (
allocated(sum_anga))
deallocate(sum_anga)
205if (
allocated(angtab))
deallocate(angtab)
209INTEGER (KIND=c_int) FUNCTION bond_diedrals(nda) bind (C,NAME='bond_diedrals_')
218INTEGER (KIND=c_int),
INTENT(IN) :: nda
219INTEGER,
DIMENSION(:,:,:,:,:),
ALLOCATABLE :: angled
220INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE :: sum_angd
221DOUBLE PRECISION :: ang
222DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE :: angtab
228 DOUBLE PRECISION FUNCTION diedre (DG1, DG2, DG3, DG4, DSTEP)
229 INTEGER,
INTENT(IN) :: dg1, dg2, dg3, dg4, dstep
233if (
allocated(angled))
deallocate(angled)
236 call show_error (
"Impossible to allocate memory"//char(0), &
237 "Function: bond_angles"//char(0),
"Table: ANGLED"//char(0))
247numth = omp_get_max_threads()
250 if (numth .ge. 2*(
ns-1))
then
257if (all_atoms) doatoms=.true.
260 if (
na.lt.numth) numth=
na
277 if (
p.ne.
j .and.
p.ne.
m)
then
318 if (
p.ne.
j .and.
p.ne.
m)
then
347if (
allocated(sum_angd))
deallocate(sum_angd)
350 call show_error (
"Impossible to allocate memory"//char(0), &
351 "Function: bond_angles"//char(0),
"Table: SUM_ANGD"//char(0))
361 sum_angd(
i,
j,
k,
l) = sum_angd(
i,
j,
k,
l) + angled(
i,
j,
k,
l,
m)
368if (
allocated(angtab))
deallocate(angtab)
369allocate(angtab(nda), stat=
err)
371 call show_error (
"Impossible to allocate memory"//char(0), &
372 "Function: bond_angles"//char(0),
"Table: ANGTAB"//char(0))
383 if (sum_angd(
i,
j,
k,
l) .ne. 0)
then
386 angtab(
m)=100.0*dble(angled(
i,
j,
k,
l,
m))/dble(sum_angd(
i,
j,
k,
l))
388 call save_curve (nda, angtab,
n,
idan)
390 call save_curve (0, angtab,
n,
idan)
402if (
allocated(angled))
deallocate(angled)
403if (
allocated(sum_angd))
deallocate(sum_angd)
404if (
allocated(angtab))
deallocate(angtab)
integer(kind=c_int) function bond_diedrals(nda)
integer(kind=c_int) function bond_angles(nda)
void show_error(char *error, int val, GtkWidget *win)
show error message
integer, dimension(:,:), allocatable contj
double precision delta_ang
integer, dimension(:,:,:), allocatable voisj
integer, dimension(:), allocatable lot
double precision function angijk(atg1, atg2, atg3, astep)
double precision function diedre(dg1, dg2, dg3, dg4, dstep)