LCOV - code coverage report
Current view: top level - src/motion - space_groups_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:904d571) Lines: 19 20 95.0 %
Date: 2024-02-28 06:49:54 Functions: 1 3 33.3 %

          Line data    Source code
       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             : ! **************************************************************************************************
       9             : !> \brief Space Group Symmetry Type Module  (version 1.0, Ferbruary 12, 2021)
      10             : !> \par History
      11             : !>      Pierre-André Cazade [pcazade] 02.2021 - University of Limerick
      12             : !> \author Pierre-André Cazade (first version)
      13             : ! **************************************************************************************************
      14             : MODULE space_groups_types
      15             : 
      16             :    USE cell_types,                      ONLY: cell_release,&
      17             :                                               cell_type
      18             :    USE kinds,                           ONLY: dp
      19             : #include "../base/base_uses.f90"
      20             : 
      21             :    IMPLICIT NONE
      22             : 
      23             :    PRIVATE
      24             : 
      25             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'space_groups_types'
      26             : 
      27             :    TYPE spgr_type
      28             :       LOGICAL                                     :: keep_space_group = .FALSE.
      29             :       LOGICAL                                     :: symlib = .FALSE.
      30             :       LOGICAL                                     :: print_atoms = .FALSE.
      31             :       INTEGER                                     :: iunit = -1
      32             :       INTEGER                                     :: istriz = -1
      33             :       REAL(KIND=dp)                               :: eps_symmetry = 1.0e-4_dp
      34             :       INTEGER                                     :: nparticle = 0
      35             :       INTEGER                                     :: nparticle_sym = 0
      36             :       INTEGER                                     :: n_atom = 0
      37             :       INTEGER                                     :: n_core = 0
      38             :       INTEGER                                     :: n_shell = 0
      39             :       INTEGER                                     :: n_atom_sym = 0
      40             :       INTEGER                                     :: n_core_sym = 0
      41             :       INTEGER                                     :: n_shell_sym = 0
      42             :       INTEGER, DIMENSION(:), ALLOCATABLE          :: atype
      43             :       INTEGER, DIMENSION(:, :), ALLOCATABLE       :: eqatom
      44             :       LOGICAL, DIMENSION(:), ALLOCATABLE          :: lop, lat
      45             :       REAL(KIND=dp), DIMENSION(3)                 :: pol = 0.0_dp
      46             :       !SPGLIB
      47             :       INTEGER                                     :: space_group_number = 0
      48             :       CHARACTER(len=11)                           :: international_symbol = ""
      49             :       CHARACTER(len=6)                            :: pointgroup_symbol = ""
      50             :       CHARACTER(len=7)                            :: schoenflies = ""
      51             :       INTEGER                                     :: n_operations = 0
      52             :       INTEGER                                     :: n_reduced_operations = 0
      53             :       INTEGER                                     :: n_operations_subset = 0
      54             :       INTEGER, DIMENSION(:, :, :), ALLOCATABLE    :: rotations
      55             :       INTEGER, DIMENSION(:, :, :), ALLOCATABLE    :: rotations_subset
      56             :       REAL(KIND=dp), DIMENSION(:, :), ALLOCATABLE :: translations
      57             :       TYPE(cell_type), POINTER                    :: cell_ref => NULL()
      58             :    END TYPE spgr_type
      59             : 
      60             :    PUBLIC :: spgr_type, release_spgr_type
      61             : 
      62             : CONTAINS
      63             : 
      64             : ! **************************************************************************************************
      65             : !> \brief Release the SPGR type
      66             : !> \param spgr  The SPGR type
      67             : !> \par History
      68             : !>      01.2020 created [pcazade]
      69             : !> \author Pierre-André Cazade (first version)
      70             : ! **************************************************************************************************
      71        2012 :    SUBROUTINE release_spgr_type(spgr)
      72             : 
      73             :       TYPE(spgr_type), POINTER                           :: spgr
      74             : 
      75        2012 :       IF (ASSOCIATED(spgr)) THEN
      76             : 
      77        2012 :          IF (ALLOCATED(spgr%rotations)) THEN
      78           8 :             DEALLOCATE (spgr%rotations)
      79             :          END IF
      80        2012 :          IF (ALLOCATED(spgr%rotations_subset)) THEN
      81           8 :             DEALLOCATE (spgr%rotations_subset)
      82             :          END IF
      83        2012 :          IF (ALLOCATED(spgr%translations)) THEN
      84           8 :             DEALLOCATE (spgr%translations)
      85             :          END IF
      86        2012 :          IF (ALLOCATED(spgr%atype)) THEN
      87           8 :             DEALLOCATE (spgr%atype)
      88             :          END IF
      89        2012 :          IF (ALLOCATED(spgr%eqatom)) THEN
      90           8 :             DEALLOCATE (spgr%eqatom)
      91             :          END IF
      92        2012 :          IF (ALLOCATED(spgr%lop)) THEN
      93           8 :             DEALLOCATE (spgr%lop)
      94             :          END IF
      95        2012 :          IF (ALLOCATED(spgr%lat)) THEN
      96           8 :             DEALLOCATE (spgr%lat)
      97             :          END IF
      98             : 
      99        2012 :          CALL cell_release(spgr%cell_ref)
     100             : 
     101        2012 :          DEALLOCATE (spgr)
     102             :       END IF
     103             : 
     104        2012 :    END SUBROUTINE release_spgr_type
     105             : 
     106           0 : END MODULE space_groups_types

Generated by: LCOV version 1.15