(git:ed6f26b)
Loading...
Searching...
No Matches
xtb_hab_force.F
Go to the documentation of this file.
1!--------------------------------------------------------------------------------------------------!
2! CP2K: A general program to perform molecular dynamics simulations !
3! Copyright 2000-2025 CP2K developers group <https://cp2k.org> !
4! !
5! SPDX-License-Identifier: GPL-2.0-or-later !
6!--------------------------------------------------------------------------------------------------!
7
8! **************************************************************************************************
9!> \brief Calculation of xTB Hamiltonian derivative
10!> Reference: Stefan Grimme, Christoph Bannwarth, Philip Shushkov
11!> JCTC 13, 1989-2009, (2017)
12!> DOI: 10.1021/acs.jctc.7b00118
13!> \author JGH
14! **************************************************************************************************
16 USE ai_contraction, ONLY: block_add,&
18 USE ai_overlap, ONLY: overlap_ab
26 USE cp_dbcsr_api, ONLY: dbcsr_create,&
36 USE kinds, ONLY: dp
38 USE orbital_pointers, ONLY: ncoset
48 USE qs_kind_types, ONLY: get_qs_kind,&
58 USE xtb_hcore, ONLY: gfn1_huckel,&
60 USE xtb_types, ONLY: get_xtb_atom_param,&
62#include "./base/base_uses.f90"
63
64 IMPLICIT NONE
65
66 PRIVATE
67
68 CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'xtb_hab_force'
69
70 PUBLIC :: build_xtb_hab_force
71
72CONTAINS
73
74! **************************************************************************************************
75!> \brief ...
76!> \param qs_env ...
77!> \param p_matrix ...
78! **************************************************************************************************
79 SUBROUTINE build_xtb_hab_force(qs_env, p_matrix)
80
81 TYPE(qs_environment_type), POINTER :: qs_env
82 TYPE(dbcsr_type), POINTER :: p_matrix
83
84 CHARACTER(LEN=*), PARAMETER :: routinen = 'build_xtb_hab_force'
85
86 INTEGER :: atom_a, atom_b, atom_c, handle, i, iatom, ic, icol, ikind, img, ir, irow, iset, &
87 j, jatom, jkind, jset, katom, kkind, la, lb, ldsab, maxder, n1, n2, na, natom, natorb_a, &
88 natorb_b, nb, ncoa, ncob, nderivatives, nimg, nkind, nsa, nsb, nseta, nsetb, sgfa, sgfb, &
89 za, zb
90 INTEGER, ALLOCATABLE, DIMENSION(:) :: atom_of_kind, kind_of
91 INTEGER, DIMENSION(25) :: laoa, laob, naoa, naob
92 INTEGER, DIMENSION(3) :: cell
93 INTEGER, DIMENSION(:), POINTER :: la_max, la_min, lb_max, lb_min, npgfa, &
94 npgfb, nsgfa, nsgfb
95 INTEGER, DIMENSION(:, :), POINTER :: first_sgfa, first_sgfb
96 LOGICAL :: defined, diagblock, found, use_virial
97 REAL(kind=dp) :: dfp, dhij, dr, drk, drx, f0, fhua, fhub, &
98 fhud, foab, hij, rcova, rcovab, rcovb, &
99 rrab
100 REAL(kind=dp), ALLOCATABLE, DIMENSION(:) :: cnumbers
101 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :) :: dfblock, dhuckel, huckel, owork
102 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :, :) :: oint, sint
103 REAL(kind=dp), ALLOCATABLE, DIMENSION(:, :, :, :) :: kijab
104 REAL(kind=dp), DIMENSION(3) :: fdik, fdika, fdikb, force_ab, rij, rik
105 REAL(kind=dp), DIMENSION(5) :: dpia, dpib, kpolya, kpolyb, pia, pib
106 REAL(kind=dp), DIMENSION(:), POINTER :: set_radius_a, set_radius_b
107 REAL(kind=dp), DIMENSION(:, :), POINTER :: fblock, pblock, rpgfa, rpgfb, sblock, &
108 scon_a, scon_b, zeta, zetb
109 TYPE(atomic_kind_type), DIMENSION(:), POINTER :: atomic_kind_set
110 TYPE(block_p_type), DIMENSION(2:4) :: dsblocks
111 TYPE(cp_logger_type), POINTER :: logger
112 TYPE(dbcsr_p_type), DIMENSION(:, :), POINTER :: matrix_h, matrix_s
113 TYPE(dcnum_type), ALLOCATABLE, DIMENSION(:) :: dcnum
114 TYPE(dft_control_type), POINTER :: dft_control
115 TYPE(gto_basis_set_p_type), DIMENSION(:), POINTER :: basis_set_list
116 TYPE(gto_basis_set_type), POINTER :: basis_set_a, basis_set_b
117 TYPE(mp_para_env_type), POINTER :: para_env
119 DIMENSION(:), POINTER :: nl_iterator
120 TYPE(neighbor_list_set_p_type), DIMENSION(:), &
121 POINTER :: sab_orb
122 TYPE(particle_type), DIMENSION(:), POINTER :: particle_set
123 TYPE(qs_force_type), DIMENSION(:), POINTER :: force
124 TYPE(qs_kind_type), DIMENSION(:), POINTER :: qs_kind_set
125 TYPE(qs_ks_env_type), POINTER :: ks_env
126 TYPE(xtb_atom_type), POINTER :: xtb_atom_a, xtb_atom_b
127 TYPE(xtb_control_type), POINTER :: xtb_control
128
129 CALL timeset(routinen, handle)
130
131 NULLIFY (logger)
132 logger => cp_get_default_logger()
133
134 NULLIFY (matrix_h, matrix_s, atomic_kind_set, qs_kind_set, sab_orb)
135
136 CALL get_qs_env(qs_env=qs_env, &
137 atomic_kind_set=atomic_kind_set, &
138 qs_kind_set=qs_kind_set, &
139 dft_control=dft_control, &
140 para_env=para_env, &
141 sab_orb=sab_orb)
142
143 cpassert(dft_control%qs_control%xtb_control%gfn_type == 1)
144
145 nkind = SIZE(atomic_kind_set)
146 xtb_control => dft_control%qs_control%xtb_control
147 nimg = dft_control%nimages
148 nderivatives = 1
149 maxder = ncoset(nderivatives)
150
151 NULLIFY (particle_set)
152 CALL get_qs_env(qs_env=qs_env, particle_set=particle_set)
153 natom = SIZE(particle_set)
154 CALL get_atomic_kind_set(atomic_kind_set=atomic_kind_set, &
155 atom_of_kind=atom_of_kind, kind_of=kind_of)
156
157 NULLIFY (force)
158 CALL get_qs_env(qs_env=qs_env, force=force)
159 use_virial = .false.
160 cpassert(nimg == 1)
161
162 ! set up basis set lists
163 ALLOCATE (basis_set_list(nkind))
164 CALL basis_set_list_setup(basis_set_list, "ORB", qs_kind_set)
165
166 ! allocate overlap matrix
167 CALL get_qs_env(qs_env=qs_env, ks_env=ks_env)
168 CALL dbcsr_allocate_matrix_set(matrix_s, maxder, nimg)
169 CALL create_sab_matrix(ks_env, matrix_s, "xTB OVERLAP MATRIX", basis_set_list, basis_set_list, &
170 sab_orb, .true.)
171 ! initialize H matrix
172 CALL dbcsr_allocate_matrix_set(matrix_h, 1, nimg)
173 DO img = 1, nimg
174 ALLOCATE (matrix_h(1, img)%matrix)
175 CALL dbcsr_create(matrix_h(1, img)%matrix, template=matrix_s(1, 1)%matrix, &
176 name="HAMILTONIAN MATRIX")
177 CALL cp_dbcsr_alloc_block_from_nbl(matrix_h(1, img)%matrix, sab_orb)
178 END DO
179
180 ! Calculate coordination numbers
181 ! needed for effective atomic energy levels (Eq. 12)
182 ! code taken from D3 dispersion energy
183 CALL cnumber_init(qs_env, cnumbers, dcnum, 1, .true.)
184
185 ! Calculate Huckel parameters
186 CALL gfn1_huckel(qs_env, cnumbers, huckel, dhuckel, .true.)
187
188 ! Calculate KAB parameters and electronegativity correction
189 CALL gfn1_kpair(qs_env, kijab)
190
191 ! loop over all atom pairs with a non-zero overlap (sab_orb)
192 CALL neighbor_list_iterator_create(nl_iterator, sab_orb)
193 DO WHILE (neighbor_list_iterate(nl_iterator) == 0)
194 CALL get_iterator_info(nl_iterator, ikind=ikind, jkind=jkind, &
195 iatom=iatom, jatom=jatom, r=rij, cell=cell)
196 CALL get_qs_kind(qs_kind_set(ikind), xtb_parameter=xtb_atom_a)
197 CALL get_xtb_atom_param(xtb_atom_a, defined=defined, natorb=natorb_a)
198 IF (.NOT. defined .OR. natorb_a < 1) cycle
199 CALL get_qs_kind(qs_kind_set(jkind), xtb_parameter=xtb_atom_b)
200 CALL get_xtb_atom_param(xtb_atom_b, defined=defined, natorb=natorb_b)
201 IF (.NOT. defined .OR. natorb_b < 1) cycle
202
203 dr = sqrt(sum(rij(:)**2))
204
205 ! atomic parameters
206 CALL get_xtb_atom_param(xtb_atom_a, z=za, nao=naoa, lao=laoa, rcov=rcova, &
207 nshell=nsa, kpoly=kpolya)
208 CALL get_xtb_atom_param(xtb_atom_b, z=zb, nao=naob, lao=laob, rcov=rcovb, &
209 nshell=nsb, kpoly=kpolyb)
210
211 ic = 1
212 icol = max(iatom, jatom)
213 irow = min(iatom, jatom)
214 NULLIFY (sblock, fblock)
215 CALL dbcsr_get_block_p(matrix=matrix_s(1, ic)%matrix, &
216 row=irow, col=icol, block=sblock, found=found)
217 cpassert(found)
218 CALL dbcsr_get_block_p(matrix=matrix_h(1, ic)%matrix, &
219 row=irow, col=icol, block=fblock, found=found)
220 cpassert(found)
221
222 NULLIFY (pblock)
223 CALL dbcsr_get_block_p(matrix=p_matrix, &
224 row=irow, col=icol, block=pblock, found=found)
225 cpassert(ASSOCIATED(pblock))
226 DO i = 2, 4
227 NULLIFY (dsblocks(i)%block)
228 CALL dbcsr_get_block_p(matrix=matrix_s(i, ic)%matrix, &
229 row=irow, col=icol, block=dsblocks(i)%block, found=found)
230 cpassert(found)
231 END DO
232
233 ! overlap
234 basis_set_a => basis_set_list(ikind)%gto_basis_set
235 IF (.NOT. ASSOCIATED(basis_set_a)) cycle
236 basis_set_b => basis_set_list(jkind)%gto_basis_set
237 IF (.NOT. ASSOCIATED(basis_set_b)) cycle
238 atom_a = atom_of_kind(iatom)
239 atom_b = atom_of_kind(jatom)
240 ! basis ikind
241 first_sgfa => basis_set_a%first_sgf
242 la_max => basis_set_a%lmax
243 la_min => basis_set_a%lmin
244 npgfa => basis_set_a%npgf
245 nseta = basis_set_a%nset
246 nsgfa => basis_set_a%nsgf_set
247 rpgfa => basis_set_a%pgf_radius
248 set_radius_a => basis_set_a%set_radius
249 scon_a => basis_set_a%scon
250 zeta => basis_set_a%zet
251 ! basis jkind
252 first_sgfb => basis_set_b%first_sgf
253 lb_max => basis_set_b%lmax
254 lb_min => basis_set_b%lmin
255 npgfb => basis_set_b%npgf
256 nsetb = basis_set_b%nset
257 nsgfb => basis_set_b%nsgf_set
258 rpgfb => basis_set_b%pgf_radius
259 set_radius_b => basis_set_b%set_radius
260 scon_b => basis_set_b%scon
261 zetb => basis_set_b%zet
262
263 ldsab = get_memory_usage(qs_kind_set, "ORB", "ORB")
264 ALLOCATE (oint(ldsab, ldsab, maxder), owork(ldsab, ldsab))
265 ALLOCATE (sint(natorb_a, natorb_b, maxder))
266 sint = 0.0_dp
267
268 DO iset = 1, nseta
269 ncoa = npgfa(iset)*ncoset(la_max(iset))
270 n1 = npgfa(iset)*(ncoset(la_max(iset)) - ncoset(la_min(iset) - 1))
271 sgfa = first_sgfa(1, iset)
272 DO jset = 1, nsetb
273 IF (set_radius_a(iset) + set_radius_b(jset) < dr) cycle
274 ncob = npgfb(jset)*ncoset(lb_max(jset))
275 n2 = npgfb(jset)*(ncoset(lb_max(jset)) - ncoset(lb_min(jset) - 1))
276 sgfb = first_sgfb(1, jset)
277 CALL overlap_ab(la_max(iset), la_min(iset), npgfa(iset), rpgfa(:, iset), zeta(:, iset), &
278 lb_max(jset), lb_min(jset), npgfb(jset), rpgfb(:, jset), zetb(:, jset), &
279 rij, sab=oint(:, :, 1), dab=oint(:, :, 2:4))
280 ! Contraction
281 DO i = 1, 4
282 CALL contraction(oint(:, :, i), owork, ca=scon_a(:, sgfa:), na=n1, ma=nsgfa(iset), &
283 cb=scon_b(:, sgfb:), nb=n2, mb=nsgfb(jset), fscale=1.0_dp, trans=.false.)
284 CALL block_add("IN", owork, nsgfa(iset), nsgfb(jset), sint(:, :, i), sgfa, sgfb, trans=.false.)
285 END DO
286 END DO
287 END DO
288 ! update S matrix
289 IF (iatom <= jatom) THEN
290 sblock(:, :) = sblock(:, :) + sint(:, :, 1)
291 ELSE
292 sblock(:, :) = sblock(:, :) + transpose(sint(:, :, 1))
293 END IF
294 DO i = 2, 4
295 IF (iatom <= jatom) THEN
296 dsblocks(i)%block(:, :) = dsblocks(i)%block(:, :) + sint(:, :, i)
297 ELSE
298 dsblocks(i)%block(:, :) = dsblocks(i)%block(:, :) - transpose(sint(:, :, i))
299 END IF
300 END DO
301
302 ! Calculate Pi = Pia * Pib (Eq. 11)
303 rcovab = rcova + rcovb
304 rrab = sqrt(dr/rcovab)
305 pia(1:nsa) = 1._dp + kpolya(1:nsa)*rrab
306 pib(1:nsb) = 1._dp + kpolyb(1:nsb)*rrab
307 IF (dr > 1.e-6_dp) THEN
308 drx = 0.5_dp/rrab/rcovab
309 ELSE
310 drx = 0.0_dp
311 END IF
312 dpia(1:nsa) = drx*kpolya(1:nsa)
313 dpib(1:nsb) = drx*kpolyb(1:nsb)
314
315 ! diagonal block
316 diagblock = .false.
317 IF (iatom == jatom .AND. dr < 0.001_dp) diagblock = .true.
318 !
319 ! Eq. 10
320 !
321 IF (diagblock) THEN
322 DO i = 1, natorb_a
323 na = naoa(i)
324 fblock(i, i) = fblock(i, i) + huckel(na, iatom)
325 END DO
326 ELSE
327 DO j = 1, natorb_b
328 nb = naob(j)
329 DO i = 1, natorb_a
330 na = naoa(i)
331 hij = 0.5_dp*(huckel(na, iatom) + huckel(nb, jatom))*pia(na)*pib(nb)
332 IF (iatom <= jatom) THEN
333 fblock(i, j) = fblock(i, j) + hij*sint(i, j, 1)*kijab(i, j, ikind, jkind)
334 ELSE
335 fblock(j, i) = fblock(j, i) + hij*sint(i, j, 1)*kijab(i, j, ikind, jkind)
336 END IF
337 END DO
338 END DO
339 END IF
340
341 f0 = 1.0_dp
342 IF (irow == iatom) f0 = -1.0_dp
343 ! Derivative wrt coordination number
344 fhua = 0.0_dp
345 fhub = 0.0_dp
346 fhud = 0.0_dp
347 IF (diagblock) THEN
348 DO i = 1, natorb_a
349 la = laoa(i)
350 na = naoa(i)
351 fhud = fhud + pblock(i, i)*dhuckel(na, iatom)
352 END DO
353 ELSE
354 DO j = 1, natorb_b
355 lb = laob(j)
356 nb = naob(j)
357 DO i = 1, natorb_a
358 la = laoa(i)
359 na = naoa(i)
360 hij = 0.5_dp*pia(na)*pib(nb)
361 IF (iatom <= jatom) THEN
362 fhua = fhua + hij*kijab(i, j, ikind, jkind)*sint(i, j, 1)*pblock(i, j)*dhuckel(na, iatom)
363 fhub = fhub + hij*kijab(i, j, ikind, jkind)*sint(i, j, 1)*pblock(i, j)*dhuckel(nb, jatom)
364 ELSE
365 fhua = fhua + hij*kijab(i, j, ikind, jkind)*sint(i, j, 1)*pblock(j, i)*dhuckel(na, iatom)
366 fhub = fhub + hij*kijab(i, j, ikind, jkind)*sint(i, j, 1)*pblock(j, i)*dhuckel(nb, jatom)
367 END IF
368 END DO
369 END DO
370 IF (iatom /= jatom) THEN
371 fhua = 2.0_dp*fhua
372 fhub = 2.0_dp*fhub
373 END IF
374 END IF
375 ! iatom
376 atom_a = atom_of_kind(iatom)
377 DO i = 1, dcnum(iatom)%neighbors
378 katom = dcnum(iatom)%nlist(i)
379 kkind = kind_of(katom)
380 atom_c = atom_of_kind(katom)
381 rik = dcnum(iatom)%rik(:, i)
382 drk = sqrt(sum(rik(:)**2))
383 IF (drk > 1.e-3_dp) THEN
384 fdika(:) = fhua*dcnum(iatom)%dvals(i)*rik(:)/drk
385 force(ikind)%all_potential(:, atom_a) = force(ikind)%all_potential(:, atom_a) - fdika(:)
386 force(kkind)%all_potential(:, atom_c) = force(kkind)%all_potential(:, atom_c) + fdika(:)
387 fdikb(:) = fhud*dcnum(iatom)%dvals(i)*rik(:)/drk
388 force(ikind)%all_potential(:, atom_a) = force(ikind)%all_potential(:, atom_a) - fdikb(:)
389 force(kkind)%all_potential(:, atom_c) = force(kkind)%all_potential(:, atom_c) + fdikb(:)
390 END IF
391 END DO
392 ! jatom
393 atom_b = atom_of_kind(jatom)
394 DO i = 1, dcnum(jatom)%neighbors
395 katom = dcnum(jatom)%nlist(i)
396 kkind = kind_of(katom)
397 atom_c = atom_of_kind(katom)
398 rik = dcnum(jatom)%rik(:, i)
399 drk = sqrt(sum(rik(:)**2))
400 IF (drk > 1.e-3_dp) THEN
401 fdik(:) = fhub*dcnum(jatom)%dvals(i)*rik(:)/drk
402 force(jkind)%all_potential(:, atom_b) = force(jkind)%all_potential(:, atom_b) - fdik(:)
403 force(kkind)%all_potential(:, atom_c) = force(kkind)%all_potential(:, atom_c) + fdik(:)
404 END IF
405 END DO
406 IF (diagblock) THEN
407 force_ab = 0._dp
408 ELSE
409 ! force from R dendent Huckel element
410 n1 = SIZE(fblock, 1)
411 n2 = SIZE(fblock, 2)
412 ALLOCATE (dfblock(n1, n2))
413 dfblock = 0.0_dp
414 DO j = 1, natorb_b
415 lb = laob(j)
416 nb = naob(j)
417 DO i = 1, natorb_a
418 la = laoa(i)
419 na = naoa(i)
420 dhij = 0.5_dp*(huckel(na, iatom) + huckel(nb, jatom))*(dpia(na)*pib(nb) + pia(na)*dpib(nb))
421 IF (iatom <= jatom) THEN
422 dfblock(i, j) = dfblock(i, j) + dhij*sint(i, j, 1)*kijab(i, j, ikind, jkind)
423 ELSE
424 dfblock(j, i) = dfblock(j, i) + dhij*sint(i, j, 1)*kijab(i, j, ikind, jkind)
425 END IF
426 END DO
427 END DO
428 dfp = f0*sum(dfblock(:, :)*pblock(:, :))
429 DO ir = 1, 3
430 foab = 2.0_dp*dfp*rij(ir)/dr
431 ! force from overlap matrix contribution to H
432 DO j = 1, natorb_b
433 lb = laob(j)
434 nb = naob(j)
435 DO i = 1, natorb_a
436 la = laoa(i)
437 na = naoa(i)
438 hij = 0.5_dp*(huckel(na, iatom) + huckel(nb, jatom))*pia(na)*pib(nb)
439 IF (iatom <= jatom) THEN
440 foab = foab + 2.0_dp*hij*sint(i, j, ir + 1)*pblock(i, j)*kijab(i, j, ikind, jkind)
441 ELSE
442 foab = foab - 2.0_dp*hij*sint(i, j, ir + 1)*pblock(j, i)*kijab(i, j, ikind, jkind)
443 END IF
444 END DO
445 END DO
446 force_ab(ir) = foab
447 END DO
448 DEALLOCATE (dfblock)
449 END IF
450
451 atom_a = atom_of_kind(iatom)
452 atom_b = atom_of_kind(jatom)
453 IF (irow == iatom) force_ab = -force_ab
454 force(ikind)%all_potential(:, atom_a) = force(ikind)%all_potential(:, atom_a) - force_ab(:)
455 force(jkind)%all_potential(:, atom_b) = force(jkind)%all_potential(:, atom_b) + force_ab(:)
456
457 DEALLOCATE (oint, owork, sint)
458
459 END DO
460 CALL neighbor_list_iterator_release(nl_iterator)
461
462 DO i = 1, SIZE(matrix_h, 1)
463 DO img = 1, nimg
464 CALL dbcsr_finalize(matrix_h(i, img)%matrix)
465 CALL dbcsr_finalize(matrix_s(i, img)%matrix)
466 END DO
467 END DO
468 CALL dbcsr_deallocate_matrix_set(matrix_s)
469 CALL dbcsr_deallocate_matrix_set(matrix_h)
470
471 ! deallocate coordination numbers
472 CALL cnumber_release(cnumbers, dcnum, .true.)
473
474 ! deallocate Huckel parameters
475 DEALLOCATE (huckel, dhuckel)
476 ! deallocate KAB parameters
477 DEALLOCATE (kijab)
478
479 DEALLOCATE (basis_set_list)
480
481 CALL timestop(handle)
482
483 END SUBROUTINE build_xtb_hab_force
484
485END MODULE xtb_hab_force
486
Set of routines to: Contract integrals over primitive Gaussians Decontract (density) matrices Trace m...
Calculation of the overlap integrals over Cartesian Gaussian-type functions.
Definition ai_overlap.F:18
subroutine, public overlap_ab(la_max, la_min, npgfa, rpgfa, zeta, lb_max, lb_min, npgfb, rpgfb, zetb, rab, sab, dab, ddab)
Calculation of the two-center overlap integrals [a|b] over Cartesian Gaussian-type functions....
Definition ai_overlap.F:680
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.
collect pointers to a block of reals
Defines control structures, which contain the parameters and the settings for the DFT-based calculati...
subroutine, public dbcsr_get_block_p(matrix, row, col, block, found, row_size, col_size)
...
subroutine, public dbcsr_finalize(matrix)
...
DBCSR operations in CP2K.
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
Defines the basic variable types.
Definition kinds.F:23
integer, parameter, public dp
Definition kinds.F:34
Interface to the message passing library MPI.
Provides Cartesian and spherical orbital pointers and indices.
integer, dimension(:), allocatable, public ncoset
Define the data structure for the particle information.
Coordination number routines for dispersion pairpotentials.
subroutine, public cnumber_release(cnumbers, dcnum, derivatives)
...
subroutine, public cnumber_init(qs_env, cnumbers, dcnum, ftype, derivatives, disp_env)
...
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_pp, 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, harris_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, eeq, rhs)
Get the QUICKSTEP environment.
Some utility functions for the calculation of integrals.
subroutine, public basis_set_list_setup(basis_set_list, basis_type, qs_kind_set)
Set up an easy accessible list of the basis sets for all kinds.
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, zatom, 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_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_model_file, pao_potentials, pao_descriptors, nelec)
Get attributes of an atomic kind.
Define the neighbor list data types and the corresponding functionality.
subroutine, public neighbor_list_iterator_create(iterator_set, nl, search, nthread)
Neighbor list iterator functions.
subroutine, public neighbor_list_iterator_release(iterator_set)
...
integer function, public neighbor_list_iterate(iterator_set, mepos)
...
subroutine, public get_iterator_info(iterator_set, mepos, ikind, jkind, nkind, ilist, nlist, inode, nnode, iatom, jatom, r, cell)
...
Calculation of overlap matrix, its derivatives and forces.
Definition qs_overlap.F:19
Calculation of xTB Hamiltonian derivative Reference: Stefan Grimme, Christoph Bannwarth,...
subroutine, public build_xtb_hab_force(qs_env, p_matrix)
...
Calculation of EHT matrix elements in xTB Reference: Stefan Grimme, Christoph Bannwarth,...
Definition xtb_hcore.F:15
subroutine, public gfn1_kpair(qs_env, kijab)
...
Definition xtb_hcore.F:322
subroutine, public gfn1_huckel(qs_env, cnumbers, huckel, dhuckel, calculate_forces)
...
Definition xtb_hcore.F:122
Definition of the xTB parameter types.
Definition xtb_types.F:20
subroutine, public get_xtb_atom_param(xtb_parameter, symbol, aname, typ, defined, z, zeff, natorb, lmax, nao, lao, rcut, rcov, kx, eta, xgamma, alpha, zneff, nshell, nval, lval, kpoly, kappa, hen, zeta, xi, kappa0, alpg, occupation, electronegativity, chmax, en, kqat2, kcn, kq)
...
Definition xtb_types.F:199
Provides all information about an atomic kind.
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 ...