(git:e7e05ae)
qs_energy_init.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 ! **************************************************************************************************
9 !> \brief Utility subroutine for qs energy calculation
10 !> \par History
11 !> 11.2016 split out from qs_energy_utils
12 !> \author MK (29.10.2002)
13 ! **************************************************************************************************
15  USE cp_control_types, ONLY: dft_control_type
17  USE dbcsr_api, ONLY: dbcsr_copy,&
18  dbcsr_p_type,&
19  dbcsr_set,&
20  dbcsr_type
22  USE input_constants, ONLY: kg_tnadd_atomic,&
26  USE input_section_types, ONLY: section_vals_type
29  USE kg_environment_types, ONLY: kg_environment_type
30  USE kinds, ONLY: dp
32  USE kpoint_types, ONLY: kpoint_type,&
36  USE lri_environment_types, ONLY: lri_environment_type
37  USE message_passing, ONLY: mp_para_env_type
38  USE molecule_types, ONLY: molecule_of_atom,&
39  molecule_type
47  USE qs_dispersion_types, ONLY: qs_dispersion_type
48  USE qs_energy_types, ONLY: qs_energy_type
49  USE qs_environment_types, ONLY: get_qs_env,&
50  qs_environment_type
55  USE qs_gcp_types, ONLY: qs_gcp_type
57  USE qs_ks_types, ONLY: get_ks_env,&
58  qs_ks_env_type,&
60  USE qs_neighbor_list_types, ONLY: neighbor_list_set_p_type
67 #include "./base/base_uses.f90"
68 
69  IMPLICIT NONE
70 
71  PRIVATE
72 
73 ! *** Global parameters ***
74 
75  CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_energy_init'
76 
77  PUBLIC :: qs_energies_init
78 
79 CONTAINS
80 
81 ! **************************************************************************************************
82 !> \brief Refactoring of qs_energies_scf. Driver routine for the initial
83 !> setup and calculations for a qs energy calculation
84 !> \param qs_env ...
85 !> \param calc_forces ...
86 !> \par History
87 !> 05.2013 created [Florian Schiffmann]
88 ! **************************************************************************************************
89 
90  SUBROUTINE qs_energies_init(qs_env, calc_forces)
91  TYPE(qs_environment_type), POINTER :: qs_env
92  LOGICAL, INTENT(IN) :: calc_forces
93 
94  INTEGER :: img, ispin, nimg, nspin
95  LOGICAL :: has_unit_metric, ks_is_complex, &
96  molecule_only
97  TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_s, matrix_w
98  TYPE(dbcsr_type), POINTER :: matrix
99  TYPE(dft_control_type), POINTER :: dft_control
100  TYPE(qs_ks_env_type), POINTER :: ks_env
101 
102  NULLIFY (ks_env, matrix_w, matrix_s, dft_control)
103 
104  CALL get_qs_env(qs_env, dft_control=dft_control, ks_env=ks_env)
105  IF (dft_control%qs_control%do_kg) THEN
106  molecule_only = .true.
107  CALL qs_energies_init_kg(qs_env)
108  ELSE
109  molecule_only = .false.
110  END IF
111  CALL qs_energies_init_hamiltonians(qs_env, calc_forces, molecule_only)
112  CALL get_ks_env(ks_env, complex_ks=ks_is_complex)
113  CALL qs_ks_allocate_basics(qs_env, is_complex=ks_is_complex)
114 
115  ! if need forces allocate energy weighted density matrices
116  CALL get_qs_env(qs_env, has_unit_metric=has_unit_metric)
117  IF (calc_forces .AND. .NOT. has_unit_metric) THEN
118  CALL get_qs_env(qs_env, &
119  ks_env=ks_env, &
120  matrix_s_kp=matrix_s)
121  nspin = dft_control%nspins
122  nimg = dft_control%nimages
123  matrix => matrix_s(1, 1)%matrix
124  CALL dbcsr_allocate_matrix_set(matrix_w, nspin, nimg)
125  DO ispin = 1, nspin
126  DO img = 1, nimg
127  ALLOCATE (matrix_w(ispin, img)%matrix)
128  CALL dbcsr_copy(matrix_w(ispin, img)%matrix, matrix, name="W MATRIX")
129  CALL dbcsr_set(matrix_w(ispin, img)%matrix, 0.0_dp)
130  END DO
131  END DO
132  CALL set_ks_env(ks_env, matrix_w_kp=matrix_w)
133  END IF
134 
135  END SUBROUTINE qs_energies_init
136 
137 ! **************************************************************************************************
138 !> \brief Refactoring of qs_energies_scf. Puts initialization of the Kim-Gordon
139 !> settings into separate subroutine
140 !> \param qs_env ...
141 !> \par History
142 !> 05.2013 created [Florian Schiffmann]
143 ! **************************************************************************************************
144 
145  SUBROUTINE qs_energies_init_kg(qs_env)
146  TYPE(qs_environment_type), POINTER :: qs_env
147 
148  CHARACTER(len=*), PARAMETER :: routinen = 'qs_energies_init_kg'
149 
150  INTEGER :: handle, isubset, natom
151  TYPE(dft_control_type), POINTER :: dft_control
152  TYPE(kg_environment_type), POINTER :: kg_env
153  TYPE(molecule_type), DIMENSION(:), POINTER :: molecule_set
154  TYPE(mp_para_env_type), POINTER :: para_env
155  TYPE(neighbor_list_set_p_type), DIMENSION(:), &
156  POINTER :: soo_list, soo_list1
157 
158  CALL timeset(routinen, handle)
159 
160  CALL get_qs_env(qs_env, dft_control=dft_control, para_env=para_env)
161  cpassert(dft_control%qs_control%do_kg)
162 
163  kg_env => qs_env%kg_env
164 
165  ! get the set of molecules
166  CALL get_qs_env(qs_env=qs_env, molecule_set=molecule_set, natom=natom)
167  kg_env%natom = natom
168  ! store set of molecules in kg_env
169  kg_env%molecule_set => molecule_set
170  ! build the (new) full neighborlist
171  CALL kg_build_neighborlist(qs_env, sab_orb=kg_env%sab_orb_full)
172 
173  IF (.NOT. ALLOCATED(kg_env%atom_to_molecule)) THEN
174  ALLOCATE (kg_env%atom_to_molecule(natom))
175  ! get the mapping from atoms to molecules
176  CALL molecule_of_atom(molecule_set, atom_to_mol=kg_env%atom_to_molecule)
177  END IF
178 
179  SELECT CASE (kg_env%tnadd_method)
180  CASE (kg_tnadd_embed)
181  ! allocate the subset list
182  IF (.NOT. ASSOCIATED(kg_env%subset_of_mol)) THEN
183  ALLOCATE (kg_env%subset_of_mol(SIZE(molecule_set)))
184  END IF
185  !
186  CALL kg_build_subsets(kg_env, para_env)
187  !
188  DO isubset = 1, kg_env%nsubsets
189  ! build the (new) molecular neighborlist of the current subset
190  CALL kg_build_neighborlist(qs_env, sab_orb=kg_env%subset(isubset)%sab_orb, molecular=.true., &
191  subset_of_mol=kg_env%subset_of_mol, current_subset=isubset)
192  END DO
193  CASE (kg_tnadd_embed_ri)
194 !deb should be deleted as soon as atomic grids work
195  ! allocate the subset list
196  IF (.NOT. ASSOCIATED(kg_env%subset_of_mol)) THEN
197  ALLOCATE (kg_env%subset_of_mol(SIZE(molecule_set)))
198  END IF
199  !
200  CALL kg_build_subsets(kg_env, para_env)
201  !
202  DO isubset = 1, kg_env%nsubsets
203  ! build the (new) molecular neighborlist of the current subset
204  CALL kg_build_neighborlist(qs_env, sab_orb=kg_env%subset(isubset)%sab_orb, molecular=.true., &
205  subset_of_mol=kg_env%subset_of_mol, current_subset=isubset)
206  END DO
207 !deb
208  ! LRI neighborlist
209  NULLIFY (soo_list)
210  CALL kg_build_neighborlist(qs_env, sab_orb=soo_list, molecular=.true.)
211  kg_env%lri_env%soo_list => soo_list
212  CALL calculate_lri_integrals(kg_env%lri_env, qs_env)
213  IF (qs_env%energy_correction) THEN
214  NULLIFY (soo_list1)
215  CALL kg_build_neighborlist(qs_env, sab_orb=soo_list1, molecular=.true.)
216  kg_env%lri_env1%soo_list => soo_list1
217  CALL calculate_lri_integrals(kg_env%lri_env1, qs_env)
218  END IF
219 
220  ! Atomic grids
221  CASE (kg_tnadd_atomic)
222  ! build the A-C list for the nonadditive kinetic energy potential
223  CALL kg_build_neighborlist(qs_env, sac_kin=kg_env%sac_kin)
224  CASE (kg_tnadd_none)
225  ! nothing to do
226  CASE DEFAULT
227  cpabort("KG:TNADD METHOD")
228  END SELECT
229 
230  CALL timestop(handle)
231 
232  END SUBROUTINE qs_energies_init_kg
233 
234 ! **************************************************************************************************
235 !> \brief Refactoring of qs_energies_scf. Moves computation of the different
236 !> core hamiltonians into separate subroutine
237 !> \param qs_env QS environment
238 !> \param calc_forces Calculate forces
239 !> \param molecule_only restrict neighbor list to molecules
240 !> \par History
241 !> 05.2013 created [Florian Schiffmann]
242 !> 08.2014 Kpoints [JGH]
243 ! **************************************************************************************************
244 
245  SUBROUTINE qs_energies_init_hamiltonians(qs_env, calc_forces, molecule_only)
246  TYPE(qs_environment_type), POINTER :: qs_env
247  LOGICAL, INTENT(IN) :: calc_forces
248  LOGICAL :: molecule_only
249 
250  CHARACTER(len=*), PARAMETER :: routinen = 'qs_energies_init_hamiltonians'
251 
252  INTEGER :: handle
253  LOGICAL :: do_kpoints
254  TYPE(dft_control_type), POINTER :: dft_control
255  TYPE(kpoint_type), POINTER :: kpoints
256  TYPE(lri_environment_type), POINTER :: lri_env
257  TYPE(mp_para_env_type), POINTER :: para_env
258  TYPE(neighbor_list_set_p_type), DIMENSION(:), &
259  POINTER :: sab_nl, sab_nl_nosym
260  TYPE(qs_dispersion_type), POINTER :: dispersion_env
261  TYPE(qs_energy_type), POINTER :: energy
262  TYPE(qs_gcp_type), POINTER :: gcp_env
263  TYPE(section_vals_type), POINTER :: input
264 
265  CALL timeset(routinen, handle)
266 
267  CALL get_qs_env(qs_env, &
268  input=input, &
269  dft_control=dft_control, &
270  para_env=para_env, &
271  kpoints=kpoints, &
272  do_kpoints=do_kpoints)
273 
274  ! create neighbor lists for standard use in QS
275  CALL build_qs_neighbor_lists(qs_env, para_env, molecular=molecule_only, &
276  force_env_section=input)
277 
278  ! calculate cell index for k-point calculations
279  IF (do_kpoints) THEN
280  CALL get_qs_env(qs_env, sab_kp=sab_nl, sab_kp_nosym=sab_nl_nosym)
281  CALL kpoint_init_cell_index(kpoints, sab_nl, para_env, dft_control)
282  CALL set_kpoint_info(kpoints, sab_nl_nosym=sab_nl_nosym)
283  END IF
284  IF (dft_control%qs_control%cdft) THEN
285  IF (.NOT. (dft_control%qs_control%cdft_control%external_control)) &
286  dft_control%qs_control%cdft_control%need_pot = .true.
287  IF (ASSOCIATED(dft_control%qs_control%cdft_control%group)) THEN
288  ! In case CDFT weight function was built beforehand (in mixed force_eval)
289  IF (ASSOCIATED(dft_control%qs_control%cdft_control%group(1)%weight)) &
290  dft_control%qs_control%cdft_control%need_pot = .false.
291  END IF
292  END IF
293 
294  ! Calculate the overlap and the core Hamiltonian integral matrix
295  IF (dft_control%qs_control%semi_empirical) THEN
296  CALL build_se_core_matrix(qs_env=qs_env, para_env=para_env, &
297  calculate_forces=.false.)
298  CALL qs_env_update_s_mstruct(qs_env)
299  CALL se_core_core_interaction(qs_env, para_env, calculate_forces=.false.)
300  CALL get_qs_env(qs_env=qs_env, dispersion_env=dispersion_env, energy=energy)
301  CALL calculate_dispersion_pairpot(qs_env, dispersion_env, energy%dispersion, calc_forces)
302  ELSEIF (dft_control%qs_control%dftb) THEN
303  CALL build_dftb_matrices(qs_env=qs_env, para_env=para_env, &
304  calculate_forces=.false.)
305  CALL calculate_dftb_dispersion(qs_env=qs_env, para_env=para_env, &
306  calculate_forces=.false.)
307  CALL qs_env_update_s_mstruct(qs_env)
308  ELSEIF (dft_control%qs_control%xtb) THEN
309  CALL build_xtb_matrices(qs_env=qs_env, para_env=para_env, &
310  calculate_forces=.false.)
311  CALL get_qs_env(qs_env=qs_env, dispersion_env=dispersion_env, energy=energy)
312  CALL calculate_dispersion_pairpot(qs_env, dispersion_env, energy%dispersion, calc_forces)
313  CALL qs_env_update_s_mstruct(qs_env)
314  ELSE
315  CALL build_core_hamiltonian_matrix(qs_env=qs_env, calculate_forces=.false.)
316  CALL qs_env_update_s_mstruct(qs_env)
317  CALL calculate_ecore_self(qs_env)
318  CALL calculate_ecore_efield(qs_env, calculate_forces=.false.)
319  CALL calculate_ecore_overlap(qs_env, para_env, calculate_forces=.false.)
320  !swap external_e_potential before external_c_potential, to ensure
321  !that external potential on grid is loaded before calculating energy of cores
322  CALL external_e_potential(qs_env)
323  IF (.NOT. dft_control%qs_control%gapw) THEN
324  CALL external_c_potential(qs_env, calculate_forces=.false.)
325  END IF
326  ! LRIGPW/RIGPW matrices
327  IF (dft_control%qs_control%lrigpw) THEN
328  CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
329  CALL build_lri_matrices(lri_env, qs_env)
330  ELSE IF (dft_control%qs_control%rigpw) THEN
331  CALL get_qs_env(qs_env=qs_env, lri_env=lri_env)
332  CALL build_ri_matrices(lri_env, qs_env, calculate_forces=.false.)
333  END IF
334 
335  ! ZMP addition to read external density
336  CALL external_read_density(qs_env)
337 
338  ! Add possible pair potential dispersion energy - Evaluate first so we can print
339  ! energy info at the end of the SCF
340  CALL get_qs_env(qs_env=qs_env, dispersion_env=dispersion_env, energy=energy)
341  CALL calculate_dispersion_pairpot(qs_env, dispersion_env, energy%dispersion, calc_forces)
342  ! Add possible pair potential gCP energy - Evaluate first so we can print
343  ! energy info at the end of the SCF
344  CALL get_qs_env(qs_env=qs_env, gcp_env=gcp_env, energy=energy)
345  IF (ASSOCIATED(gcp_env)) THEN
346  CALL calculate_gcp_pairpot(qs_env, gcp_env, energy%gcp, calc_forces)
347  END IF
348 
349  END IF
350  ! Embedding potential
351  IF (dft_control%qs_control%dfet_embedded) THEN
352  dft_control%apply_embed_pot = .true.
353  CALL given_embed_pot(qs_env)
354  END IF
355  ! Matrix embedding potential
356  IF (dft_control%qs_control%dmfet_embedded) THEN
357  dft_control%apply_dmfet_pot = .true.
358  END IF
359 
360  CALL timestop(handle)
361 
362  END SUBROUTINE qs_energies_init_hamiltonians
363 
364 END MODULE qs_energy_init
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
DBCSR operations in CP2K.
all routins needed for a nonperiodic electric field
Definition: efield_utils.F:12
subroutine, public calculate_ecore_efield(qs_env, calculate_forces)
Computes the force and the energy due to a efield on the cores Note: In the velocity gauge,...
Definition: efield_utils.F:186
collects all constants needed in input so that they can be used without circular dependencies
integer, parameter, public kg_tnadd_none
integer, parameter, public kg_tnadd_embed_ri
integer, parameter, public kg_tnadd_embed
integer, parameter, public kg_tnadd_atomic
objects that represent the structure of input sections and the data contained in an input section
Types needed for a Kim-Gordon-like partitioning into molecular subunits.
Routines for a Kim-Gordon-like partitioning into molecular subunits.
subroutine, public kg_build_neighborlist(qs_env, sab_orb, sac_kin, molecular, subset_of_mol, current_subset)
builds either the full neighborlist or neighborlists of molecular
subroutine, public kg_build_subsets(kg_env, para_env)
...
Defines the basic variable types.
Definition: kinds.F:23
integer, parameter, public dp
Definition: kinds.F:34
Routines needed for kpoint calculation.
subroutine, public kpoint_init_cell_index(kpoint, sab_nl, para_env, dft_control)
Generates the mapping of cell indices and linear RS index CELL (0,0,0) is always mapped to index 1.
Types and basic routines needed for a kpoint calculation.
Definition: kpoint_types.F:15
subroutine, public set_kpoint_info(kpoint, kp_scheme, nkp_grid, kp_shift, symmetry, verbose, full_grid, use_real_wfn, eps_geo, parallel_group_size, kp_range, nkp, xkp, wkp, para_env, blacs_env_all, para_env_kp, para_env_inter_kp, blacs_env, kp_env, kp_aux_env, mpools, iogrp, nkp_groups, kp_dist, cell_to_index, index_to_cell, sab_nl, sab_nl_nosym)
Set information in a kpoint environment.
Definition: kpoint_types.F:434
Calculates integral matrices for LRIGPW method lri : local resolution of the identity.
subroutine, public calculate_lri_integrals(lri_env, qs_env)
calculates integrals needed for the LRI density fitting, integrals are calculated once,...
subroutine, public build_lri_matrices(lri_env, qs_env)
creates and initializes an lri_env
contains the types and subroutines for dealing with the lri_env lri : local resolution of the identit...
Interface to the message passing library MPI.
Define the data structure for the molecule information.
subroutine, public molecule_of_atom(molecule_set, atom_to_mol)
finds for each atom the molecule it belongs to
subroutine, public given_embed_pot(qs_env)
Read the external embedding potential, not to be optimized.
Calculation of the energies concerning the core charge distribution.
subroutine, public calculate_ecore_self(qs_env, E_self_core, atecc)
Calculate the self energy of the core charge distribution.
subroutine, public calculate_ecore_overlap(qs_env, para_env, calculate_forces, molecular, E_overlap_core, atecc)
Calculate the overlap energy of the core charge distribution.
Calculation of the core Hamiltonian integral matrix <a|H|b> over Cartesian Gaussian-type functions.
subroutine, public build_core_hamiltonian_matrix(qs_env, calculate_forces)
Cosntruction of the QS Core Hamiltonian Matrix.
Calculation of dispersion in DFTB.
subroutine, public calculate_dftb_dispersion(qs_env, para_env, calculate_forces)
...
Calculation of Overlap and Hamiltonian matrices in DFTB.
subroutine, public build_dftb_matrices(qs_env, para_env, calculate_forces)
...
Calculation of dispersion using pair potentials.
subroutine, public calculate_dispersion_pairpot(qs_env, dispersion_env, energy, calculate_forces, atevdw)
...
Definition of disperson types for DFT calculations.
Utility subroutine for qs energy calculation.
subroutine, public qs_energies_init(qs_env, calc_forces)
Refactoring of qs_energies_scf. Driver routine for the initial setup and calculations for a qs energy...
subroutine, public get_qs_env(qs_env, atomic_kind_set, qs_kind_set, cell, super_cell, cell_ref, use_ref_cell, kpoints, dft_control, mos, sab_orb, sab_all, qmmm, qmmm_periodic, sac_ae, sac_ppl, sac_lri, sap_ppnl, sab_vdw, sab_scp, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_almo, sab_kp, sab_kp_nosym, particle_set, energy, force, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, run_rtp, rtp, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_ks_im_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_RI_aux_kp, matrix_s, matrix_s_RI_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, rho, rho_xc, pw_env, ewald_env, ewald_pw, active_space, mpools, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, local_particles, local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, local_rho_set, rho_atom_set, task_list, task_list_soft, rho0_atom_set, rho0_mpole, rhoz_set, ecoul_1c, rho0_s_rs, rho0_s_gs, do_kpoints, has_unit_metric, requires_mo_derivs, mo_derivs, mo_loc_history, nkind, natom, nelectron_total, nelectron_spin, efield, neighbor_list_id, linres_control, xas_env, virial, cp_ddapc_env, cp_ddapc_ewald, outer_scf_history, outer_scf_ihistory, x_data, et_coupling, dftb_potential, results, se_taper, se_store_int_env, se_nddo_mpole, se_nonbond_env, admm_env, lri_env, lri_density, exstate_env, ec_env, dispersion_env, gcp_env, vee, rho_external, external_vxc, mask, mp2_env, bs_env, kg_env, WannierCentres, atprop, ls_scf_env, do_transport, transport_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, mscfg_env, almo_scf_env, gradient_history, variable_history, embed_pot, spin_embed_pot, polar_env, mos_last_converged, rhs)
Get the QUICKSTEP environment.
Routines to handle an external density The external density can be generic and is provided by user in...
subroutine, public external_read_density(qs_env)
Computes the external density on the grid.
Routines to handle an external electrostatic field The external field can be generic and is provided ...
subroutine, public external_c_potential(qs_env, calculate_forces)
Computes the force and the energy due to the external potential on the cores.
subroutine, public external_e_potential(qs_env)
Computes the external potential on the grid.
Calculation of gCP pair potentials.
Definition: qs_gcp_method.F:12
subroutine, public calculate_gcp_pairpot(qs_env, gcp_env, energy, calculate_forces, ategcp)
...
Definition: qs_gcp_method.F:63
Definition of gCP types for DFT calculations.
Definition: qs_gcp_types.F:12
routines that build the Kohn-Sham matrix (i.e calculate the coulomb and xc parts
Definition: qs_ks_methods.F:22
subroutine, public qs_ks_allocate_basics(qs_env, is_complex)
Allocate ks_matrix if necessary, take current overlap matrix as template.
subroutine, public get_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_RI_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_RI_aux_kp, matrix_ks_im_kp, rho, rho_xc, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, task_list, task_list_soft, kpoints, do_kpoints, atomic_kind_set, qs_kind_set, cell, cell_ref, use_ref_cell, particle_set, energy, force, local_particles, local_molecules, molecule_kind_set, molecule_set, subsys, cp_subsys, virial, results, atprop, nkind, natom, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env, nelectron_total, nelectron_spin)
...
Definition: qs_ks_types.F:330
subroutine, public set_ks_env(ks_env, v_hartree_rspace, s_mstruct_changed, rho_changed, potential_changed, forces_up_to_date, complex_ks, matrix_h, matrix_h_im, matrix_ks, matrix_ks_im, matrix_vxc, kinetic, matrix_s, matrix_s_RI_aux, matrix_w, matrix_p_mp2, matrix_p_mp2_admm, matrix_h_kp, matrix_h_im_kp, matrix_ks_kp, matrix_vxc_kp, kinetic_kp, matrix_s_kp, matrix_w_kp, matrix_s_RI_aux_kp, matrix_ks_im_kp, vppl, rho_core, rho_nlcc, rho_nlcc_g, vee, neighbor_list_id, kpoints, sab_orb, sab_all, sac_ae, sac_ppl, sac_lri, sap_ppnl, sap_oce, sab_lrc, sab_se, sab_xtbe, sab_tbe, sab_core, sab_xb, sab_xtb_nonbond, sab_vdw, sab_scp, sab_almo, sab_kp, sab_kp_nosym, task_list, task_list_soft, subsys, dft_control, dbcsr_dist, distribution_2d, pw_env, para_env, blacs_env)
...
Definition: qs_ks_types.F:567
Define the neighbor list data types and the corresponding functionality.
Generate the atomic neighbor lists.
subroutine, public build_qs_neighbor_lists(qs_env, para_env, molecular, force_env_section)
Build all the required neighbor lists for Quickstep.
qs_environment methods that use many other modules
subroutine, public qs_env_update_s_mstruct(qs_env)
updates the s_mstruct to reflect the new overlap structure, and also updates rho_core distribution....
Calculates integral matrices for RIGPW method.
subroutine, public build_ri_matrices(lri_env, qs_env, calculate_forces)
creates and initializes an lri_env
Split and build its own idependent core_core SE interaction module.
Definition: se_core_core.F:14
subroutine, public se_core_core_interaction(qs_env, para_env, calculate_forces)
Evaluates the core-core interactions for NDDO methods.
Definition: se_core_core.F:79
Calculation of the Hamiltonian integral matrix <a|H|b> for semi-empirical methods.
subroutine, public build_se_core_matrix(qs_env, para_env, calculate_forces)
...
Calculation of Overlap and Hamiltonian matrices in xTB Reference: Stefan Grimme, Christoph Bannwarth,...
Definition: xtb_matrices.F:15
subroutine, public build_xtb_matrices(qs_env, para_env, calculate_forces)
...
Definition: xtb_matrices.F:134