(git:374b731)
Loading...
Searching...
No Matches
exclusion_types.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2024 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7! **************************************************************************************************
8!> \brief an exclusion type
9! **************************************************************************************************
11
12#include "./base/base_uses.f90"
13 IMPLICIT NONE
14 PRIVATE
15
16! **************************************************************************************************
17!> \brief A type used to store lists of exclusions and onfos
18!> \par History
19!> 12.2010 created [Joost VandeVondele]
20! **************************************************************************************************
22 INTEGER, POINTER, DIMENSION(:) :: list_exclude_vdw
23 INTEGER, POINTER, DIMENSION(:) :: list_exclude_ei
24 INTEGER, POINTER, DIMENSION(:) :: list_onfo
25 END TYPE
26
27 PUBLIC :: exclusion_type, &
29
30 CHARACTER(len=*), PARAMETER, PRIVATE :: modulen = 'exclusion_types'
31
32CONTAINS
33
34! **************************************************************************************************
35!> \brief Release exclusion type
36!> \param exclusions ...
37!> \par History
38!> 12.2010 created [Teodoro Laino] - teodoro.laino@gmail.com
39!> \author teo
40! **************************************************************************************************
41 SUBROUTINE exclusion_release(exclusions)
42 TYPE(exclusion_type), DIMENSION(:), POINTER :: exclusions
43
44 INTEGER :: iatom
45
46 IF (ASSOCIATED(exclusions)) THEN
47 DO iatom = 1, SIZE(exclusions)
48 IF (ASSOCIATED(exclusions(iatom)%list_exclude_vdw, &
49 exclusions(iatom)%list_exclude_ei)) THEN
50 DEALLOCATE (exclusions(iatom)%list_exclude_vdw)
51 ELSE
52 IF (ASSOCIATED(exclusions(iatom)%list_exclude_vdw)) THEN
53 DEALLOCATE (exclusions(iatom)%list_exclude_vdw)
54 END IF
55 IF (ASSOCIATED(exclusions(iatom)%list_exclude_ei)) THEN
56 DEALLOCATE (exclusions(iatom)%list_exclude_ei)
57 END IF
58 END IF
59 IF (ASSOCIATED(exclusions(iatom)%list_onfo)) THEN
60 DEALLOCATE (exclusions(iatom)%list_onfo)
61 END IF
62 END DO
63 DEALLOCATE (exclusions)
64 END IF
65 END SUBROUTINE exclusion_release
66
67END MODULE exclusion_types
an exclusion type
subroutine, public exclusion_release(exclusions)
Release exclusion type.
A type used to store lists of exclusions and onfos.