(git:374b731)
Loading...
Searching...
No Matches
stm_images.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 Calculation of STM image as post processing of an electronic
10!> structure calculation,
11!> \par History
12!> Started as a copy from the code in qs_scf_post
13!> \author Joost VandeVondele 7.2008, MI 02.2009
14! **************************************************************************************************
22 USE cp_fm_types, ONLY: cp_fm_create,&
32 USE dbcsr_api, ONLY: dbcsr_copy,&
33 dbcsr_deallocate_matrix,&
34 dbcsr_p_type,&
35 dbcsr_set,&
36 dbcsr_type
40 USE kinds, ONLY: default_path_length,&
42 dp
44 USE pw_env_types, ONLY: pw_env_get,&
46 USE pw_pool_types, ONLY: pw_pool_p_type,&
48 USE pw_types, ONLY: pw_c1d_gs_type,&
54 USE qs_mo_types, ONLY: get_mo_set,&
56 USE qs_rho_types, ONLY: qs_rho_get,&
58#include "./base/base_uses.f90"
59
60 IMPLICIT NONE
61 PRIVATE
62
63 ! Global parameters
64 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'stm_images'
65 PUBLIC :: th_stm_image
66
67CONTAINS
68! **************************************************************************************************
69!> \brief Driver for the calculation of STM image, as post processing of a
70!> ground-state electronic structure calculation.
71!> \param qs_env ...
72!> \param stm_section ...
73!> \param particles ...
74!> \param unoccupied_orbs ...
75!> \param unoccupied_evals ...
76!> \param
77!> \par History
78!> 02.2009 Created [MI]
79!> \author MI
80!> \note
81!> The Tersoff-Hamman
82!> approximation is applied, occupied and a sufficient number of
83!> unoccupied eigenstates are needed (depending on the given Bias potential)
84!> and should be computed in advance. Unoccupied states are calculated
85!> before enetering this module when NLUMO =/ 0
86! **************************************************************************************************
87
88 SUBROUTINE th_stm_image(qs_env, stm_section, particles, unoccupied_orbs, &
89 unoccupied_evals)
90
91 TYPE(qs_environment_type), POINTER :: qs_env
92 TYPE(section_vals_type), POINTER :: stm_section
93 TYPE(particle_list_type), POINTER :: particles
94 TYPE(cp_fm_type), DIMENSION(:), INTENT(IN), &
95 POINTER :: unoccupied_orbs
96 TYPE(cp_1d_r_p_type), DIMENSION(:), POINTER :: unoccupied_evals
97
98 CHARACTER(len=*), PARAMETER :: routinen = 'th_stm_image'
99
100 INTEGER :: handle, irep, ispin, n_rep, ndim, nmo, &
101 nspin, output_unit
102 INTEGER, DIMENSION(:), POINTER :: nadd_unocc, stm_th_torb
103 LOGICAL :: append_cube, use_ref_energy
104 REAL(kind=dp) :: efermi, ref_energy
105 REAL(kind=dp), DIMENSION(:), POINTER :: mo_eigenvalues, mo_occ, stm_biases
106 TYPE(cp_1d_r_p_type), ALLOCATABLE, DIMENSION(:) :: evals, occupation
107 TYPE(cp_fm_struct_type), POINTER :: fm_struct_tmp
108 TYPE(cp_fm_type), ALLOCATABLE, DIMENSION(:) :: mo_arrays
109 TYPE(cp_fm_type), POINTER :: mo_coeff
110 TYPE(cp_logger_type), POINTER :: logger
111 TYPE(dbcsr_p_type), DIMENSION(:), POINTER :: rho_ao
112 TYPE(dbcsr_type), POINTER :: stm_density_ao
113 TYPE(mo_set_type), DIMENSION(:), POINTER :: mos
114 TYPE(pw_c1d_gs_type) :: wf_g
115 TYPE(pw_env_type), POINTER :: pw_env
116 TYPE(pw_pool_p_type), DIMENSION(:), POINTER :: pw_pools
117 TYPE(pw_pool_type), POINTER :: auxbas_pw_pool
118 TYPE(pw_r3d_rs_type) :: wf_r
119 TYPE(qs_ks_env_type), POINTER :: ks_env
120 TYPE(qs_rho_type), POINTER :: rho
121
122 CALL timeset(routinen, handle)
123 logger => cp_get_default_logger()
124 output_unit = cp_logger_get_default_io_unit(logger)
125
126 NULLIFY (ks_env, mos, rho, rho_ao, pw_env, stm_th_torb, fm_struct_tmp)
127 NULLIFY (auxbas_pw_pool, pw_pools, stm_density_ao, mo_coeff)
128
129 CALL get_qs_env(qs_env, &
130 ks_env=ks_env, &
131 mos=mos, &
132 rho=rho, &
133 pw_env=pw_env)
134
135 CALL qs_rho_get(rho, rho_ao=rho_ao)
136
137 CALL section_vals_val_get(stm_section, "APPEND", l_val=append_cube)
138 CALL section_vals_val_get(stm_section, "BIAS", r_vals=stm_biases)
139 CALL section_vals_val_get(stm_section, "REF_ENERGY", r_val=ref_energy, explicit=use_ref_energy)
140 CALL section_vals_val_get(stm_section, "TH_TORB", n_rep_val=n_rep)
141 IF (n_rep == 0) THEN
142 ALLOCATE (stm_th_torb(1))
143 stm_th_torb(1) = 0
144 ELSE
145 ALLOCATE (stm_th_torb(n_rep))
146 DO irep = 1, n_rep
147 CALL section_vals_val_get(stm_section, "TH_TORB", &
148 i_rep_val=irep, i_val=stm_th_torb(irep))
149 END DO
150 END IF
151
152 ALLOCATE (stm_density_ao)
153 CALL dbcsr_copy(stm_density_ao, rho_ao(1)%matrix, &
154 name="stm_density_ao")
155
156 CALL pw_env_get(pw_env, auxbas_pw_pool=auxbas_pw_pool, &
157 pw_pools=pw_pools)
158 CALL auxbas_pw_pool%create_pw(wf_r)
159 CALL auxbas_pw_pool%create_pw(wf_g)
160
161 nspin = SIZE(mos, 1)
162 ALLOCATE (nadd_unocc(nspin))
163 nadd_unocc = 0
164 IF (ASSOCIATED(unoccupied_orbs)) THEN
165 DO ispin = 1, nspin
166 nadd_unocc(ispin) = SIZE(unoccupied_evals(ispin)%array)
167 END DO
168 END IF
169
170 ALLOCATE (mo_arrays(nspin))
171 ALLOCATE (evals(nspin))
172 ALLOCATE (occupation(nspin))
173 DO ispin = 1, nspin
174 IF (nadd_unocc(ispin) == 0) THEN
175 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, &
176 eigenvalues=mo_eigenvalues, nmo=nmo, mu=efermi, occupation_numbers=mo_occ)
177 mo_arrays(ispin) = mo_coeff
178 evals(ispin)%array => mo_eigenvalues
179 occupation(ispin)%array => mo_occ
180 ELSE
181 CALL get_mo_set(mo_set=mos(ispin), mo_coeff=mo_coeff, &
182 eigenvalues=mo_eigenvalues, nmo=nmo, mu=efermi, occupation_numbers=mo_occ)
183 ndim = nmo + nadd_unocc(ispin)
184 ALLOCATE (evals(ispin)%array(ndim))
185 evals(ispin)%array(1:nmo) = mo_eigenvalues(1:nmo)
186 evals(ispin)%array(1 + nmo:ndim) = unoccupied_evals(ispin)%array(1:nadd_unocc(ispin))
187 ALLOCATE (occupation(ispin)%array(ndim))
188 occupation(ispin)%array(1:nmo) = mo_occ(1:nmo)
189 occupation(ispin)%array(1 + nmo:ndim) = 0.0_dp
190 CALL cp_fm_struct_create(fm_struct_tmp, ncol_global=ndim, &
191 template_fmstruct=mo_coeff%matrix_struct)
192 CALL cp_fm_create(mo_arrays(ispin), fm_struct_tmp, name="mo_arrays")
193 CALL cp_fm_struct_release(fm_struct_tmp)
194 CALL cp_fm_to_fm(mo_coeff, mo_arrays(ispin), nmo, 1, 1)
195 CALL cp_fm_to_fm(unoccupied_orbs(ispin), mo_arrays(ispin), &
196 nadd_unocc(ispin), 1, nmo + 1)
197 END IF
198 END DO
199 IF (use_ref_energy) efermi = ref_energy
200
201 CALL stm_cubes(ks_env, stm_section, stm_density_ao, wf_r, wf_g, mo_arrays, evals, &
202 occupation, efermi, stm_biases, stm_th_torb, particles, &
203 output_unit, append_cube)
204 DO ispin = 1, nspin
205 IF (nadd_unocc(ispin) > 0) THEN
206 DEALLOCATE (evals(ispin)%array)
207 DEALLOCATE (occupation(ispin)%array)
208 CALL cp_fm_release(mo_arrays(ispin))
209 END IF
210 END DO
211 DEALLOCATE (mo_arrays)
212 DEALLOCATE (evals)
213 DEALLOCATE (occupation)
214
215 CALL dbcsr_deallocate_matrix(stm_density_ao)
216 CALL auxbas_pw_pool%give_back_pw(wf_r)
217 CALL auxbas_pw_pool%give_back_pw(wf_g)
218
219 DEALLOCATE (stm_th_torb)
220 DEALLOCATE (nadd_unocc)
221
222 CALL timestop(handle)
223
224 END SUBROUTINE th_stm_image
225
226! **************************************************************************************************
227!> \brief computes a simple approximation to the tunneling current for STM
228!> \param ks_env ...
229!> \param stm_section ...
230!> \param stm_density_ao ...
231!> \param wf_r ...
232!> \param wf_g ...
233!> \param mo_arrays ...
234!> \param evals ...
235!> \param occupation ...
236!> \param efermi ...
237!> \param stm_biases ...
238!> \param stm_th_torb ...
239!> \param particles ...
240!> \param output_unit ...
241!> \param append_cube ...
242!> \param
243!> \par History
244!> 7.2008 Created [Joost VandeVondele]
245!> 07.2009 modified MI
246!> \author Joost VandeVondele
247!> \note
248!> requires the MOs that are passed to be eigenstates, and energy ordered
249! **************************************************************************************************
250 SUBROUTINE stm_cubes(ks_env, stm_section, stm_density_ao, wf_r, wf_g, mo_arrays, evals, &
251 occupation, efermi, stm_biases, stm_th_torb, particles, &
252 output_unit, append_cube)
253
254 TYPE(qs_ks_env_type), POINTER :: ks_env
255 TYPE(section_vals_type), POINTER :: stm_section
256 TYPE(dbcsr_type), POINTER :: stm_density_ao
257 TYPE(pw_r3d_rs_type), INTENT(INOUT) :: wf_r
258 TYPE(pw_c1d_gs_type), INTENT(INOUT) :: wf_g
259 TYPE(cp_fm_type), DIMENSION(:), INTENT(IN) :: mo_arrays
260 TYPE(cp_1d_r_p_type), DIMENSION(:), INTENT(IN) :: evals, occupation
261 REAL(kind=dp) :: efermi
262 REAL(kind=dp), DIMENSION(:), POINTER :: stm_biases
263 INTEGER, DIMENSION(:), POINTER :: stm_th_torb
264 TYPE(particle_list_type), POINTER :: particles
265 INTEGER, INTENT(IN) :: output_unit
266 LOGICAL, INTENT(IN) :: append_cube
267
268 CHARACTER(LEN=*), DIMENSION(0:9), PARAMETER :: &
269 torb_string = (/" s", " px", " py", " pz", "dxy", "dyz", "dzx", "dx2", "dy2", "dz2"/)
270 CHARACTER(len=*), PARAMETER :: routinen = 'stm_cubes'
271
272 CHARACTER(LEN=default_path_length) :: filename
273 CHARACTER(LEN=default_string_length) :: my_pos, oname, title
274 INTEGER :: handle, i, ibias, imo, iorb, ispin, &
275 istates, nmo, nspin, nstates(2), &
276 state_start(2), unit_nr
277 LOGICAL :: mpi_io
278 REAL(kind=dp) :: alpha
279 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: occ_tot
280 TYPE(cp_fm_struct_type), POINTER :: fm_struct_tmp
281 TYPE(cp_fm_type) :: matrix_v, matrix_vf
282 TYPE(cp_logger_type), POINTER :: logger
283
284 CALL timeset(routinen, handle)
285
286 logger => cp_get_default_logger()
287 NULLIFY (fm_struct_tmp)
288
289 nspin = SIZE(mo_arrays)
290
291 IF (output_unit > 0) WRITE (output_unit, '(T2,A)') ""
292 IF (output_unit > 0) WRITE (output_unit, '(T2,A,F12.6, A)') "STM : Reference energy ", efermi, " a.u. "
293 DO ibias = 1, SIZE(stm_biases)
294
295 IF (output_unit > 0) WRITE (output_unit, '(T2,A)') ""
296 IF (output_unit > 0) WRITE (output_unit, '(T2,A,F16.6)') &
297 "Preparing for STM image at bias [a.u.] ", stm_biases(ibias)
298
299 istates = 0
300 nstates = 0
301 state_start = 0
302 DO ispin = 1, nspin
303 IF (stm_biases(ibias) < 0.0_dp) THEN
304 nmo = SIZE(evals(ispin)%array)
305 DO imo = 1, nmo
306 IF (evals(ispin)%array(imo) > (efermi + stm_biases(ibias)) .AND. &
307 evals(ispin)%array(imo) <= efermi) THEN
308 IF (nstates(ispin) == 0) state_start(ispin) = imo
309 nstates(ispin) = nstates(ispin) + 1
310 END IF
311 END DO
312 IF ((output_unit > 0) .AND. evals(ispin)%array(1) > efermi + stm_biases(ibias)) &
313 WRITE (output_unit, '(T4,A)') "Warning: EFermi+bias below lowest computed occupied MO"
314 ELSE
315 nmo = SIZE(evals(ispin)%array)
316 DO imo = 1, nmo
317 IF (evals(ispin)%array(imo) <= (efermi + stm_biases(ibias)) .AND. &
318 evals(ispin)%array(imo) > efermi) THEN
319 IF (nstates(ispin) == 0) state_start(ispin) = imo
320 nstates(ispin) = nstates(ispin) + 1
321 END IF
322 END DO
323 IF ((output_unit > 0) .AND. evals(ispin)%array(nmo) < efermi + stm_biases(ibias)) &
324 WRITE (output_unit, '(T4,A)') "Warning: E-Fermi+bias above highest computed unoccupied MO"
325 END IF
326 istates = istates + nstates(ispin)
327 END DO
328 IF ((output_unit > 0)) WRITE (output_unit, '(T4,A,I0,A)') "Using a total of ", istates, " states"
329 IF (istates == 0) cycle
330
331 CALL cp_fm_struct_create(fm_struct_tmp, ncol_global=istates, &
332 template_fmstruct=mo_arrays(1)%matrix_struct)
333 CALL cp_fm_create(matrix_v, fm_struct_tmp, name="matrix_v")
334 CALL cp_fm_create(matrix_vf, fm_struct_tmp, name="matrix_vf")
335 CALL cp_fm_struct_release(fm_struct_tmp)
336
337 ALLOCATE (occ_tot(istates))
338
339 ! we sum both alpha and beta electrons together for this density of states
340 istates = 0
341 alpha = 1.0_dp
342 IF (nspin == 1) alpha = 2.0_dp
343 DO ispin = 1, nspin
344 CALL cp_fm_to_fm(mo_arrays(ispin), matrix_v, nstates(ispin), state_start(ispin), istates + 1)
345 CALL cp_fm_to_fm(mo_arrays(ispin), matrix_vf, nstates(ispin), state_start(ispin), istates + 1)
346 IF (stm_biases(ibias) < 0.0_dp) THEN
347 occ_tot(istates + 1:istates + nstates(ispin)) = &
348 occupation(ispin)%array(state_start(ispin):state_start(ispin) - 1 + nstates(ispin))
349 ELSE
350 occ_tot(istates + 1:istates + nstates(ispin)) = &
351 alpha - occupation(ispin)%array(state_start(ispin):state_start(ispin) - 1 + nstates(ispin))
352 END IF
353 istates = istates + nstates(ispin)
354 END DO
355
356 CALL cp_fm_column_scale(matrix_vf, occ_tot(1:istates))
357 alpha = 1.0_dp
358
359 CALL dbcsr_set(stm_density_ao, 0.0_dp)
360 CALL cp_dbcsr_plus_fm_fm_t(stm_density_ao, matrix_v=matrix_v, matrix_g=matrix_vf, ncol=istates, &
361 alpha=alpha)
362
363 DO i = 1, SIZE(stm_th_torb)
364 iorb = stm_th_torb(i)
365 CALL calculate_rho_elec(matrix_p=stm_density_ao, &
366 rho=wf_r, rho_gspace=wf_g, &
367 ks_env=ks_env, der_type=iorb)
368
369 oname = torb_string(iorb)
370! fname = "STM_"//TRIM(torb_string(iorb))
371 WRITE (filename, '(a4,I2.2,a1,I5.5)') "STM_d", iorb, "_", ibias
372 my_pos = "REWIND"
373 IF (append_cube) THEN
374 my_pos = "APPEND"
375 END IF
376
377 mpi_io = .true.
378 unit_nr = cp_print_key_unit_nr(logger, stm_section, extension=".cube", &
379 middle_name=trim(filename), file_position=my_pos, file_action="WRITE", &
380 log_filename=.false., mpi_io=mpi_io)
381 WRITE (title, '(A,I0,A,I0,A,F16.8)') "STM cube ", ibias, " wfn deriv. ", iorb, " at bias ", stm_biases(ibias)
382 CALL cp_pw_to_cube(wf_r, unit_nr, title, particles=particles, &
383 stride=section_get_ivals(stm_section, "STRIDE"), zero_tails=.true., &
384 mpi_io=mpi_io)
385
386 CALL cp_print_key_finished_output(unit_nr, logger, stm_section, mpi_io=mpi_io)
387 END DO
388
389 CALL cp_fm_release(matrix_v)
390 CALL cp_fm_release(matrix_vf)
391 DEALLOCATE (occ_tot)
392
393 END DO
394
395 CALL timestop(handle)
396
397 END SUBROUTINE stm_cubes
398
399END MODULE stm_images
various utilities that regard array of different kinds: output, allocation,... maybe it is not a good...
DBCSR operations in CP2K.
subroutine, public cp_dbcsr_plus_fm_fm_t(sparse_matrix, matrix_v, matrix_g, ncol, alpha, keep_sparsity, symmetry_mode)
performs the multiplication sparse_matrix+dense_mat*dens_mat^T if matrix_g is not explicitly given,...
basic linear algebra operations for full matrices
subroutine, public cp_fm_column_scale(matrixa, scaling)
scales column i of matrix a with scaling(i)
represent the structure of a full matrix
subroutine, public cp_fm_struct_create(fmstruct, para_env, context, nrow_global, ncol_global, nrow_block, ncol_block, descriptor, first_p_pos, local_leading_dimension, template_fmstruct, square_blocks, force_block)
allocates and initializes a full matrix structure
subroutine, public cp_fm_struct_release(fmstruct)
releases a full matrix structure
represent a full matrix distributed on many processors
Definition cp_fm_types.F:15
subroutine, public cp_fm_create(matrix, matrix_struct, name, use_sp)
creates a new full matrix with the given structure
various routines to log and control the output. The idea is that decisions about where to log should ...
integer function, public cp_logger_get_default_io_unit(logger)
returns the unit nr for the ionode (-1 on all other processors) skips as well checks if the procs cal...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
A wrapper around pw_to_cube() which accepts particle_list_type.
subroutine, public cp_pw_to_cube(pw, unit_nr, title, particles, stride, zero_tails, silent, mpi_io)
...
objects that represent the structure of input sections and the data contained in an input section
integer function, dimension(:), pointer, public section_get_ivals(section_vals, keyword_name)
...
subroutine, public section_vals_val_get(section_vals, keyword_name, i_rep_section, i_rep_val, n_rep_val, val, l_val, i_val, r_val, c_val, l_vals, i_vals, r_vals, c_vals, explicit)
returns the requested value
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
integer, parameter, public default_string_length
Definition kinds.F:57
integer, parameter, public default_path_length
Definition kinds.F:58
represent a simple array based list of the given type
container for various plainwaves related things
subroutine, public pw_env_get(pw_env, pw_pools, cube_info, gridlevel_info, auxbas_pw_pool, auxbas_grid, auxbas_rs_desc, auxbas_rs_grid, rs_descs, rs_grids, xc_pw_pool, vdw_pw_pool, poisson_env, interp_section)
returns the various attributes of the pw env
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
Calculate the plane wave density by collocating the primitive Gaussian functions (pgf).
subroutine, public calculate_rho_elec(matrix_p, matrix_p_kp, rho, rho_gspace, total_rho, ks_env, soft_valid, compute_tau, compute_grad, basis_type, der_type, idir, task_list_external, pw_env_external)
computes the density corresponding to a given density matrix on the grid
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.
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.
superstucture that hold various representations of the density and keeps track of which ones are vali...
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...
Calculation of STM image as post processing of an electronic structure calculation,...
Definition stm_images.F:15
subroutine, public th_stm_image(qs_env, stm_section, particles, unoccupied_orbs, unoccupied_evals)
Driver for the calculation of STM image, as post processing of a ground-state electronic structure ca...
Definition stm_images.F:90
represent a pointer to a 1d array
keeps the information about the structure of a full matrix
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...
contained for different pw related things
to create arrays of pools
Manages a pool of grids (to be used for example as tmp objects), but can also be used to instantiate ...
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.