21INTEGER (KIND=c_int) FUNCTION read_xyz (xyz_f, lxyz, is_npt) bind (C,NAME='read_xyz_')
33INTEGER (KIND=c_int),
INTENT(IN) :: lxyz, is_npt
34CHARACTER (KIND=c_char),
DIMENSION(*),
INTENT(IN) :: xyz_f
35CHARACTER (LEN=lxyz) :: xyz_file
38 INTEGER,
INTENT(IN) :: unitfile, natl
43 xyz_file(
i:
i) = xyz_f(
i)
48inquire (file=xyz_file, exist=isok)
51 open (unit=20, file=xyz_file,
action=
'read', status=
'old',
err=001)
53 read (20, *,
err=002)
na
61 call show_error (
"Impossible to allocate memory"//char(0), &
62 "Function: read_xyz"//char(0),
"Table: FULLPOS"//char(0))
67 call show_error (
"Impossible to allocate memory"//char(0), &
68 "Function: read_xyz"//char(0),
"Table: TAB_OF_TYPE"//char(0))
75 read (20, *,
err=002)
tab_of_type(
j),
fullpos(
j,1,
i),
fullpos(
j,2,
i),
fullpos(
j,3,
i)
78 if (is_npt .eq. 1)
call send_steps (
ns)
97INTEGER,
INTENT(IN) :: unitfile, natl
105 read (unitfile, *, iostat=eof)
119SUBROUTINE send_label (sp_id, sp_ln, spec_label) bind (C,NAME='send_label_')
125INTEGER (KIND=c_int),
INTENT(IN) :: sp_id, sp_ln
126CHARACTER (KIND=c_char),
DIMENSION(sp_ln),
INTENT(IN) :: spec_label
130 tl(sp_id)(
i:
i) = spec_label(
i)
135INTEGER (KIND=c_int) FUNCTION write_xyz (xyz_f, lxyz, fxyz, txyz) bind (C,NAME='write_xyz_')
145INTEGER (KIND=c_int),
INTENT(IN) :: lxyz, fxyz, txyz
146CHARACTER (KIND=c_char),
DIMENSION(*),
INTENT(IN) :: xyz_f
147DOUBLE PRECISION,
DIMENSION(3) :: savep
148CHARACTER (LEN=lxyz) :: xyz_file
152 INTEGER,
INTENT(IN) :: unitfile, natl
157 xyz_file(
i:
i) = xyz_f(
i)
161open (unit=20, file=xyz_file,
action=
'write', status=
'unknown',
err=001)
163 write (20,
'(i10)')
na
166 if (fxyz .eq. 1)
then
175 if (txyz .eq. 1)
then
179 write (20,
'(a2,3(3x,f15.10))',
err=002)
tl(
lot(
j)), savep
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
subroutine send_label(sp_id, sp_ln, spec_label)
integer(kind=c_int) function write_xyz(xyz_f, lxyz, fxyz, txyz)
integer function test_length(unitfile, natl)
integer(kind=c_int) function read_xyz(xyz_f, lxyz, is_npt)