(git:374b731)
Loading...
Searching...
No Matches
qs_basis_gradient.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 ...
10!> \author ...
11! *****************************************************************************
13
19 USE cp_fm_types, ONLY: cp_fm_type
22 USE dbcsr_api, ONLY: dbcsr_copy,&
23 dbcsr_p_type,&
24 dbcsr_set,&
25 dbcsr_type
27 USE kinds, ONLY: dp
40 USE qs_kind_types, ONLY: get_qs_kind,&
44 USE qs_ks_types, ONLY: get_ks_env,&
49 USE qs_mo_types, ONLY: get_mo_set,&
53 USE qs_rho_types, ONLY: qs_rho_get,&
60#include "./base/base_uses.f90"
61
62 IMPLICIT NONE
63
64 PRIVATE
65
66! *** Global parameters ***
67
68 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'qs_basis_gradient'
69
70! *** Public subroutines ***
71
74
75CONTAINS
76
77! *****************************************************************************
78! for development of floating basis functions
79! *****************************************************************************
80!> \brief ...
81!> \param qs_env ...
82! **************************************************************************************************
83 SUBROUTINE qs_basis_center_gradient(qs_env)
84
85 TYPE(qs_environment_type), POINTER :: qs_env
86
87 CHARACTER(len=*), PARAMETER :: routinen = 'qs_basis_center_gradient'
88
89 INTEGER :: handle, i, iatom, ikind, img, ispin, &
90 natom, nimg, nkind, nspin
91 INTEGER, ALLOCATABLE, DIMENSION(:) :: atom_of_kind, kind_of, natom_of_kind
92 LOGICAL :: floating, has_unit_metric
93 REAL(kind=dp), DIMENSION(:, :), POINTER :: gradient
94 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
95 TYPE(cp_logger_type), POINTER :: logger
96 TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_s, matrix_w_kp
97 TYPE(dbcsr_type), POINTER :: matrix
98 TYPE(dft_control_type), POINTER :: dft_control
99 TYPE(mp_para_env_type), POINTER :: para_env
100 TYPE(qs_force_type), DIMENSION(:), POINTER :: basis_force, force, qs_force
101 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
102 TYPE(qs_ks_env_type), POINTER :: ks_env
103 TYPE(qs_scf_env_type), POINTER :: scf_env
104 TYPE(qs_subsys_type), POINTER :: subsys
105
106 CALL timeset(routinen, handle)
107 NULLIFY (logger)
108 logger => cp_get_default_logger()
109
110 ! get the gradient array
111 CALL get_qs_env(qs_env, scf_env=scf_env, natom=natom)
112 IF (ASSOCIATED(scf_env%floating_basis%gradient)) THEN
113 gradient => scf_env%floating_basis%gradient
114 cpassert(SIZE(gradient) == 3*natom)
115 ELSE
116 ALLOCATE (gradient(3, natom))
117 scf_env%floating_basis%gradient => gradient
118 END IF
119 gradient = 0.0_dp
120
121 ! init the force environment
122 CALL get_qs_env(qs_env, force=force, subsys=subsys, atomic_kind_set=atomic_kind_set)
123 IF (ASSOCIATED(force)) THEN
124 qs_force => force
125 ELSE
126 NULLIFY (qs_force)
127 END IF
128 ! Allocate the force data structure
129 nkind = SIZE(atomic_kind_set)
130 ALLOCATE (natom_of_kind(nkind))
131 CALL get_atomic_kind_set(atomic_kind_set=atomic_kind_set, natom_of_kind=natom_of_kind)
132 CALL allocate_qs_force(basis_force, natom_of_kind)
133 DEALLOCATE (natom_of_kind)
134 CALL qs_subsys_set(subsys, force=basis_force)
135 CALL zero_qs_force(basis_force)
136
137 ! get atom mapping
138 ALLOCATE (atom_of_kind(natom), kind_of(natom))
139 CALL get_atomic_kind_set(atomic_kind_set=atomic_kind_set, atom_of_kind=atom_of_kind, kind_of=kind_of)
140
141 ! allocate energy weighted density matrices, if needed
142 CALL get_qs_env(qs_env, has_unit_metric=has_unit_metric)
143 IF (.NOT. has_unit_metric) THEN
144 CALL get_qs_env(qs_env, matrix_w_kp=matrix_w_kp)
145 IF (.NOT. ASSOCIATED(matrix_w_kp)) THEN
146 NULLIFY (matrix_w_kp)
147 CALL get_qs_env(qs_env, ks_env=ks_env, matrix_s_kp=matrix_s, dft_control=dft_control)
148 nspin = dft_control%nspins
149 nimg = dft_control%nimages
150 matrix => matrix_s(1, 1)%matrix
151 CALL dbcsr_allocate_matrix_set(matrix_w_kp, nspin, nimg)
152 DO ispin = 1, nspin
153 DO img = 1, nimg
154 ALLOCATE (matrix_w_kp(ispin, img)%matrix)
155 CALL dbcsr_copy(matrix_w_kp(ispin, img)%matrix, matrix, name="W MATRIX")
156 CALL dbcsr_set(matrix_w_kp(ispin, img)%matrix, 0.0_dp)
157 END DO
158 END DO
159 CALL set_ks_env(ks_env, matrix_w_kp=matrix_w_kp)
160 END IF
161 END IF
162 ! time to compute the w matrix
163 CALL qs_energies_compute_w(qs_env, .true.)
164
165 ! core hamiltonian forces
166 CALL build_core_hamiltonian_matrix(qs_env=qs_env, calculate_forces=.true.)
167 ! Compute grid-based forces
168 CALL qs_ks_update_qs_env(qs_env, calculate_forces=.true.)
169
170 ! replicate forces
171 CALL replicate_qs_force(basis_force, para_env)
172 CALL get_qs_env(qs_env, qs_kind_set=qs_kind_set)
173 DO iatom = 1, natom
174 ikind = kind_of(iatom)
175 i = atom_of_kind(iatom)
176 CALL get_qs_kind(qs_kind_set(ikind), floating=floating)
177 IF (floating) gradient(1:3, iatom) = -basis_force(ikind)%total(1:3, i)
178 END DO
179 ! clean up force environment and reinitialize qs_force
180 IF (ASSOCIATED(basis_force)) CALL deallocate_qs_force(basis_force)
181 CALL qs_subsys_set(subsys, force=qs_force)
182 CALL get_qs_env(qs_env, ks_env=ks_env)
183 CALL set_ks_env(ks_env, forces_up_to_date=.false.)
184
185 DEALLOCATE (atom_of_kind, kind_of)
186
187 CALL timestop(handle)
188
189 END SUBROUTINE qs_basis_center_gradient
190
191! *****************************************************************************
192!> \brief ... returns the norm of the gradient vector, taking only floating
193!> components into account
194!> \param qs_env ...
195!> \return ...
196! **************************************************************************************************
197 FUNCTION return_basis_center_gradient_norm(qs_env) RESULT(norm)
198
199 TYPE(qs_environment_type), POINTER :: qs_env
200 REAL(kind=dp) :: norm
201
202 INTEGER :: iatom, ikind, natom, nfloat
203 LOGICAL :: floating
204 REAL(kind=dp), DIMENSION(:, :), POINTER :: gradient
205 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
206 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
207 TYPE(qs_scf_env_type), POINTER :: scf_env
208
209 norm = 0.0_dp
210 CALL get_qs_env(qs_env, scf_env=scf_env, particle_set=particle_set, qs_kind_set=qs_kind_set)
211 gradient => scf_env%floating_basis%gradient
212 natom = SIZE(particle_set)
213 nfloat = 0
214 DO iatom = 1, natom
215 CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
216 CALL get_qs_kind(qs_kind_set(ikind), floating=floating)
217 IF (floating) THEN
218 nfloat = nfloat + 1
219 norm = norm + sum(abs(gradient(1:3, iatom)))
220 END IF
221 END DO
222 IF (nfloat > 0) THEN
223 norm = norm/(3.0_dp*real(nfloat, kind=dp))
224 END IF
225
227
228! *****************************************************************************
229!> \brief move atoms with kind float according to gradient
230!> \param qs_env ...
231! **************************************************************************************************
232 SUBROUTINE qs_update_basis_center_pos(qs_env)
233
234 TYPE(qs_environment_type), POINTER :: qs_env
235
236 CHARACTER(len=*), PARAMETER :: routinen = 'qs_update_basis_center_pos'
237
238 INTEGER :: handle, iatom, ikind, natom
239 LOGICAL :: floating
240 REAL(kind=dp) :: alpha
241 REAL(kind=dp), DIMENSION(:, :), POINTER :: gradient
242 TYPE(cp_logger_type), POINTER :: logger
243 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
244 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
245 TYPE(qs_scf_env_type), POINTER :: scf_env
246
247 CALL timeset(routinen, handle)
248 NULLIFY (logger)
249 logger => cp_get_default_logger()
250
251 ! update positions
252 CALL get_qs_env(qs_env, scf_env=scf_env, particle_set=particle_set, qs_kind_set=qs_kind_set)
253 gradient => scf_env%floating_basis%gradient
254 natom = SIZE(particle_set)
255 alpha = 0.50_dp
256 DO iatom = 1, natom
257 CALL get_atomic_kind(particle_set(iatom)%atomic_kind, kind_number=ikind)
258 CALL get_qs_kind(qs_kind_set(ikind), floating=floating)
259 IF (floating) THEN
260 particle_set(iatom)%r(1:3) = particle_set(iatom)%r(1:3) + alpha*gradient(1:3, iatom)
261 END IF
262 END DO
263
264 CALL qs_basis_reinit_energy(qs_env)
265
266 CALL timestop(handle)
267
268 END SUBROUTINE qs_update_basis_center_pos
269
270! *****************************************************************************
271!> \brief rebuilds the structures after a floating basis update
272!> \param qs_env ...
273!> \par History
274!> 05.2016 created [JGH]
275!> \author JGH
276! **************************************************************************************************
277 SUBROUTINE qs_basis_reinit_energy(qs_env)
278 TYPE(qs_environment_type), POINTER :: qs_env
279
280 CHARACTER(len=*), PARAMETER :: routinen = 'qs_basis_reinit_energy'
281
282 INTEGER :: handle, ispin, nmo
283 LOGICAL :: ks_is_complex
284 TYPE(cp_fm_type), POINTER :: mo_coeff
285 TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_s_kp, rho_ao_kp
286 TYPE(dft_control_type), POINTER :: dft_control
287 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
288 TYPE(mp_para_env_type), POINTER :: para_env
289 TYPE(qs_ks_env_type), POINTER :: ks_env
290 TYPE(qs_rho_type), POINTER :: rho
291 TYPE(qs_scf_env_type), POINTER :: scf_env
292 TYPE(section_vals_type), POINTER :: input
293
294 CALL timeset(routinen, handle)
295
296 NULLIFY (input, para_env, ks_env)
297 ! rebuild neighbor lists
298 CALL get_qs_env(qs_env, input=input, para_env=para_env, ks_env=ks_env)
299 CALL build_qs_neighbor_lists(qs_env, para_env, molecular=.false., &
300 force_env_section=input)
301 ! update core hamiltonian
302 CALL build_core_hamiltonian_matrix(qs_env=qs_env, calculate_forces=.false.)
303 ! update structures
304 CALL qs_env_update_s_mstruct(qs_env)
305 ! KS matrices
306 CALL get_ks_env(ks_env, complex_ks=ks_is_complex)
307 CALL qs_ks_allocate_basics(qs_env, is_complex=ks_is_complex)
308 ! reinit SCF task matrices
309 NULLIFY (scf_env)
310 CALL get_qs_env(qs_env, scf_env=scf_env, dft_control=dft_control)
311 IF (scf_env%mixing_method > 0) THEN
312 CALL mixing_allocate(qs_env, scf_env%mixing_method, scf_env%p_mix_new, &
313 scf_env%p_delta, dft_control%nspins, &
314 scf_env%mixing_store)
315 ELSE
316 NULLIFY (scf_env%p_mix_new)
317 END IF
318 CALL get_qs_env(qs_env, mos=mos, rho=rho, matrix_s_kp=matrix_s_kp)
319 CALL qs_rho_get(rho, rho_ao_kp=rho_ao_kp)
320 DO ispin = 1, SIZE(mos)
321 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, nmo=nmo)
322 ! reorthogonalize MOs
323 CALL make_basis_sm(mo_coeff, nmo, matrix_s_kp(1, 1)%matrix)
324 ! update density matrix
325 CALL calculate_density_matrix(mos(ispin), rho_ao_kp(ispin, 1)%matrix)
326 END DO
327 CALL qs_rho_set(rho, rho_r_valid=.false., drho_r_valid=.false., rho_g_valid=.false., &
328 drho_g_valid=.false., tau_r_valid=.false., tau_g_valid=.false.)
329 CALL qs_rho_update_rho(rho, qs_env)
330
331 CALL timestop(handle)
332
333 END SUBROUTINE qs_basis_reinit_energy
334
335END MODULE qs_basis_gradient
Define the atomic kind types and their sub types.
subroutine, public get_atomic_kind_set(atomic_kind_set, atom_of_kind, kind_of, natom_of_kind, maxatom, natom, nshell, fist_potential_present, shell_present, shell_adiabatic, shell_check_distance, damping_present)
Get attributes of an atomic kind set.
subroutine, public get_atomic_kind(atomic_kind, fist_potential, element_symbol, name, mass, kind_number, natom, atom_list, rcov, rvdw, z, qeff, apol, cpol, mm_radius, shell, shell_active, damping)
Get attributes of an atomic kind.
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
DBCSR operations in CP2K.
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
objects that represent the structure of input sections and the data contained in an input section
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
Define the data structure for the particle information.
subroutine, public qs_basis_center_gradient(qs_env)
...
real(kind=dp) function, public return_basis_center_gradient_norm(qs_env)
... returns the norm of the gradient vector, taking only floating components into account
subroutine, public qs_update_basis_center_pos(qs_env)
move atoms with kind float according to gradient
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.
collects routines that calculate density matrices
Utility subroutine for qs energy calculation.
subroutine, public qs_energies_compute_w(qs_env, calc_forces)
Refactoring of qs_energies_scf. Moves computation of matrix_w into separate subroutine.
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.
subroutine, public replicate_qs_force(qs_force, para_env)
Replicate and sum up the force.
subroutine, public deallocate_qs_force(qs_force)
Deallocate a Quickstep force data structure.
subroutine, public zero_qs_force(qs_force)
Initialize a Quickstep force data structure.
subroutine, public allocate_qs_force(qs_force, natom_of_kind)
Allocate a Quickstep force data structure.
Quickstep force driver routine.
Definition qs_force.F:12
Define the quickstep kind type and their sub types.
subroutine, public get_qs_kind(qs_kind, basis_set, basis_type, ncgf, nsgf, all_potential, tnadd_potential, gth_potential, sgp_potential, upf_potential, se_parameter, dftb_parameter, xtb_parameter, dftb3_param, zeff, elec_conf, mao, lmax_dftb, alpha_core_charge, ccore_charge, core_charge, core_charge_radius, paw_proj_set, paw_atom, hard_radius, hard0_radius, max_rad_local, covalent_radius, vdw_radius, gpw_r3d_rs_type_forced, harmonics, max_iso_not0, max_s_harm, grid_atom, ngrid_ang, ngrid_rad, lmax_rho0, dft_plus_u_atom, l_of_dft_plus_u, n_of_dft_plus_u, u_minus_j, u_of_dft_plus_u, j_of_dft_plus_u, alpha_of_dft_plus_u, beta_of_dft_plus_u, j0_of_dft_plus_u, occupation_of_dft_plus_u, dispersion, bs_occupation, magnetization, no_optimize, addel, laddel, naddel, orbitals, max_scf, eps_scf, smear, u_ramping, u_minus_j_target, eps_u_ramping, init_u_ramping_each_scf, reltmat, ghost, floating, name, element_symbol, pao_basis_size, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
routines that build the Kohn-Sham matrix (i.e calculate the coulomb and xc parts
subroutine, public qs_ks_update_qs_env(qs_env, calculate_forces, just_energy, print_active)
updates the Kohn Sham matrix of the given qs_env (facility method)
subroutine, public qs_ks_allocate_basics(qs_env, is_complex)
Allocate ks_matrix if necessary, take current overlap matrix as template.
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)
...
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)
...
subroutine, public mixing_allocate(qs_env, mixing_method, p_mix_new, p_delta, nspins, mixing_store)
allocation needed when density mixing is used
collects routines that perform operations directly related to MOs
subroutine, public make_basis_sm(vmatrix, ncol, matrix_s)
returns an S-orthonormal basis v (v^T S v ==1)
Definition and initialisation of the mo data type.
Definition qs_mo_types.F:22
subroutine, public get_mo_set(mo_set, maxocc, homo, lfomo, nao, nelectron, n_el_f, nmo, eigenvalues, occupation_numbers, mo_coeff, mo_coeff_b, uniform_occupation, kts, mu, flexible_electron_count)
Get the components of a MO set data structure.
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.
methods of the rho structure (defined in qs_rho_types)
subroutine, public qs_rho_update_rho(rho_struct, qs_env, rho_xc_external, local_rho_set, task_list_external, task_list_external_soft, pw_env_external, para_env_external)
updates rho_r and rho_g to the rhorho_ao. if use_kinetic_energy_density also computes tau_r and tau_g...
superstucture that hold various representations of the density and keeps track of which ones are vali...
subroutine, public qs_rho_set(rho_struct, rho_ao, rho_ao_im, rho_ao_kp, rho_ao_im_kp, rho_r, drho_r, rho_g, drho_g, tau_r, tau_g, rho_r_valid, drho_r_valid, rho_g_valid, drho_g_valid, tau_r_valid, tau_g_valid, tot_rho_r, tot_rho_g, rho_r_sccs, soft_valid, complex_rho_ao)
...
subroutine, public qs_rho_get(rho_struct, rho_ao, rho_ao_im, rho_ao_kp, rho_ao_im_kp, rho_r, drho_r, rho_g, drho_g, tau_r, tau_g, rho_r_valid, drho_r_valid, rho_g_valid, drho_g_valid, tau_r_valid, tau_g_valid, tot_rho_r, tot_rho_g, rho_r_sccs, soft_valid, complex_rho_ao)
returns info about the density described by this object. If some representation is not available an e...
module that contains the definitions of the scf types
types that represent a quickstep subsys
subroutine, public qs_subsys_set(subsys, cp_subsys, local_particles, local_molecules, cell, cell_ref, use_ref_cell, energy, force, qs_kind_set, nelectron_total, nelectron_spin)
...
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....
Provides all information about an atomic kind.
represent a full matrix
type of a logger, at the moment it contains just a print level starting at which level it should be l...
stores all the informations relevant to an mpi environment
Provides all information about a quickstep kind.
calculation environment to calculate the ks matrix, holds all the needed vars. assumes that the core ...
keeps the density in various representations, keeping track of which ones are valid.