61use,
INTRINSIC :: iso_c_binding
90LOGICAL :: all_atoms=.false.
120INTEGER ::
h=0,
i=0,
j=0,
k=0,
l=0,
m=0,
n=0,
o=0,
p=0,
r=0,
t=0,
u=0,
v=0
186INTEGER,
DIMENSION(:),
ALLOCATABLE ::
lot
187INTEGER,
DIMENSION(:),
ALLOCATABLE ::
nbspbs
191INTEGER,
DIMENSION(:),
ALLOCATABLE ::
atomid
203INTEGER,
DIMENSION(:),
ALLOCATABLE ::
mibs
208INTEGER,
DIMENSION(:),
ALLOCATABLE ::
ntetra
222INTEGER,
DIMENSION(:),
ALLOCATABLE ::
valid
233INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
lt_geom
234INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
geom_la
236INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tetra
240INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tiida
241INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tisp
245INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
contj
249INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
cort
250INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
edget
251INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
deft
252INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
corta
253INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
edgeta
254INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
defta
255INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tda
259INTEGER,
DIMENSION(:,:),
ALLOCATABLE,
TARGET ::
indr
260INTEGER,
DIMENSION(:,:),
ALLOCATABLE,
TARGET ::
nring
261INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
vpat
269INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
pring
284INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
corner
285INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
edge
286INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
def
287INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
cornera
288INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
edgea
289INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
defa
290INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
tdsa
294INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
voisj
298INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
statbd
304INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
stpna
305INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
pna,
sna
306INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE,
TARGET ::
ringsaved
321INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE,
TARGET ::
ringord
325INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE,
TARGET ::
sringord
357CHARACTER (LEN=2),
DIMENSION(:),
ALLOCATABLE ::
tl,
ftab
359CHARACTER (LEN=2),
DIMENSION(:),
ALLOCATABLE ::
label
363CHARACTER (LEN=15),
DIMENSION(:),
ALLOCATABLE ::
elemid
377CHARACTER (LEN=12),
DIMENSION(:,:,:),
ALLOCATABLE ::
lgeo
395DOUBLE PRECISION ::
w=0.0d0,
x=0.0d0,
y=0.0d0,
z=0.0d0
396DOUBLE PRECISION,
PARAMETER ::
pi=acos(-1.0)
397DOUBLE PRECISION,
PARAMETER ::
avogadro=6.02214179d0
405DOUBLE PRECISION ::
dc
435DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
s_length
436DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mass,
m_ss
437DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
rvdw,
r_dw
438DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
dcte
440DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
cmoy,
xi
441DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mtabl
445DOUBLE PRECISION,
DIMENSION(3) ::
cutfv
450DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mac
451DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
sa_count
461DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
r_point
462DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
grtab
464DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
drn,
trn
466DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
drx,
trx
472DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
nscattl
473DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
xscattl
474DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
s,
xs
475DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
gr_t
480DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
fnbspbs
481DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
modq
483DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
cij,
sik
494DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
irred,
red
496DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
totpstep
507DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
epna
508DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
poa,
pob
512DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ma_count
513DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
num_gsa
518DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
btij
522DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etype
523DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ctype
524DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
detype
525DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etypea
526DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ctypea
527DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
detypea
528DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etda
532DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
qvect
536DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
drift,
cor
537DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
d2i,
d2inac
546DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fullpos
547DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fullvel
553DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
gr_ij
554DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
ggr_ij
555DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
dn_ij
559DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
gqbt
563DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
sij,
spij
564DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
ss_ij
568DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fzsij
573DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
cornac
582DOUBLE PRECISION,
DIMENSION(:,:,:,:),
ALLOCATABLE ::
gij
583DOUBLE PRECISION,
DIMENSION(:,:,:,:),
ALLOCATABLE ::
dn
620 TYPE (
at),
POINTER :: next
621 TYPE (
at),
POINTER :: prev
628 INTEGER,
DIMENSION(:),
ALLOCATABLE :: bsp
629 TYPE (
at),
POINTER :: first_at
631 TYPE (
mol),
POINTER :: next
632 TYPE (
mol),
POINTER :: prev
646 INTEGER,
DIMENSION(:),
ALLOCATABLE :: atom_id
649 INTEGER,
DIMENSION(27) :: idneigh
655 LOGICAL :: glass=.false.
656 LOGICAL :: cubic=.false.
657 DOUBLE PRECISION :: volume
658 DOUBLE PRECISION,
DIMENSION(3) :: modv
659 DOUBLE PRECISION :: minv, maxv
660 DOUBLE PRECISION,
DIMENSION(3) :: modr
661 DOUBLE PRECISION :: minr, maxr
662 DOUBLE PRECISION,
DIMENSION(3,3) :: lvect
663 DOUBLE PRECISION,
DIMENSION(3,3) :: lrecp
664 DOUBLE PRECISION,
DIMENSION(3,3) :: fractocart, carttofrac
integer, dimension(:,:), allocatable atrmax
double precision, dimension(:), allocatable cmoy
double precision, dimension(:,:,:), allocatable fullpos
integer, dimension(:,:,:), allocatable statbd
double precision, parameter angtobohr
double precision, dimension(:), allocatable drx
double precision, dimension(:), allocatable fnbspbs
double precision total_density
integer, dimension(:), allocatable mibs
integer, dimension(:), allocatable mol_atoms
double precision, dimension(:,:,:), allocatable nfullpos
double precision, dimension(2) gd
double precision fact_rmax
double precision, parameter avogadro
double precision, dimension(:), allocatable tdtabl
double precision, dimension(:), allocatable mtabl
double precision, dimension(3) var
double precision, dimension(3) rcm
double precision, dimension(:), allocatable moyred
double precision, dimension(:), allocatable trx
double precision, dimension(:), allocatable qvectx
integer, dimension(3) isize
double precision sigma_liss
integer, dimension(:,:), allocatable atrmsx
double precision, dimension(:), allocatable nscattl
double precision, dimension(3) rim
double precision, dimension(:,:), allocatable d2inac
double precision, dimension(:), allocatable mass
double precision, dimension(:), allocatable dist_ji
double precision, dimension(:,:,:), allocatable fullvel
double precision, dimension(:,:,:), allocatable fzsij
double precision, dimension(:), allocatable moypat
double precision, dimension(:,:,:), allocatable dn_ij
integer, dimension(:,:,:), allocatable atpna
double precision, dimension(:), allocatable ectyp
character(len=20) nom_tmp
double precision, dimension(:), allocatable qvecty
double precision, dimension(:,:), allocatable pob
double precision, dimension(:), allocatable r_pfft
integer, dimension(:,:), allocatable indrat
integer, dimension(:), allocatable spna
double precision, dimension(:), allocatable ggrtot
integer, dimension(:,:,:), allocatable def
double precision, dimension(:), allocatable cij
character(len=2), dimension(:), allocatable tab_of_type
character(len=15), dimension(:), allocatable elemid
double precision, dimension(:), allocatable q_point
integer, dimension(:), allocatable lgsa
double precision, dimension(:,:,:), allocatable ggr_ij
double precision, dimension(:), allocatable grtab
double precision, dimension(:,:), allocatable gr_tmp
integer, dimension(:,:,:), allocatable edge
double precision, dimension(:), allocatable xi
double precision, dimension(:), allocatable moypur
integer, dimension(:,:), allocatable contj
double precision, dimension(:,:), allocatable ctypea
double precision, dimension(:,:,:), allocatable d2dirnac
double precision, dimension(:,:), allocatable poa
integer, dimension(:,:,:), allocatable atring
double precision, dimension(:,:,:), allocatable nfpos
double precision, dimension(:), allocatable dist_ij
character(len=2), dimension(:), allocatable tl
double precision, dimension(:,:), allocatable ma_count
double precision, dimension(:), allocatable ctabl
double precision, dimension(:), allocatable totpstep
double precision, dimension(:,:,:), allocatable spij
double precision, dimension(:), allocatable dcte
double precision, dimension(:), allocatable m_ss
double precision real_density
double precision, dimension(3) pmax
integer, dimension(:,:), allocatable ampat
character(len=20) alc_tab
type(pixel), dimension(:), allocatable thepix
double precision, dimension(:), allocatable k_point
integer, dimension(:,:,:), allocatable lirr
character(len=12), dimension(:,:), allocatable liste_geoms
integer, dimension(:,:,:), allocatable defa
integer, dimension(:), allocatable nbspbs
double precision, dimension(:), allocatable evmin
double precision, dimension(:,:), allocatable d2i
double precision, dimension(:), allocatable s
integer, dimension(:,:), allocatable maxpna
double precision, dimension(:), allocatable r_point
double precision, dimension(3) r2ij
integer, dimension(:,:), allocatable minpna
double precision, dimension(:,:), allocatable btij
integer, dimension(:,:), allocatable querng
integer, dimension(:,:), allocatable nirr
integer, dimension(:,:), allocatable pringord
integer, dimension(:,:,:), allocatable edgea
double precision, dimension(:,:,:,:), allocatable gij
double precision, dimension(:), allocatable grtot
integer, dimension(:), allocatable degeneracy
double precision, dimension(:,:), allocatable ctype
double precision, dimension(:,:), allocatable etypea
double precision, dimension(:), allocatable ectypat
double precision, dimension(:), allocatable s_length
integer, dimension(:), allocatable valid
double precision, dimension(:), allocatable eabl
type(lattice), pointer nbox
double precision, dimension(:), allocatable red
double precision gr_cutoff
integer, dimension(:,:), allocatable corta
double precision, dimension(3) ril
integer, dimension(:,:), allocatable edget
double precision, dimension(:), allocatable ectype
double precision, dimension(:), allocatable xs
integer, dimension(:), allocatable tot_gsa
double precision, dimension(2) c_box
integer, dimension(:,:,:), allocatable la_count
integer, dimension(:), allocatable rpat
double precision, dimension(:,:), allocatable cor
double precision, dimension(:), allocatable modq
integer, dimension(:), allocatable res_list
double precision, dimension(:), allocatable evmax
double precision delta_ang
double precision, dimension(3) rij
integer, dimension(:,:), allocatable tisp
type(lattice), dimension(:), allocatable, target the_box
integer, dimension(:,:,:), allocatable tdsa
double precision, dimension(:), allocatable mac
character(len=12), dimension(:,:,:), allocatable lgeo
integer, dimension(:,:,:), allocatable indsring
double precision, dimension(:), allocatable tdfft
double precision, dimension(:,:), allocatable qvect
integer, dimension(:,:), allocatable pring
double precision, dimension(:,:,:), allocatable d2dir
integer, dimension(:,:), allocatable atrmsn
type(pixel), dimension(:), allocatable testpix
double precision, dimension(:), allocatable irred
integer, dimension(:), allocatable ngsa
double precision, dimension(:), allocatable cabl
double precision, dimension(:,:,:), allocatable d2ijnac
integer, dimension(:,:), allocatable tot_geomsa
double precision, dimension(3) pmin
integer, dimension(:,:), allocatable edgeta
double precision, dimension(:,:,:), allocatable ss_ij
integer, dimension(:,:,:), allocatable voisj
double precision, dimension(:), allocatable irrat
double precision, dimension(:,:,:,:), allocatable dn
double precision norm_tot
integer, dimension(:,:), allocatable tda
integer, dimension(:,:), allocatable deft
double precision, dimension(:,:,:), allocatable gr_ij
integer, dimension(:,:), allocatable tetra
integer, dimension(:,:,:,:), allocatable, target sringord
double precision, dimension(3) dab
integer, dimension(:,:,:,:), allocatable, target ringord
double precision, dimension(:,:,:), allocatable d2ij
character(len=9) progname
double precision, dimension(:,:), allocatable etda
double precision, dimension(:), allocatable moyrat
integer, dimension(:,:,:), allocatable matpna
double precision, dimension(:), allocatable xggrtot
double precision, dimension(2) go
double precision, dimension(:,:), allocatable num_gsa
integer, dimension(:,:,:), allocatable pna
double precision, dimension(:), allocatable xscattl
double precision, dimension(:,:), allocatable drift
character(len=2), dimension(:), allocatable ftab
double precision, dimension(:,:), allocatable epna
double precision, dimension(:), allocatable shell_vol
integer, dimension(:,:,:), allocatable cornera
integer, dimension(:,:), allocatable vref
double precision, dimension(:), allocatable qvectz
integer, dimension(:,:), allocatable atrmin
integer, dimension(:,:), allocatable defta
double precision, dimension(:), allocatable ectat
double precision, dimension(:), allocatable ectabl
integer, dimension(:,:), allocatable, target indr
integer, dimension(:,:,:), allocatable indring
double precision, dimension(:), allocatable rnamin
integer, dimension(:,:), allocatable vpat
integer, dimension(:,:,:), allocatable stpna
integer, dimension(:,:,:), allocatable sna
double precision, dimension(:,:), allocatable gr_cut
integer, dimension(:), allocatable npring
integer, dimension(:), allocatable lp_geom
double precision, dimension(:), allocatable dfft
double precision, dimension(:), allocatable gfft
double precision, dimension(:), allocatable etabl
integer, dimension(:), allocatable atomid
double precision, dimension(:,:), allocatable etype
double precision, dimension(:), allocatable dabl
double precision, dimension(:), allocatable r_dw
double precision, dimension(:), allocatable gr_t
double precision, dimension(:,:), allocatable detype
integer, dimension(:,:), allocatable nirrat
double precision, dimension(:), allocatable rnamax
double precision sinus_fact_rmax
double precision, dimension(:,:,:), allocatable gqbt
character(len=2), dimension(:), allocatable label
integer, dimension(:), allocatable cpat
double precision time_tot
integer, dimension(:), allocatable apna
double precision, dimension(:), allocatable redat
double precision, dimension(:), allocatable drn
integer, dimension(:,:,:), allocatable, target ringsaved
integer, dimension(:), allocatable ringstat
double precision, dimension(:), allocatable sa_count
double precision, dimension(:), allocatable trn
double precision, dimension(3) rcm2
double precision, dimension(:), allocatable dtabl
integer, dimension(:), allocatable ntetra
integer, dimension(:,:,:), allocatable corner
integer, dimension(:), allocatable lot
double precision, dimension(:,:,:), allocatable ecart_type
double precision, dimension(:), allocatable rvdw
double precision sinus_phi
integer, dimension(:), allocatable matdist
double precision, dimension(:,:), allocatable detypea
integer, dimension(:,:), allocatable, target nring
double precision, dimension(2) gn
integer, dimension(:,:), allocatable lt_geom
integer, dimension(:), allocatable tigl
double precision, dimension(:,:,:), allocatable sij
double precision, dimension(:), allocatable xgrtot
double precision, dimension(3) cutfv
integer, dimension(:,:,:), allocatable, target sringsaved
integer, dimension(:), allocatable togl
double precision, dimension(:,:,:), allocatable cornac
integer, dimension(:), allocatable queue
integer, dimension(:,:), allocatable geom_la
double precision, parameter pi
double precision, dimension(:), allocatable sik
integer, dimension(:,:), allocatable cort
integer, dimension(:,:), allocatable tiida
double precision, dimension(3) r2cor