atomes 1.1.15
atomes: an atomic scale modeling tool box
Loading...
Searching...
No Matches
escs.F90
Go to the documentation of this file.
1! This file is part of the 'atomes' software.
2!
3! 'atomes' is free software: you can redistribute it and/or modify it under the terms
4! of the GNU Affero General Public License as published by the Free Software Foundation,
5! either version 3 of the License, or (at your option) any later version.
6!
7! 'atomes' is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
8! without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
9! See the GNU General Public License for more details.
10!
11! You should have received a copy of the GNU Affero General Public License along with 'atomes'.
12! If not, see <https://www.gnu.org/licenses/>
13!
14! Copyright (C) 2022-2024 by CNRS and University of Strasbourg
15!
20
21LOGICAL FUNCTION eescs ()
22
23USE parameters
24
25IMPLICIT NONE
26
27LOGICAL :: dmtxok
28
29INTERFACE
30 LOGICAL FUNCTION allocedco (alloc)
31 LOGICAL, INTENT(IN) :: alloc
32 END FUNCTION
33 LOGICAL FUNCTION distmtx(NAN, LAN, LOOKNGB, UPNGB, MOLVOL)
34 INTEGER, INTENT(IN) :: nan
35 INTEGER, DIMENSION(NAN), INTENT(IN) :: lan
36 LOGICAL, INTENT(IN) :: lookngb, upngb, molvol
37 END FUNCTION
38END INTERFACE
39
40if (.not. allocedco(.true.)) then
41 eescs=.false.
42 goto 001
43endif
44
45calc_prings=.false.
46nohp=.false.
47! Modify DISTMX to evaluate ES/CS
48dmtxok = distmtx(na, lot, .false., .false., .false.)
49
50if (.not. dmtxok) then
51 eescs=.false.
52 goto 001
53endif
54
55do i=1, ns
56 do j=1, na
57 do o=1, nsp
58 if (contj(j,i).eq.4 .and. (la_count(j,o,i) .eq. 4)) then
59 if(ns .gt. 1) tdsa(lot(j),o,i)=tdsa(lot(j),o,i)+1
60 tda(lot(j),o) = tda(lot(j),o)+1
61 endif
62 enddo
63 enddo
64enddo
65
66do j=1, nsp
67 do o=1, nsp
68 do i=1, ns
69 mtabl(i)=edgea(j,o,i)
70 enddo
71 z=0.0d0
72 call moyenne(mtabl, ns, z)
73 call ect_type(z, mtabl, ns, etypea(j,o))
74 do i=1, ns
75 mtabl(i)=cornera(j,o,i)
76 enddo
77 z=0.0d0
78 call moyenne(mtabl, ns, z)
79 call ect_type(z, mtabl, ns, ctypea(j,o))
80 do i=1, ns
81 mtabl(i)=defa(j,o,i)
82 enddo
83 z=0.0d0
84 call moyenne(mtabl, ns, z)
85 call ect_type(z, mtabl, ns, detypea(j,o))
86 do i=1, ns
87 mtabl(i)=tdsa(j,o,i)
88 enddo
89 call moyenne(mtabl, ns, z)
90 call ect_type(z, mtabl, ns, etda(j,o))
91 enddo
92enddo
93
94001 continue
95
96eescs=.true.
97
98END FUNCTION
logical function allocedco(alloc)
logical function distmtx(nan, lan, lookngb, upngb)
Definition dmtx.F90:338
logical function eescs()
Definition escs.F90:22
double precision, dimension(:), allocatable mtabl
integer, dimension(:,:), allocatable contj
double precision, dimension(:,:), allocatable ctypea
logical calc_prings
integer, dimension(:,:,:), allocatable defa
integer, dimension(:,:,:), allocatable edgea
double precision, dimension(:,:), allocatable etypea
double precision z
integer, dimension(:,:,:), allocatable la_count
integer, dimension(:,:,:), allocatable tdsa
logical nohp
integer, dimension(:,:), allocatable tda
double precision, dimension(:,:), allocatable etda
integer, dimension(:,:,:), allocatable cornera
integer, dimension(:), allocatable lot
double precision, dimension(:,:), allocatable detypea
integer nsp
subroutine moyenne(tableau, longtm, moytab)
Definition utils.F90:526
subroutine ect_type(moyenne, tableau, longte, ec_type)
Definition utils.F90:552