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 Type for storing MD parameters 10 : !> \author CJM 11 : !> \author Teodoro Laino [tlaino] - University of Zurich - 10.2008 12 : !> reorganization of the original routines/modules 13 : ! ************************************************************************************************** 14 : MODULE simpar_types 15 : 16 : USE kinds, ONLY: dp 17 : #include "./base/base_uses.f90" 18 : 19 : IMPLICIT NONE 20 : 21 : PRIVATE 22 : 23 : ! ************************************************************************************************** 24 : !> \brief Simulation parameter type for molecular dynamics 25 : !> \par History 26 : !> created [CJM] 27 : !> \author Teodoro Laino [tlaino] - University of Zurich - 10.2008 28 : !> reorganization of the original routines/modules 29 : ! ************************************************************************************************** 30 : TYPE simpar_type 31 : INTEGER :: nsteps = -1 32 : INTEGER :: max_steps = -1 33 : REAL(KIND=dp) :: dt = -1.0_dp 34 : REAL(KIND=dp) :: dt_fact = -1.0_dp 35 : REAL(KIND=dp) :: dr_tol = -1.0_dp 36 : REAL(KIND=dp) :: dsc_tol = -1.0_dp 37 : REAL(KIND=dp) :: temp_ext = -1.0_dp 38 : REAL(KIND=dp) :: temp_baro_ext = -1.0_dp 39 : REAL(KIND=dp) :: temp_baro = -1.0_dp 40 : REAL(KIND=dp) :: temp_tol = -1.0_dp 41 : REAL(KIND=dp) :: temp_baro_tol = -1.0_dp 42 : REAL(KIND=dp) :: p_ext = -1.0_dp 43 : REAL(KIND=dp) :: cmass = -1.0_dp 44 : REAL(KIND=dp) :: cmass_nph = -1.0_dp 45 : REAL(KIND=dp) :: v0 = -1.0_dp 46 : REAL(KIND=dp) :: e0 = -1.0_dp 47 : REAL(KIND=dp) :: v_shock = -1.0_dp 48 : REAL(KIND=dp) :: p0 = -1.0_dp 49 : REAL(KIND=dp) :: f_annealing = -1.0_dp 50 : REAL(KIND=dp) :: f_annealing_cell = -1.0_dp 51 : REAL(KIND=dp) :: f_temperature_annealing = -1.0_dp 52 : REAL(KIND=dp) :: gamma_nph = -1.0_dp 53 : INTEGER :: ensemble = -1 54 : LOGICAL :: constraint = .FALSE. 55 : LOGICAL :: annealing = .FALSE. 56 : LOGICAL :: annealing_cell = .FALSE. 57 : LOGICAL :: temperature_annealing = .FALSE. 58 : LOGICAL :: dump_lm = .FALSE. 59 : LOGICAL :: angvel_zero = .FALSE. 60 : LOGICAL :: variable_dt = .FALSE. 61 : INTEGER :: nfree = -1, nfree_rot_transl = -1 62 : INTEGER :: info_constraint = -1 63 : INTEGER :: lagrange_multipliers = -1 64 : REAL(KIND=dp) :: tau_cell = -1.0_dp 65 : ! Constraints Parameters 66 : REAL(KIND=dp) :: shake_tol = -1.0_dp, roll_tol = -1.0_dp 67 : ! Langevin Parameters 68 : REAL(KIND=dp) :: gamma = -1.0_dp 69 : REAL(KIND=dp) :: noisy_gamma = -1.0_dp 70 : REAL(KIND=dp) :: shadow_gamma = -1.0_dp 71 : REAL(KIND=dp) :: var_w = -1.0_dp 72 : ! RESPA Parameters 73 : LOGICAL :: multi_time_switch = .FALSE., do_respa = .FALSE. 74 : INTEGER :: n_time_steps = -1 75 : ! SHELL parameters 76 : REAL(KIND=dp) :: temp_sh_ext = -1.0_dp 77 : REAL(KIND=dp) :: temp_sh_tol = -1.0_dp 78 : LOGICAL :: temperature_per_kind = .FALSE. 79 : LOGICAL :: scale_temperature_per_kind = .FALSE. 80 : LOGICAL :: do_thermal_region = .FALSE. 81 : ! ADIABATIC parameters 82 : REAL(KIND=dp) :: temp_slow = -1.0_dp 83 : REAL(KIND=dp) :: temp_fast = -1.0_dp 84 : REAL(KIND=dp) :: temp_tol_fast = -1.0_dp, temp_tol_slow = -1.0_dp 85 : INTEGER :: n_resp_fast = -1 86 : ! Velocity softening Parameters 87 : INTEGER :: soften_nsteps = -1 88 : REAL(KIND=dp) :: soften_alpha = -1.0_dp 89 : REAL(KIND=dp) :: soften_delta = -1.0_dp 90 : ! MD initialisation method 91 : INTEGER :: initialization_method = -1 92 : END TYPE simpar_type 93 : 94 : PUBLIC :: simpar_type, & 95 : create_simpar_type, & 96 : release_simpar_type 97 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'simpar_types' 98 : 99 : CONTAINS 100 : ! ************************************************************************************************** 101 : !> \brief Creates the simulation parameters type 102 : !> \param simpar ... 103 : !> \author Teodoro Laino 104 : ! ************************************************************************************************** 105 1840 : SUBROUTINE create_simpar_type(simpar) 106 : TYPE(simpar_type), POINTER :: simpar 107 : 108 1840 : CPASSERT(.NOT. ASSOCIATED(simpar)) 109 1840 : ALLOCATE (simpar) 110 1840 : END SUBROUTINE create_simpar_type 111 : 112 : ! ************************************************************************************************** 113 : !> \brief Releases the simulation parameters type 114 : !> \param simpar ... 115 : !> \author Teodoro Laino 116 : ! ************************************************************************************************** 117 1840 : SUBROUTINE release_simpar_type(simpar) 118 : TYPE(simpar_type), POINTER :: simpar 119 : 120 1840 : CPASSERT(ASSOCIATED(simpar)) 121 1840 : DEALLOCATE (simpar) 122 1840 : END SUBROUTINE release_simpar_type 123 : 124 0 : END MODULE simpar_types