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 Types needed for MP2 calculations
10 : !> \par History
11 : !> 2011.05 created [Mauro Del Ben]
12 : !> \author MDB
13 : ! **************************************************************************************************
14 : MODULE mp2_types
15 : USE cp_dbcsr_api, ONLY: dbcsr_p_type,&
16 : dbcsr_type
17 : USE cp_eri_mme_interface, ONLY: cp_eri_mme_finalize,&
18 : cp_eri_mme_param
19 : USE cp_fm_types, ONLY: cp_fm_type
20 : USE hfx_types, ONLY: hfx_release,&
21 : hfx_type,&
22 : pair_list_element_type
23 : USE input_constants, ONLY: &
24 : do_eri_mme, eri_default, gw_pade_approx, kp_weights_W_auto, mp2_method_direct, &
25 : mp2_method_gpw, mp2_method_none, mp2_ri_optimize_basis, ri_mp2_laplace, ri_mp2_method_gpw, &
26 : ri_rpa_g0w0_crossing_z_shot, ri_rpa_method_gpw, rpa_exchange_none, soc_none, &
27 : wfc_mm_style_gemm
28 : USE input_section_types, ONLY: section_vals_release,&
29 : section_vals_type
30 : USE kinds, ONLY: dp
31 : USE kpoint_types, ONLY: kpoint_type
32 : USE libint_2c_3c, ONLY: libint_potential_type
33 : USE local_gemm_api, ONLY: local_gemm_ctxt_type
34 : USE message_passing, ONLY: mp_request_type
35 : USE qs_force_types, ONLY: qs_force_type
36 : USE qs_p_env_types, ONLY: qs_p_env_type
37 : #include "./base/base_uses.f90"
38 :
39 : IMPLICIT NONE
40 :
41 : PRIVATE
42 :
43 : CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'mp2_types'
44 :
45 : PUBLIC :: mp2_type, &
46 : integ_mat_buffer_type, &
47 : integ_mat_buffer_type_2D, &
48 : mp2_method_none, &
49 : mp2_method_direct, &
50 : mp2_method_gpw, &
51 : mp2_ri_optimize_basis, &
52 : ri_mp2_method_gpw, &
53 : ri_rpa_method_gpw, &
54 : ri_mp2_laplace, &
55 : init_TShPSC_lmax
56 :
57 : PUBLIC :: mp2_env_create, &
58 : mp2_env_release, &
59 : mp2_biel_type, &
60 : pair_list_type_mp2, &
61 : one_dim_int_array, &
62 : two_dim_int_array, &
63 : one_dim_real_array, &
64 : two_dim_real_array, &
65 : three_dim_real_array
66 :
67 : INTEGER, SAVE :: init_TShPSC_lmax = -1
68 :
69 : ! TYPE definitions
70 :
71 : TYPE one_dim_int_array
72 : INTEGER, DIMENSION(:), ALLOCATABLE :: array
73 : END TYPE one_dim_int_array
74 :
75 : TYPE two_dim_int_array
76 : INTEGER, DIMENSION(:, :), ALLOCATABLE :: array
77 : END TYPE two_dim_int_array
78 :
79 : TYPE one_dim_real_array
80 : REAL(KIND=dp), DIMENSION(:), ALLOCATABLE :: array
81 : END TYPE one_dim_real_array
82 :
83 : TYPE two_dim_real_array
84 : REAL(KIND=dp), DIMENSION(:, :), ALLOCATABLE :: array
85 : END TYPE two_dim_real_array
86 :
87 : TYPE three_dim_real_array
88 : REAL(KIND=dp), DIMENSION(:, :, :), ALLOCATABLE :: array
89 : END TYPE three_dim_real_array
90 :
91 : TYPE mp2_biel_type
92 : INTEGER, DIMENSION(:, :), ALLOCATABLE :: index_table
93 : END TYPE mp2_biel_type
94 :
95 : TYPE mp2_laplace_type
96 : INTEGER :: n_quadrature = -1, &
97 : num_integ_groups = -1
98 : END TYPE mp2_laplace_type
99 :
100 : TYPE mp2_direct_type
101 : LOGICAL :: big_send = .FALSE.
102 : END TYPE
103 :
104 : TYPE mp2_gpw_type
105 : REAL(KIND=dp) :: eps_grid = 0.0_dp, &
106 : eps_filter = 0.0_dp, &
107 : eps_pgf_orb_S = 0.0_dp
108 : INTEGER :: print_level = 0
109 : REAL(KIND=dp) :: cutoff = 0.0_dp, &
110 : relative_cutoff = 0.0_dp
111 : INTEGER :: size_lattice_sum = 0
112 : END TYPE
113 :
114 : TYPE ri_mp2_type
115 : INTEGER :: block_size = 0, &
116 : number_integration_groups = 0
117 : LOGICAL :: print_dgemm_info = .FALSE.
118 : END TYPE ri_mp2_type
119 :
120 : TYPE ri_rpa_type
121 : INTEGER :: rpa_num_quad_points = -1, &
122 : rpa_num_integ_groups = -1, &
123 : mm_style = wfc_mm_style_gemm
124 : TYPE(hfx_type), DIMENSION(:, :), POINTER :: x_data => NULL()
125 : TYPE(section_vals_type), POINTER :: xc_section_primary => Null(), &
126 : xc_section_aux => Null()
127 : LOGICAL :: reuse_hfx = .FALSE., &
128 : minimax_quad = .FALSE., &
129 : do_ri_g0w0 = .FALSE., &
130 : do_admm = .FALSE., &
131 : do_rse = .FALSE., &
132 : print_dgemm_info = .FALSE.
133 : ! GCC 8 has an issue with this being an ALLOCATABLE
134 : TYPE(dbcsr_type), DIMENSION(:), POINTER :: mo_coeff_o => NULL(), &
135 : mo_coeff_v => NULL()
136 : INTEGER :: exchange_correction = rpa_exchange_none, &
137 : exchange_block_size = -1
138 : LOGICAL :: use_hfx_implementation = .FALSE.
139 : REAL(KIND=dp) :: ener_exchange = 0.0_dp, &
140 : rse_corr_diag = 0.0_dp, &
141 : rse_corr = 0.0_dp, &
142 : scale_rpa = 0.0_dp
143 : END TYPE ri_rpa_type
144 :
145 : TYPE ri_rpa_im_time_type
146 : INTEGER :: cut_memory = 0
147 : LOGICAL :: memory_info = .FALSE., &
148 : make_chi_pos_definite = .FALSE., &
149 : make_overlap_mat_ao_pos_definite = .FALSE., &
150 : trunc_coulomb_ri_x = .FALSE., &
151 : keep_quad = .FALSE., &
152 : do_kpoints_from_Gamma = .FALSE., &
153 : do_extrapolate_kpoints = .FALSE.
154 : REAL(KIND=dp) :: eps_filter = 0.0_dp, &
155 : eps_filter_factor = 0.0_dp, &
156 : eps_compress = 0.0_dp, &
157 : exp_tailored_weights = 0.0_dp, &
158 : regularization_RI = 0.0_dp, &
159 : eps_eigval_S = 0.0_dp, &
160 : eps_eigval_S_Gamma = 0.0_dp, &
161 : rel_cutoff_trunc_coulomb_ri_x = 0.0_dp
162 : REAL(KIND=dp), DIMENSION(:), POINTER :: tau_tj => NULL(), &
163 : tau_wj => NULL(), &
164 : tj => NULL(), &
165 : wj => NULL()
166 : REAL(KIND=dp), DIMENSION(:, :), POINTER :: weights_cos_tf_t_to_w => NULL(), &
167 : weights_cos_tf_w_to_t => NULL()
168 : REAL(KIND=dp), DIMENSION(:), ALLOCATABLE :: Eigenval_Gamma, &
169 : wkp_V
170 : INTEGER :: group_size_P = 0, &
171 : group_size_3c = 0, &
172 : kpoint_weights_W_method = kp_weights_W_auto, &
173 : k_mesh_g_factor = 0
174 : INTEGER, DIMENSION(:), POINTER :: kp_grid => NULL()
175 : INTEGER, DIMENSION(3) :: kp_grid_extra = -1
176 : LOGICAL :: do_im_time_kpoints = .FALSE.
177 : INTEGER :: min_bsize = 0, &
178 : min_bsize_mo = 0, &
179 : nkp_orig = 0, &
180 : nkp_extra = 0
181 : TYPE(kpoint_type), POINTER :: kpoints_G => NULL(), &
182 : kpoints_Sigma => NULL(), &
183 : kpoints_Sigma_no_xc => NULL()
184 : INTEGER, ALLOCATABLE, DIMENSION(:) :: starts_array_mc_RI, ends_array_mc_RI, &
185 : starts_array_mc_block_RI, &
186 : ends_array_mc_block_RI, &
187 : starts_array_mc, ends_array_mc, &
188 : starts_array_mc_block, &
189 : ends_array_mc_block
190 :
191 : END TYPE ri_rpa_im_time_type
192 :
193 : TYPE ri_g0w0_type
194 : INTEGER :: corr_mos_occ = 0, &
195 : corr_mos_virt = 0, &
196 : corr_mos_occ_beta = 0, &
197 : corr_mos_virt_beta = 0, &
198 : num_poles = 0, &
199 : nparam_pade = 0, &
200 : analytic_continuation = gw_pade_approx
201 : REAL(KIND=dp) :: omega_max_fit = 0.0_dp
202 : INTEGER :: crossing_search = ri_rpa_g0w0_crossing_z_shot
203 : REAL(KIND=dp) :: fermi_level_offset = 0.0_dp
204 : INTEGER :: iter_evGW = 0, &
205 : iter_sc_GW0 = 0
206 : REAL(KIND=dp) :: eps_iter = 0.0_dp
207 : LOGICAL :: do_hedin_shift = .FALSE., &
208 : do_ri_Sigma_x = .FALSE., &
209 : do_periodic = .FALSE., &
210 : print_self_energy = .FALSE.
211 : REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :, :) :: vec_Sigma_x_minus_vxc_gw
212 : INTEGER, DIMENSION(:), POINTER :: kp_grid => NULL(), &
213 : kp_grid_Sigma => NULL()
214 : INTEGER :: num_kp_grids = 0
215 : REAL(KIND=dp) :: eps_kpoint = 0.0_dp
216 : LOGICAL :: do_mo_coeff_gamma = .FALSE., &
217 : do_average_deg_levels = .FALSE.
218 : REAL(KIND=dp) :: eps_eigenval = 0.0_dp
219 : LOGICAL :: do_extra_kpoints = .FALSE., &
220 : do_aux_bas_gw = .FALSE.
221 : REAL(KIND=dp) :: frac_aux_mos = 0.0_dp
222 : INTEGER :: num_omega_points = 0
223 : INTEGER :: bse_spin_config = 0, &
224 : bse_diag_method = 0, &
225 : flag_tda = 0, &
226 : num_exc_en = 0, &
227 : num_print_exc = 0, &
228 : num_add_start_z_space = 0, &
229 : fac_max_z_space = 0, &
230 : num_new_t = 0, &
231 : num_davidson_iter = 0, &
232 : davidson_abort_cond = 0
233 : REAL(KIND=dp) :: eps_res = 0.0_dp, &
234 : eps_exc_en = 0.0_dp, &
235 : eps_x = 0.0_dp, &
236 : bse_cutoff_occ = 0.0_dp, &
237 : bse_cutoff_empty = 0.0_dp, &
238 : z_space_energy_cutoff = 0.0_dp
239 : LOGICAL :: do_bse = .FALSE., &
240 : bse_debug_print = .FALSE., &
241 : do_ic_model = .FALSE., &
242 : print_ic_values = .FALSE.
243 : REAL(KIND=dp) :: eps_dist = 0.0_dp
244 : TYPE(one_dim_real_array), DIMENSION(2) :: ic_corr_list = one_dim_real_array(NULL())
245 : INTEGER :: print_exx = 0
246 : LOGICAL :: do_gamma_only_sigma = .FALSE.
247 : LOGICAL :: update_xc_energy = .FALSE., &
248 : do_kpoints_Sigma = .FALSE., &
249 : print_local_bandgap = .FALSE.
250 : INTEGER :: n_kp_in_kp_line = 0, &
251 : n_special_kp = 0, &
252 : nkp_self_energy = 0, &
253 : nkp_self_energy_special_kp = 0, &
254 : nkp_self_energy_monkh_pack = 0, &
255 : soc_type = soc_none
256 : REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: xkp_special_kp
257 : TYPE(dbcsr_p_type), DIMENSION(:), ALLOCATABLE :: matrix_sigma_x_minus_vxc, &
258 : matrix_ks
259 : REAL(KIND=dp) :: broadening_print_loc_bandgap = 0.0_dp, &
260 : energy_window_print_loc_bandgap = 0.0_dp, &
261 : ldos_thresh_print_loc_bandgap = 0.0_dp, &
262 : energy_spacing_print_loc_bandgap = 0.0_dp, &
263 : regularization_minimax = 0.0_dp, &
264 : soc_energy_window = 0.0_dp
265 : INTEGER, DIMENSION(:), POINTER :: stride_loc_bandgap => NULL()
266 :
267 : !BSE optical spectrum
268 : REAL(KIND=dp) :: bse_spectrum_freq_step_size = 0.0_dp, &
269 : bse_spectrum_freq_start = 0.0_dp, &
270 : bse_spectrum_freq_end = 0.0_dp
271 : LOGICAL :: bse_print_spectrum = .FALSE.
272 : REAL(KIND=dp), DIMENSION(:), POINTER :: bse_eta_spectrum_list => NULL()
273 :
274 : !GW_DOS
275 : REAL(KIND=dp) :: dos_upper = 0.0_dp, &
276 : dos_lower = 0.0_dp, &
277 : dos_prec = 0.0_dp, &
278 : dos_eta = 0.0_dp
279 : INTEGER :: max_level_self_energy = 0, &
280 : min_level_self_energy = 0, &
281 : dos_min = 0, &
282 : dos_max = 0
283 : END TYPE ri_g0w0_type
284 :
285 : TYPE ri_basis_opt
286 : REAL(KIND=dp) :: DI_rel = 0.0_dp, &
287 : DRI = 0.0_dp, &
288 : eps_step = 0.0_dp
289 : INTEGER :: max_num_iter = 0, &
290 : basis_quality = 0
291 : INTEGER, DIMENSION(:), ALLOCATABLE :: RI_nset_per_l
292 : END TYPE ri_basis_opt
293 :
294 : TYPE grad_util
295 : TYPE(two_dim_real_array), DIMENSION(2) :: P_ij = two_dim_real_array(NULL()), &
296 : P_ab = two_dim_real_array(NULL())
297 : TYPE(three_dim_real_array), DIMENSION(2) :: Gamma_P_ia = three_dim_real_array(NULL())
298 : REAL(KIND=dp), DIMENSION(:, :), ALLOCATABLE :: operator_half, &
299 : PQ_half, &
300 : Gamma_PQ, &
301 : Gamma_PQ_2
302 : TYPE(dbcsr_p_type), DIMENSION(:, :), ALLOCATABLE :: G_P_ia
303 : TYPE(dbcsr_p_type), DIMENSION(:), ALLOCATABLE :: mo_coeff_o, &
304 : mo_coeff_v
305 : TYPE(cp_fm_type), ALLOCATABLE, DIMENSION(:) :: P_mo, W_mo, L_jb
306 : REAL(KIND=dp) :: cphf_eps_conv = 0.0_dp, &
307 : scale_step_size = 0.0_dp
308 : INTEGER :: cphf_max_num_iter = 0, &
309 : z_solver_method = 0, &
310 : cphf_restart = 0
311 : LOGICAL :: enforce_decrease = .FALSE., &
312 : recalc_residual = .FALSE., &
313 : polak_ribiere = .FALSE.
314 : TYPE(qs_p_env_type), POINTER :: p_env => NULL()
315 : TYPE(qs_force_type), DIMENSION(:), POINTER :: mp2_force => NULL()
316 : REAL(KIND=dp), DIMENSION(3, 3) :: mp2_virial = 0.0_dp
317 : REAL(dp) :: eps_canonical = 0.0_dp
318 : LOGICAL :: free_hfx_buffer = .FALSE.
319 : INTEGER :: dot_blksize = 0
320 : INTEGER :: max_parallel_comm = 0
321 : END TYPE grad_util
322 :
323 : TYPE mp2_type
324 : INTEGER :: method = mp2_method_none
325 : TYPE(mp2_laplace_type) :: ri_laplace = mp2_laplace_type()
326 : TYPE(mp2_direct_type) :: direct_canonical = mp2_direct_type()
327 : TYPE(libint_potential_type) :: potential_parameter = libint_potential_type()
328 : TYPE(mp2_gpw_type) :: mp2_gpw = mp2_gpw_type()
329 : TYPE(ri_mp2_type) :: ri_mp2 = ri_mp2_type()
330 : TYPE(ri_rpa_type) :: ri_rpa = ri_rpa_type()
331 : ! There is a bug with some older compilers preventing requiring an explicit initialization of allocatable components
332 : #if __GNUC__ < 9 || (__GNUC__ == 9 && __GNUC_MINOR__ < 5)
333 : TYPE(ri_rpa_im_time_type) :: ri_rpa_im_time = ri_rpa_im_time_type(Eigenval_Gamma=NULL(), &
334 : wkp_V=NULL(), &
335 : starts_array_mc_RI=NULL(), &
336 : ends_array_mc_RI=NULL(), &
337 : starts_array_mc_block_RI=NULL(), &
338 : ends_array_mc_block_RI=NULL(), &
339 : starts_array_mc=NULL(), ends_array_mc=NULL(), &
340 : starts_array_mc_block=NULL(), &
341 : ends_array_mc_block=NULL())
342 : TYPE(ri_g0w0_type) :: ri_g0w0 = ri_g0w0_type(vec_Sigma_x_minus_vxc_gw=NULL(), &
343 : xkp_special_kp=NULL(), &
344 : matrix_sigma_x_minus_vxc=NULL(), &
345 : matrix_ks=NULL())
346 : TYPE(ri_basis_opt) :: ri_opt_param = ri_basis_opt(RI_nset_per_l=NULL())
347 : TYPE(grad_util) :: ri_grad = grad_util(operator_half=NULL(), &
348 : PQ_half=NULL(), &
349 : Gamma_PQ=NULL(), &
350 : Gamma_PQ_2=NULL(), &
351 : G_P_ia=NULL(), &
352 : mo_coeff_o=NULL(), &
353 : mo_coeff_v=NULL(), &
354 : P_mo=NULL(), W_mo=NULL(), L_jb=NULL())
355 : #else
356 : TYPE(ri_rpa_im_time_type) :: ri_rpa_im_time = ri_rpa_im_time_type()
357 : TYPE(ri_g0w0_type) :: ri_g0w0 = ri_g0w0_type()
358 : TYPE(ri_basis_opt) :: ri_opt_param = ri_basis_opt()
359 : TYPE(grad_util) :: ri_grad = grad_util()
360 : #endif
361 : REAL(KIND=dp) :: mp2_memory = 0.0_dp, &
362 : scale_S = 0.0_dp, &
363 : scale_T = 0.0_dp
364 : INTEGER :: mp2_num_proc = 0
365 : INTEGER :: block_size_row = 0
366 : INTEGER :: block_size_col = 0
367 : LOGICAL :: calc_PQ_cond_num = .FALSE.
368 : LOGICAL :: hf_fail = .FALSE.
369 : LOGICAL :: p_screen = .FALSE.
370 : LOGICAL :: not_last_hfx = .FALSE.
371 : LOGICAL :: do_im_time = .FALSE.
372 : INTEGER :: eri_method = eri_default
373 : TYPE(cp_eri_mme_param), POINTER :: eri_mme_param => NULL()
374 : INTEGER, DIMENSION(:), POINTER :: eri_blksize => NULL()
375 : LOGICAL :: do_svd = .FALSE.
376 : REAL(KIND=dp) :: eps_range = 0.0_dp
377 : TYPE(libint_potential_type) :: ri_metric = libint_potential_type()
378 : TYPE(local_gemm_ctxt_type) :: local_gemm_ctx = local_gemm_ctxt_type()
379 : REAL(dp) :: e_gap = 0.0_dp, &
380 : e_range = 0.0_dp
381 : END TYPE mp2_type
382 :
383 : TYPE integ_mat_buffer_type
384 : REAL(KIND=dp), DIMENSION(:), ALLOCATABLE :: msg
385 : INTEGER, DIMENSION(:), ALLOCATABLE :: sizes
386 : INTEGER, DIMENSION(:, :), ALLOCATABLE :: indx
387 : INTEGER :: proc = -1
388 : TYPE(mp_request_type) :: msg_req = mp_request_type()
389 : END TYPE integ_mat_buffer_type
390 :
391 : TYPE integ_mat_buffer_type_2D
392 : REAL(KIND=dp), DIMENSION(:, :), ALLOCATABLE :: msg
393 : INTEGER :: proc = -1
394 : TYPE(mp_request_type) :: msg_req = mp_request_type()
395 : END TYPE integ_mat_buffer_type_2D
396 :
397 : TYPE pair_list_type_mp2
398 : TYPE(pair_list_element_type), DIMENSION(:), &
399 : ALLOCATABLE :: elements
400 : INTEGER :: n_element = 0
401 : END TYPE pair_list_type_mp2
402 :
403 : CONTAINS
404 :
405 : ! **************************************************************************************************
406 : !> \brief ...
407 : !> \param mp2_env ...
408 : ! **************************************************************************************************
409 438 : SUBROUTINE mp2_env_release(mp2_env)
410 : TYPE(mp2_type) :: mp2_env
411 :
412 : CHARACTER(LEN=*), PARAMETER :: routineN = 'mp2_env_release'
413 :
414 : INTEGER :: handle
415 :
416 438 : CALL timeset(routineN, handle)
417 :
418 : ! release the HFX section for the EXX calculation
419 438 : IF (.NOT. mp2_env%ri_rpa%reuse_hfx) THEN
420 420 : IF (ASSOCIATED(mp2_env%ri_rpa%x_data)) CALL hfx_release(mp2_env%ri_rpa%x_data)
421 : END IF
422 438 : IF (ASSOCIATED(mp2_env%ri_rpa%xc_section_aux)) CALL section_vals_release(mp2_env%ri_rpa%xc_section_aux)
423 438 : IF (ASSOCIATED(mp2_env%ri_rpa%xc_section_primary)) CALL section_vals_release(mp2_env%ri_rpa%xc_section_primary)
424 :
425 438 : IF (mp2_env%eri_method .EQ. do_eri_mme) CALL cp_eri_mme_finalize(mp2_env%eri_mme_param)
426 438 : IF (ASSOCIATED(mp2_env%eri_mme_param)) DEALLOCATE (mp2_env%eri_mme_param)
427 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%tau_tj)) DEALLOCATE (mp2_env%ri_rpa_im_time%tau_tj)
428 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%tau_wj)) DEALLOCATE (mp2_env%ri_rpa_im_time%tau_wj)
429 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%tj)) DEALLOCATE (mp2_env%ri_rpa_im_time%tj)
430 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%wj)) DEALLOCATE (mp2_env%ri_rpa_im_time%wj)
431 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%weights_cos_tf_t_to_w)) DEALLOCATE (mp2_env%ri_rpa_im_time%weights_cos_tf_t_to_w)
432 438 : IF (ASSOCIATED(mp2_env%ri_rpa_im_time%weights_cos_tf_w_to_t)) DEALLOCATE (mp2_env%ri_rpa_im_time%weights_cos_tf_w_to_t)
433 :
434 438 : CALL mp2_env%local_gemm_ctx%destroy()
435 :
436 438 : CALL timestop(handle)
437 :
438 438 : END SUBROUTINE mp2_env_release
439 :
440 : ! **************************************************************************************************
441 : !> \brief ...
442 : !> \param mp2_env ...
443 : ! **************************************************************************************************
444 438 : SUBROUTINE mp2_env_create(mp2_env)
445 : TYPE(mp2_type), POINTER :: mp2_env
446 :
447 : CHARACTER(LEN=*), PARAMETER :: routineN = 'mp2_env_create'
448 :
449 : INTEGER :: handle
450 :
451 438 : CALL timeset(routineN, handle)
452 :
453 438 : CPASSERT(.NOT. ASSOCIATED(mp2_env))
454 :
455 10512 : ALLOCATE (mp2_env)
456 :
457 438 : NULLIFY (mp2_env%ri_rpa%x_data)
458 :
459 438 : CALL timestop(handle)
460 :
461 438 : END SUBROUTINE mp2_env_create
462 :
463 0 : END MODULE mp2_types
|