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
187INTEGER,
DIMENSION(:),
ALLOCATABLE ::
lot
188INTEGER,
DIMENSION(:),
ALLOCATABLE ::
nbspbs
192INTEGER,
DIMENSION(:),
ALLOCATABLE ::
atomid
204INTEGER,
DIMENSION(:),
ALLOCATABLE ::
mibs
209INTEGER,
DIMENSION(:),
ALLOCATABLE ::
ntetra
223INTEGER,
DIMENSION(:),
ALLOCATABLE ::
valid
234INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
lt_geom
235INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
geom_la
237INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tetra
241INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tiida
242INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tisp
246INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
contj
250INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
cort
251INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
edget
252INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
deft
253INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
corta
254INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
edgeta
255INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
defta
256INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
tda
260INTEGER,
DIMENSION(:,:),
ALLOCATABLE,
TARGET ::
indr
261INTEGER,
DIMENSION(:,:),
ALLOCATABLE,
TARGET ::
nring
262INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
vpat
270INTEGER,
DIMENSION(:,:),
ALLOCATABLE ::
pring
285INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
corner
286INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
edge
287INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
def
288INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
cornera
289INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
edgea
290INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
defa
291INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
tdsa
295INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
voisj
299INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
statbd
305INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
stpna
306INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE ::
pna,
sna
307INTEGER,
DIMENSION(:,:,:),
ALLOCATABLE,
TARGET ::
ringsaved
322INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE,
TARGET ::
ringord
326INTEGER,
DIMENSION(:,:,:,:),
ALLOCATABLE,
TARGET ::
sringord
358CHARACTER (LEN=2),
DIMENSION(:),
ALLOCATABLE ::
tl,
ftab
360CHARACTER (LEN=2),
DIMENSION(:),
ALLOCATABLE ::
label
364CHARACTER (LEN=15),
DIMENSION(:),
ALLOCATABLE ::
elemid
378CHARACTER (LEN=12),
DIMENSION(:,:,:),
ALLOCATABLE ::
lgeo
396DOUBLE PRECISION ::
w=0.0d0,
x=0.0d0,
y=0.0d0,
z=0.0d0
397DOUBLE PRECISION,
PARAMETER ::
pi=acos(-1.0)
398DOUBLE PRECISION,
PARAMETER ::
avogadro=6.02214179d0
406DOUBLE PRECISION ::
dc
436DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
s_length
437DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mass,
m_ss
438DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
rvdw,
r_dw
439DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
dcte
441DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
cmoy,
xi
442DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mtabl
446DOUBLE PRECISION,
DIMENSION(3) ::
cutfv
451DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
mac
452DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
sa_count
462DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
r_point
463DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
grtab
465DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
drn,
trn
467DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
drx,
trx
473DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
nscattl
474DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
xscattl
475DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
s,
xs
476DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
gr_t
481DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
fnbspbs
482DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
modq
484DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
cij,
sik
495DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
irred,
red
497DOUBLE PRECISION,
DIMENSION(:),
ALLOCATABLE ::
totpstep
508DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
epna
509DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
poa,
pob
513DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ma_count
514DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
num_gsa
519DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
btij
523DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etype
524DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ctype
525DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
detype
526DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etypea
527DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
ctypea
528DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
detypea
529DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
etda
533DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
qvect
537DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
drift,
cor
538DOUBLE PRECISION,
DIMENSION(:,:),
ALLOCATABLE ::
d2i,
d2inac
547DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fullpos
548DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fullvel
554DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
gr_ij
555DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
ggr_ij
556DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
dn_ij
560DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
gqbt
564DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
sij,
spij
565DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
ss_ij
569DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
fzsij
574DOUBLE PRECISION,
DIMENSION(:,:,:),
ALLOCATABLE ::
cornac
583DOUBLE PRECISION,
DIMENSION(:,:,:,:),
ALLOCATABLE ::
gij
584DOUBLE PRECISION,
DIMENSION(:,:,:,:),
ALLOCATABLE ::
dn
621 TYPE (
at),
POINTER :: next
622 TYPE (
at),
POINTER :: prev
629 INTEGER,
DIMENSION(:),
ALLOCATABLE :: bsp
630 TYPE (
at),
POINTER :: first_at
632 TYPE (
mol),
POINTER :: next
633 TYPE (
mol),
POINTER :: prev
647 INTEGER,
DIMENSION(:),
ALLOCATABLE :: atom_id
650 INTEGER,
DIMENSION(27) :: idneigh
656 LOGICAL :: glass=.false.
657 LOGICAL :: cubic=.false.
658 DOUBLE PRECISION :: volume
659 DOUBLE PRECISION,
DIMENSION(3) :: modv
660 DOUBLE PRECISION :: minv, maxv
661 DOUBLE PRECISION,
DIMENSION(3) :: modr
662 DOUBLE PRECISION :: minr, maxr
663 DOUBLE PRECISION,
DIMENSION(3,3) :: lvect
664 DOUBLE PRECISION,
DIMENSION(3,3) :: lrecp
665 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