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 Definition of gCP types for DFT calculations 10 : !> \author JGH (20.10.2018) 11 : ! ************************************************************************************************** 12 : MODULE qs_gcp_types 13 : 14 : USE kinds, ONLY: default_string_length,& 15 : dp 16 : USE qs_neighbor_list_types, ONLY: neighbor_list_set_p_type,& 17 : release_neighbor_list_sets 18 : #include "./base/base_uses.f90" 19 : 20 : IMPLICIT NONE 21 : 22 : PRIVATE 23 : 24 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_gcp_types' 25 : 26 : ! ************************************************************************************************** 27 : TYPE qs_gcp_kind_type 28 : INTEGER :: za = -1 29 : REAL(KIND=dp) :: asto = -1.0_dp 30 : REAL(KIND=dp) :: rcsto = -1.0_dp 31 : INTEGER :: nq = -1 32 : REAL(KIND=dp) :: nbvirt = -1.0_dp 33 : REAL(KIND=dp) :: eamiss = -1.0_dp 34 : REAL(KIND=dp), DIMENSION(6) :: al = -1.0_dp 35 : REAL(KIND=dp), DIMENSION(6) :: cl = -1.0_dp 36 : END TYPE qs_gcp_kind_type 37 : ! ************************************************************************************************** 38 : TYPE qs_gcp_type 39 : LOGICAL :: do_gcp = .FALSE. 40 : LOGICAL :: verbose = .FALSE. !extended output 41 : CHARACTER(LEN=default_string_length) :: parameter_file_name = "" 42 : ! parameter input 43 : CHARACTER(LEN=default_string_length), & 44 : DIMENSION(:), POINTER :: kind_type => NULL() 45 : REAL(KIND=dp), DIMENSION(:), POINTER :: ea => NULL() 46 : !global parameters 47 : REAL(KIND=dp) :: alpha = -1.0_dp, beta = -1.0_dp, sigma = -1.0_dp, eta = -1.0_dp 48 : !neighborlist 49 : TYPE(neighbor_list_set_p_type), & 50 : DIMENSION(:), POINTER :: sab_gcp => Null() ! neighborlists for pair interactions 51 : !kind information 52 : TYPE(qs_gcp_kind_type), DIMENSION(:), & 53 : POINTER :: gcp_kind => NULL() ! atomic kind parameters 54 : END TYPE qs_gcp_type 55 : ! ************************************************************************************************** 56 : 57 : PUBLIC :: qs_gcp_type 58 : PUBLIC :: qs_gcp_release 59 : 60 : ! ************************************************************************************************** 61 : CONTAINS 62 : ! ************************************************************************************************** 63 : !> \brief ... 64 : !> \param gcp_env ... 65 : ! ************************************************************************************************** 66 5182 : SUBROUTINE qs_gcp_release(gcp_env) 67 : 68 : TYPE(qs_gcp_type), POINTER :: gcp_env 69 : 70 5182 : IF (ASSOCIATED(gcp_env)) THEN 71 : 72 5182 : CALL release_neighbor_list_sets(gcp_env%sab_gcp) 73 5182 : IF (ASSOCIATED(gcp_env%kind_type)) THEN 74 0 : DEALLOCATE (gcp_env%kind_type) 75 : END IF 76 5182 : IF (ASSOCIATED(gcp_env%ea)) THEN 77 0 : DEALLOCATE (gcp_env%ea) 78 : END IF 79 : 80 5182 : IF (ASSOCIATED(gcp_env%gcp_kind)) THEN 81 0 : DEALLOCATE (gcp_env%gcp_kind) 82 : END IF 83 : 84 5182 : DEALLOCATE (gcp_env) 85 : 86 : END IF 87 : 88 5182 : END SUBROUTINE qs_gcp_release 89 : 90 : ! ************************************************************************************************** 91 : 92 0 : END MODULE qs_gcp_types 93 :