21INTEGER (KIND=c_int) FUNCTION read_c3d (c3d_f, lc3d) bind (C,NAME='read_c3d_')
32INTEGER (KIND=c_int),
INTENT(IN) :: lc3d
33CHARACTER (KIND=c_char),
DIMENSION(*),
INTENT(IN) :: c3d_f
34CHARACTER (LEN=lc3d) :: c3d_file
37 INTEGER,
INTENT(IN) :: unitfile, natl
42 c3d_file(
i:
i) = c3d_f(
i)
47inquire (file=c3d_file, exist=isok)
50 open (unit=20, file=c3d_file,
action=
'read', status=
'old',
err=001)
52 read (20, *,
err=002)
na
59 call show_error (
"Impossible to allocate memory"//char(0), &
60 "Function: read_c3d"//char(0),
"Table: FULLPOS"//char(0))
65 call show_error (
"Impossible to allocate memory"//char(0), &
66 "Function: read_c3d"//char(0),
"Table: TAB_OF_TYPE"//char(0))
71 read (20, *,
err=002)
tab_of_type(
j),
k,
fullpos(
j,1,
i),
fullpos(
j,2,
i),
fullpos(
j,3,
i)
89INTEGER (KIND=c_int) FUNCTION write_c3d (c3d_f, lc3d, fc3d, tc3d) bind (C,NAME='write_c3d_')
99INTEGER (KIND=c_int),
INTENT(IN) :: lc3d, fc3d, tc3d
100CHARACTER (KIND=c_char),
DIMENSION(*),
INTENT(IN) :: c3d_f
101DOUBLE PRECISION,
DIMENSION(3) :: savep
102CHARACTER (LEN=lc3d) :: c3d_file
105 INTEGER,
INTENT(IN) :: unitfile, natl
110 c3d_file(
i:
i) = c3d_f(
i)
114open (unit=20, file=c3d_file,
action=
'write', status=
'unknown',
err=001)
117 write (20,
'(i10)')
na
120 if (fc3d .eq. 1)
then
129 if (tc3d .eq. 1)
then
133 write (20,
'(a2,3x,i2,3(3x,f15.10))',
err=002)
tl(
lot(
j)), 0, savep
integer(kind=c_int) function read_c3d(c3d_f, lc3d)
integer(kind=c_int) function write_c3d(c3d_f, lc3d, fc3d, tc3d)
void show_error(char *error, int val, GtkWidget *win)
show error message
double precision, dimension(:,:,:), allocatable fullpos
double precision, parameter angtobohr
character(len=2), dimension(:), allocatable tab_of_type
character(len=2), dimension(:), allocatable tl
type(lattice), pointer nbox
type(lattice), dimension(:), allocatable, target the_box
integer, dimension(:), allocatable lot
integer function test_length(unitfile, natl)