Octopus
vdw_ts.F90
Go to the documentation of this file.
1!! Copyright (C) 2015 X. Andrade, R. A. DiStasio Jr., B. Santra
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
26module vdw_ts_oct_m
27 use atom_oct_m
28 use debug_oct_m
29 use global_oct_m
31 use io_oct_m
33 use ions_oct_m
34 use, intrinsic :: iso_fortran_env
38 use mesh_oct_m
39 use mpi_oct_m
41 use parser_oct_m
43 use ps_oct_m
44 use space_oct_m
47 use unit_oct_m
49
50 implicit none
51
52 private
53
54 public :: &
55 vdw_ts_t, &
57 vdw_ts_end, &
61
62 type vdw_ts_t
63 private
64 real(real64), allocatable :: c6free(:)
65 real(real64), allocatable :: dpfree(:)
66 real(real64), allocatable :: r0free(:)
67 real(real64), allocatable :: c6abfree(:, :)
68 real(real64), allocatable :: volfree(:)
69 real(real64), allocatable :: c6ab(:, :)
70 real(real64) :: cutoff
71 real(real64) :: damping
72 real(real64) :: sr
73
74 real(real64), allocatable :: derivative_coeff(:)
75 end type vdw_ts_t
76
77contains
78
79 subroutine vdw_ts_init(this, namespace, ions)
80 type(vdw_ts_t), intent(out) :: this
81 type(namespace_t), intent(in) :: namespace
82 type(ions_t), intent(in) :: ions
83
84 integer :: ispecies, jspecies
85 real(real64) :: num, den
86
87 push_sub(vdw_ts_init)
88
89 !%Variable VDW_TS_cutoff
90 !%Type float
91 !%Default 10.0
92 !%Section Hamiltonian::XC
93 !%Description
94 !% Set the value of the cutoff (unit of length) for the VDW correction in periodic system
95 !% in the Tkatchenko and Scheffler (vdw_ts) scheme only.
96 !%End
97 call parse_variable(namespace, 'VDW_TS_cutoff', 10.0_real64, this%cutoff, units_inp%length)
98
99
100 !%Variable VDW_TS_damping
101 !%Type float
102 !%Default 20.0
103 !%Section Hamiltonian::XC
104 !%Description
105 !% Set the value of the damping function (in unit of 1/length) steepness for the VDW correction in the
106 !% Tkatchenko-Scheffler scheme. See Equation (12) of Phys. Rev. Lett. 102 073005 (2009).
107 !%End
108 call parse_variable(namespace, 'VDW_TS_damping', 20.0_real64, this%damping, units_inp%length**(-1))
109
110 !%Variable VDW_TS_sr
111 !%Type float
112 !%Default 0.94
113 !%Section Hamiltonian::XC
114 !%Description
115 !% Set the value of the sr parameter in the damping function of the VDW correction in the
116 !% Tkatchenko-Scheffler scheme. See Equation (12) of Phys. Rev. Lett. 102 073005 (2009).
117 !% This parameter depends on the xc functional used.
118 !% The default value is 0.94, which holds for PBE. For PBE0, a value of 0.96 should be used.
119 !%End
120 call parse_variable(namespace, 'VDW_TS_sr', 0.94_real64, this%sr)
121
122
123 safe_allocate(this%c6free(1:ions%nspecies))
124 safe_allocate(this%dpfree(1:ions%nspecies))
125 safe_allocate(this%r0free(1:ions%nspecies))
126 safe_allocate(this%volfree(1:ions%nspecies))
127 safe_allocate(this%c6abfree(1:ions%nspecies, 1:ions%nspecies))
128 safe_allocate(this%c6ab(1:ions%natoms, 1:ions%natoms))
129 safe_allocate(this%derivative_coeff(1:ions%natoms))
130
131 do ispecies = 1, ions%nspecies
132 call get_vdw_param(namespace, ions%species(ispecies)%s%get_label(), &
133 this%c6free(ispecies), this%dpfree(ispecies), this%r0free(ispecies))
134 select type(spec=>ions%species(ispecies)%s)
135 type is(pseudopotential_t)
136 this%volfree(ispecies) = ps_density_volume(spec%ps, namespace)
137 class default
138 assert(.false.)
139 end select
140 end do
141
142 do ispecies = 1, ions%nspecies
143 do jspecies = 1, ions%nspecies
144 num = m_two*this%c6free(ispecies)*this%c6free(jspecies)
145 den = (this%dpfree(jspecies)/this%dpfree(ispecies))*this%c6free(ispecies) &
146 + (this%dpfree(ispecies)/this%dpfree(jspecies))*this%c6free(jspecies)
147 this%c6abfree(ispecies, jspecies) = num/den
148 end do
149 end do
150 pop_sub(vdw_ts_init)
151 end subroutine vdw_ts_init
152
153 !------------------------------------------
154
155 subroutine vdw_ts_end(this)
156 type(vdw_ts_t), intent(inout) :: this
158 push_sub(vdw_ts_end)
160 safe_deallocate_a(this%c6free)
161 safe_deallocate_a(this%dpfree)
162 safe_deallocate_a(this%r0free)
163 safe_deallocate_a(this%volfree)
164 safe_deallocate_a(this%c6abfree)
165 safe_deallocate_a(this%c6ab)
166 safe_deallocate_a(this%derivative_coeff)
168 pop_sub(vdw_ts_end)
169 end subroutine vdw_ts_end
170
171 !------------------------------------------
173 subroutine vdw_ts_calculate(this, namespace, space, latt, atom, natoms, pos, mesh, nspin, density, energy, potential, force)
174 type(vdw_ts_t), intent(inout) :: this
175 type(namespace_t), intent(in) :: namespace
176 class(space_t), intent(in) :: space
177 type(lattice_vectors_t), intent(in) :: latt
178 type(atom_t), intent(in) :: atom(:)
179 integer, intent(in) :: natoms
180 real(real64), intent(in) :: pos(1:space%dim,1:natoms)
181 class(mesh_t), intent(in) :: mesh
182 integer, intent(in) :: nspin
183 real(real64), intent(in) :: density(:, :)
184 real(real64), intent(out) :: energy
185 real(real64), contiguous, intent(out) :: potential(:)
186 real(real64), intent(out) :: force(:, :)
187
188 interface
189 subroutine f90_vdw_calculate(natoms, dd, sr, zatom, coordinates, vol_ratio, &
190 energy, force, derivative_coeff)
191 use, intrinsic :: iso_fortran_env
192 implicit none
193 integer, intent(in) :: natoms
194 real(real64), intent(in) :: dd
195 real(real64), intent(in) :: sr
196 integer, intent(in) :: zatom
197 real(real64), intent(in) :: coordinates
198 real(real64), intent(in) :: vol_ratio
199 real(real64), intent(out) :: energy
200 real(real64), intent(out) :: force
201 real(real64), intent(out) :: derivative_coeff
202 end subroutine f90_vdw_calculate
203 end interface
204
205 type(lattice_iterator_t) :: latt_iter
206 integer :: iatom, jatom, ispecies, jspecies, jcopy, ip
207 real(real64) :: rr, rr6, dffdr0, ee, ff, dee, dffdrab, dffdvra, deabdvra
208 real(real64), allocatable :: coordinates(:,:), vol_ratio(:), dvadens(:), dvadrr(:), &
209 dr0dvra(:), r0ab(:,:)
210 type(hirshfeld_t) :: hirshfeld
211 integer, allocatable :: zatom(:)
212 real(real64) :: x_j(space%dim)
213
214 push_sub(vdw_ts_calculate)
215
216 safe_allocate(vol_ratio(1:natoms))
217 safe_allocate(dvadens(1:mesh%np))
218 safe_allocate(dvadrr(1:3))
219 safe_allocate(dr0dvra(1:natoms))
220
221 energy=m_zero
222 force(1:space%dim, 1:natoms) = m_zero
223 this%derivative_coeff(1:natoms) = m_zero
224 call hirshfeld_init(hirshfeld, mesh, namespace, space, latt, atom, natoms, pos, nspin)
225
226 do iatom = 1, natoms
227 call hirshfeld_volume_ratio(hirshfeld, iatom, density, vol_ratio(iatom))
228 end do
229
230 do iatom = 1, natoms
231 ispecies = atom(iatom)%species%get_index()
232 dr0dvra(iatom) = this%r0free(ispecies)/(m_three*(vol_ratio(iatom)**(m_two/m_three)))
233 do jatom = 1, natoms
234 jspecies = atom(jatom)%species%get_index()
235 !the next operation is done again inside the .c part for the non periodic case
236 this%c6ab(iatom,jatom) = vol_ratio(iatom)*vol_ratio(jatom)*this%c6abfree(ispecies,jspecies)
237 end do
238 end do
239
240 if (space%is_periodic()) then ! periodic case
241 safe_allocate(r0ab(1:natoms,1:natoms))
242
243 !Precomputing some quantities
244 do iatom = 1, natoms
245 ispecies = atom(iatom)%species%get_index()
246 do jatom = 1, natoms
247 jspecies = atom(jatom)%species%get_index()
249 r0ab(iatom,jatom) = (vol_ratio(iatom)**(m_one/m_three))*this%r0free(ispecies) &
250 + (vol_ratio(jatom)**(m_one/m_three))*this%r0free(jspecies)
251 end do
252 end do
253
254 latt_iter = lattice_iterator_t(latt, this%cutoff)
255 do jatom = 1, natoms
256 jspecies = atom(jatom)%species%get_index()
257
258 do jcopy = 1, latt_iter%n_cells ! one of the periodic copy is the initial atom
259 x_j = pos(:, jatom) + latt_iter%get(jcopy)
260
261 do iatom = 1, natoms
262 ispecies = atom(iatom)%species%get_index()
263 rr = norm2(x_j - pos(:, iatom))
264 rr6 = rr**6
265
266 if (rr < 1.0e-10_real64) cycle !To avoid self interaction
267
268 ee = exp(-this%damping * ((rr / (this%sr*r0ab(iatom, jatom))) - m_one))
269 ff = m_one/(m_one + ee)
270 dee = ee*ff**2
271
272 !Calculate the derivative of the damping function with respect to the distance between atoms A and B.
273 dffdrab = (this%damping/(this%sr*r0ab(iatom, jatom)))*dee
274 !Calculate the derivative of the damping function with respect to the distance between the van der Waals radius.
275 dffdr0 = -this%damping*rr/(this%sr*r0ab(iatom, jatom)**2)*dee
276
277 energy = energy - m_half*ff*this%c6ab(iatom, jatom)/rr6
278
279 ! Derivative of the damping function with respecto to the volume ratio of atom A.
280 dffdvra = dffdr0*dr0dvra(iatom)
281
282 ! Calculation of the pair-wise partial energy derivative with respect to the volume ratio of atom A.
283 deabdvra = (dffdvra*this%c6ab(iatom, jatom) + ff*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies))/rr6
284
285 this%derivative_coeff(iatom) = this%derivative_coeff(iatom) + deabdvra
286
287 end do
288 end do
289 end do
290
291 safe_deallocate_a(r0ab)
292 else ! Non periodic case
293 safe_allocate(coordinates(1:space%dim, 1:natoms))
294 safe_allocate(zatom(1:natoms))
295
296 do iatom = 1, natoms
297 coordinates(:, iatom) = pos(:, iatom)
298 zatom(iatom) = int(atom(iatom)%species%get_z())
299
300 end do
301
302 call f90_vdw_calculate(natoms, this%damping, this%sr, zatom(1), coordinates(1, 1), &
303 vol_ratio(1), energy, force(1, 1), this%derivative_coeff(1))
304
305
306 safe_deallocate_a(coordinates)
307 safe_deallocate_a(zatom)
308 end if
309
310 ! Calculate the potential
311 potential = m_zero
312 do iatom = 1, natoms
313 call hirshfeld_density_derivative(hirshfeld, iatom, dvadens)
314 call lalg_axpy(mesh%np, -this%derivative_coeff(iatom), dvadens, potential)
315 end do
316
317 if (debug%info) then
318 call dio_function_output(1_8, "./", "vvdw", namespace, space, mesh, potential, unit_one, ip)
319 end if
320
321 call hirshfeld_end(hirshfeld)
322
323 safe_deallocate_a(vol_ratio)
324 safe_deallocate_a(dvadens)
325 safe_deallocate_a(dvadrr)
326 safe_deallocate_a(dr0dvra)
327
328 pop_sub(vdw_ts_calculate)
329 end subroutine vdw_ts_calculate
330
331
332
333 !------------------------------------------
334 subroutine vdw_ts_force_calculate(this, force_vdw, ions, mesh, nspin, density)
335 type(vdw_ts_t), intent(in) :: this
336 type(ions_t), intent(in) :: ions
337 real(real64), intent(inout) :: force_vdw(1:ions%space%dim, 1:ions%natoms)
338 class(mesh_t), intent(in) :: mesh
339 integer, intent(in) :: nspin
340 real(real64), intent(in) :: density(:, :)
341
342 type(hirshfeld_t) :: hirshfeld
343 type(lattice_iterator_t) :: latt_iter
344
345 integer :: iatom, jatom, ispecies, jspecies, jcopy
346 real(real64) :: rr, rr6, dffdr0, ee, ff, dee, dffdvra, deabdvra, deabdrab, x_j(ions%space%dim)
347 real(real64), allocatable :: vol_ratio(:), dvadrr(:), dr0dvra(:), r0ab(:,:), derivative_coeff(:), c6ab(:,:)
348
349 push_sub(vdw_ts_force_calculate)
350
351 call profiling_in("FORCE_VDW_TS")
352
353 safe_allocate(vol_ratio(1:ions%natoms))
354 safe_allocate(dvadrr(1:3))
355 safe_allocate(dr0dvra(1:ions%natoms))
356 safe_allocate(r0ab(1:ions%natoms,1:ions%natoms))
357 safe_allocate(derivative_coeff(1:ions%natoms))
358 safe_allocate(c6ab(1:ions%natoms,1:ions%natoms))
359
360
361 force_vdw(1:ions%space%dim, 1:ions%natoms) = m_zero
362 derivative_coeff(1:ions%natoms) = m_zero
363 c6ab(1:ions%natoms,1:ions%natoms) = m_zero
364 r0ab(1:ions%natoms,1:ions%natoms) = m_zero
365 dr0dvra(1:ions%natoms) = m_zero
366 dvadrr(1:ions%space%dim) = m_zero
367 vol_ratio(1:ions%natoms) = m_zero
368
369
370 call hirshfeld_init(hirshfeld, mesh, ions%namespace, ions%space, ions%latt, ions%atom, ions%natoms, ions%pos, nspin)
371
372
373 do iatom = 1, ions%natoms
374 call hirshfeld_volume_ratio(hirshfeld, iatom, density, vol_ratio(iatom))
375 end do
376
377 do iatom = 1, ions%natoms
378 ispecies = ions%atom(iatom)%species%get_index()
379 dr0dvra(iatom) = this%r0free(ispecies)/(m_three*(vol_ratio(iatom)**(m_two/m_three)))
380 do jatom = 1, ions%natoms
381 jspecies = ions%atom(jatom)%species%get_index()
382 c6ab(iatom, jatom) = vol_ratio(iatom)*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies)
383 end do
384 end do
385
386 !Precomputing some quantities
387 do iatom = 1, ions%natoms
388 ispecies = ions%atom(iatom)%species%get_index()
389 do jatom = iatom, ions%natoms
390 jspecies = ions%atom(jatom)%species%get_index()
391
392 r0ab(iatom, jatom) = (vol_ratio(iatom)**(m_one/m_three))*this%r0free(ispecies) &
393 + (vol_ratio(jatom)**(m_one/m_three))*this%r0free(jspecies)
394 if (iatom /= jatom) r0ab(jatom, iatom) = r0ab(iatom, jatom)
395 end do
396 end do
397
398 latt_iter = lattice_iterator_t(ions%latt, this%cutoff)
399 do jatom = 1, ions%natoms
400 jspecies = ions%atom(jatom)%species%get_index()
401
402 do jcopy = 1, latt_iter%n_cells ! one of the periodic copy is the initial atom
403 x_j = ions%pos(:, jatom) + latt_iter%get(jcopy)
404 do iatom = 1, ions%natoms
405 ispecies = ions%atom(iatom)%species%get_index()
406 rr = norm2(x_j - ions%pos(:, iatom))
407 rr6 = rr**6
408
409 if (rr < tol_hirshfeld) cycle !To avoid self interaction
410
411 ee = exp(-this%damping*(rr/(this%sr*r0ab(iatom, jatom)) - m_one))
412 ff = m_one/(m_one + ee)
413 dee = ee*ff**2
414 !Calculate the derivative of the damping function with respect to the van der Waals radius.
415 dffdr0 = -this%damping*rr/( this%sr*r0ab(iatom, jatom)**2)*dee
416 ! Calculation of the pair-wise partial energy derivative with respect to the distance between atoms A and B.
417 deabdrab = c6ab(iatom,jatom)*(this%damping/(this%sr*r0ab(iatom, jatom))*dee - 6.0_real64*ff/rr)/rr6
418 ! Derivative of the damping function with respecto to the volume ratio of atom A.
419 dffdvra = dffdr0*dr0dvra(iatom)
420 ! Calculation of the pair-wise partial energy derivative with respect to the volume ratio of atom A.
421 deabdvra = (dffdvra*c6ab(iatom, jatom) + ff*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies))/rr6
422 !Summing for using later
423 derivative_coeff(iatom) = derivative_coeff(iatom) + deabdvra
424
425 ! Calculation of the pair-wise partial energy derivative with respect to the distance between atoms A and B.
426 deabdrab = c6ab(iatom, jatom)*(this%damping/(this%sr*r0ab(iatom, jatom))*dee - 6.0_real64*ff/rr)/rr6
427 force_vdw(:, iatom) = force_vdw(:, iatom) + m_half*deabdrab*(ions%pos(:, iatom) - x_j)/rr
428 end do
429 end do
430 end do
431
432 do iatom = 1, ions%natoms
433 do jatom = 1, ions%natoms
434 ! dvadrr_ij = \frac{\delta V_i}{\delta \vec{x_j}}
435 call hirshfeld_position_derivative(hirshfeld, ions%space, iatom, jatom, density, dvadrr)
436 ! ions%atom(jatom)%f_vdw = sum_i coeff_i * dvadrr_ij
437 force_vdw(:, jatom)= force_vdw(:, jatom) + derivative_coeff(iatom)*dvadrr
438 end do
439 end do
440
441 call hirshfeld_end(hirshfeld)
442
443 safe_deallocate_a(vol_ratio)
444 safe_deallocate_a(dvadrr)
445 safe_deallocate_a(dr0dvra)
446 safe_deallocate_a(r0ab)
447 safe_deallocate_a(derivative_coeff)
448 safe_deallocate_a(c6ab)
449
450 call profiling_out("FORCE_VDW_TS")
451
453 end subroutine vdw_ts_force_calculate
454
455 !------------------------------------------
456
457 subroutine vdw_ts_write_c6ab(this, ions, dir, fname, namespace)
458 type(vdw_ts_t) , intent(inout) :: this
459 type(ions_t), intent(in) :: ions
460 character(len=*), intent(in) :: dir, fname
461 type(namespace_t), intent(in) :: namespace
462
463 integer :: iunit, iatom, jatom
464
465 push_sub(vdw_ts_write_c6ab)
466
467 if (mpi_grp_is_root(mpi_world)) then
468 call io_mkdir(dir, namespace)
469 iunit = io_open(trim(dir) // "/" // trim(fname), namespace, action='write')
470 write(iunit, '(a)') ' # Atom1 Atom2 C6_{12}^{eff}'
471
472
473 do iatom = 1, ions%natoms
474 do jatom = 1, ions%natoms
475 write(iunit, '(3x, i5, i5, e15.6)') iatom, jatom, this%c6ab(iatom, jatom)
476 end do
477 end do
478 call io_close(iunit)
479 end if
480 pop_sub(vdw_ts_write_c6ab)
481
482 end subroutine vdw_ts_write_c6ab
483
484
485
486
487 !------------------------------------------
488
489 subroutine get_vdw_param(namespace, atom, c6, alpha, r0)
490 type(namespace_t), intent(in) :: namespace
491 character(len=*), intent(in) :: atom
492 real(real64), intent(out) :: c6
493 real(real64), intent(out) :: alpha
494 real(real64), intent(out) :: r0
495
496 push_sub(get_vdw_param)
497
498 select case (trim(atom))
499
500 case ('H')
501 alpha = 4.500000_real64
502 c6 = 6.500000_real64
503 r0 = 3.100000_real64
504
505 case ('He')
506 alpha = 1.380000_real64
507 c6 = 1.460000_real64
508 r0 = 2.650000_real64
509
510 case ('Li')
511 alpha = 164.200000_real64
512 c6 = 1387.000000_real64
513 r0 = 4.160000_real64
514
515 case ('Be')
516 alpha = 38.000000_real64
517 c6 = 214.000000_real64
518 r0 = 4.170000_real64
519
520 case ('B')
521 alpha = 21.000000_real64
522 c6 = 99.500000_real64
523 r0 = 3.890000_real64
524
525 case ('C')
526 alpha = 12.000000_real64
527 c6 = 46.600000_real64
528 r0 = 3.590000_real64
529
530 case ('N')
531 alpha = 7.400000_real64
532 c6 = 24.200000_real64
533 r0 = 3.340000_real64
534
535 case ('O')
536 alpha = 5.400000_real64
537 c6 = 15.600000_real64
538 r0 = 3.190000_real64
539
540 case ('F')
541 alpha = 3.800000_real64
542 c6 = 9.520000_real64
543 r0 = 3.040000_real64
544
545 case ('Ne')
546 alpha = 2.670000_real64
547 c6 = 6.380000_real64
548 r0 = 2.910000_real64
549
550 case ('Na')
551 alpha = 162.700000_real64
552 c6 = 1556.000000_real64
553 r0 = 3.730000_real64
554
555 case ('Mg')
556 alpha = 71.000000_real64
557 c6 = 627.000000_real64
558 r0 = 4.270000_real64
559
560 case ('Al')
561 alpha = 60.000000_real64
562 c6 = 528.000000_real64
563 r0 = 4.330000_real64
564
565 case ('Si')
566 alpha = 37.000000_real64
567 c6 = 305.000000_real64
568 r0 = 4.200000_real64
569
570 case ('P')
571 alpha = 25.000000_real64
572 c6 = 185.000000_real64
573 r0 = 4.010000_real64
574
575 case ('S')
576 alpha = 19.600000_real64
577 c6 = 134.000000_real64
578 r0 = 3.860000_real64
579
580 case ('Cl')
581 alpha = 15.000000_real64
582 c6 = 94.600000_real64
583 r0 = 3.710000_real64
584
585 case ('Ar')
586 alpha = 11.100000_real64
587 c6 = 64.300000_real64
588 r0 = 3.550000_real64
589
590 case ('K')
591 alpha = 292.900000_real64
592 c6 = 3897.000000_real64
593 r0 = 3.710000_real64
594
595 case ('Ca')
596 alpha = 160.000000_real64
597 c6 = 2221.000000_real64
598 r0 = 4.650000_real64
599
600 case ('Sc')
601 alpha = 120.000000_real64
602 c6 = 1383.000000_real64
603 r0 = 4.590000_real64
604
605 case ('Ti')
606 alpha = 98.000000_real64
607 c6 = 1044.000000_real64
608 r0 = 4.510000_real64
609
610 case ('V')
611 alpha = 84.000000_real64
612 c6 = 832.000000_real64
613 r0 = 4.440000_real64
614
615 case ('Cr')
616 alpha = 78.000000_real64
617 c6 = 602.000000_real64
618 r0 = 3.990000_real64
619
620 case ('Mn')
621 alpha = 63.000000_real64
622 c6 = 552.000000_real64
623 r0 = 3.970000_real64
624
625 case ('Fe')
626 alpha = 56.000000_real64
627 c6 = 482.000000_real64
628 r0 = 4.230000_real64
629
630 case ('Co')
631 alpha = 50.000000_real64
632 c6 = 408.000000_real64
633 r0 = 4.180000_real64
634
635 case ('Ni')
636 alpha = 48.000000_real64
637 c6 = 373.000000_real64
638 r0 = 3.820000_real64
639
640 case ('Cu')
641 alpha = 42.000000_real64
642 c6 = 253.000000_real64
643 r0 = 3.760000_real64
644
645 case ('Zn')
646 alpha = 40.000000_real64
647 c6 = 284.000000_real64
648 r0 = 4.020000_real64
649
650 case ('Ga')
651 alpha = 60.000000_real64
652 c6 = 498.000000_real64
653 r0 = 4.190000_real64
654
655 case ('Ge')
656 alpha = 41.000000_real64
657 c6 = 354.000000_real64
658 r0 = 4.200000_real64
659
660 case ('As')
661 alpha = 29.000000_real64
662 c6 = 246.000000_real64
663 r0 = 4.110000_real64
664
665 case ('Se')
666 alpha = 25.000000_real64
667 c6 = 210.000000_real64
668 r0 = 4.040000_real64
669
670 case ('Br')
671 alpha = 20.000000_real64
672 c6 = 162.000000_real64
673 r0 = 3.930000_real64
674
675 case ('Kr')
676 alpha = 16.800000_real64
677 c6 = 129.600000_real64
678 r0 = 3.820000_real64
679
680 case ('Rb')
681 alpha = 319.200000_real64
682 c6 = 4691.000000_real64
683 r0 = 3.720000_real64
684
685 case ('Sr')
686 alpha = 199.000000_real64
687 c6 = 3170.000000_real64
688 r0 = 4.540000_real64
689
690 case ('Rh')
691 alpha = 56.1_real64
692 c6 = 469.0_real64
693 r0 = 3.95_real64
694
695 case ('Pd')
696 alpha = 23.680000_real64
697 c6 = 157.500000_real64
698 r0 = 3.66000_real64
699
700 case ('Ag')
701 alpha = 50.600000_real64
702 c6 = 339.000000_real64
703 r0 = 3.820000_real64
704
705 case ('Cd')
706 alpha = 39.7_real64
707 c6 = 452.0_real64
708 r0 = 3.99_real64
709
710 case ('Te')
711 alpha = 37.65_real64
712 c6 = 396.0_real64
713 r0 = 4.22_real64
714
715 case ('I')
716 alpha = 35.000000_real64
717 c6 = 385.000000_real64
718 r0 = 4.170000_real64
719
720 case ('Xe')
721 alpha = 27.300000_real64
722 c6 = 285.900000_real64
723 r0 = 4.080000_real64
724
725 case ('Ba')
726 alpha = 275.0_real64
727 c6 = 5727.0_real64
728 r0 = 4.77_real64
729
730 case ('Ir')
731 alpha = 42.51_real64
732 c6 = 359.1_real64
733 r0 = 4.00_real64
734
735 case ('Pt')
736 alpha = 39.68_real64
737 c6 = 347.1_real64
738 r0 = 3.92_real64
739
740 case ('Au')
741 alpha = 36.5_real64
742 c6 = 298.0_real64
743 r0 = 3.86_real64
744
745 case ('Hg')
746 alpha = 33.9_real64
747 c6 = 392.0_real64
748 r0 = 3.98_real64
749
750 case ('Pb')
751 alpha = 61.8_real64
752 c6 = 697.0_real64
753 r0 = 4.31_real64
754
755 case ('Bi')
756 alpha = 49.02_real64
757 c6 = 571.0_real64
758 r0 = 4.32_real64
759
760 case default
761
762 call messages_write('vdw ts: reference free atom parameters not available for species '//trim(atom))
763 call messages_fatal(namespace=namespace)
764
765 end select
766
767 pop_sub(get_vdw_param)
768 end subroutine get_vdw_param
769
770end module vdw_ts_oct_m
771
772!! Local Variables:
773!! mode: f90
774!! coding: utf-8
775!! End:
constant times a vector plus a vector
Definition: lalg_basic.F90:171
double exp(double __x) __attribute__((__nothrow__
type(debug_t), save, public debug
Definition: debug.F90:156
real(real64), parameter, public m_two
Definition: global.F90:190
real(real64), parameter, public m_zero
Definition: global.F90:188
real(real64), parameter, public m_half
Definition: global.F90:194
real(real64), parameter, public m_one
Definition: global.F90:189
real(real64), parameter, public m_three
Definition: global.F90:191
subroutine, public hirshfeld_init(this, mesh, namespace, space, latt, atom, natoms, pos, nspin)
Definition: hirshfeld.F90:166
real(real64), parameter, public tol_hirshfeld
Definition: hirshfeld.F90:161
subroutine, public hirshfeld_end(this)
Definition: hirshfeld.F90:258
subroutine, public hirshfeld_density_derivative(this, iatom, ddensity)
Definition: hirshfeld.F90:360
subroutine, public hirshfeld_position_derivative(this, space, iatom, jatom, density, dposition)
Definition: hirshfeld.F90:392
subroutine, public hirshfeld_volume_ratio(this, iatom, density, volume_ratio)
Definition: hirshfeld.F90:322
subroutine, public dio_function_output(how, dir, fname, namespace, space, mesh, ff, unit, ierr, pos, atoms, grp, root)
Top-level IO routine for functions defined on the mesh.
Definition: io.F90:114
subroutine, public io_close(iunit, grp)
Definition: io.F90:418
subroutine, public io_mkdir(fname, namespace, parents)
Definition: io.F90:311
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
Definition: io.F90:352
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
Definition: messages.F90:414
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
Definition: mpi.F90:434
type(mpi_grp_t), public mpi_world
Definition: mpi.F90:270
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
Definition: profiling.F90:623
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
Definition: profiling.F90:552
Definition: ps.F90:114
real(real64) function, public ps_density_volume(ps, namespace)
Definition: ps.F90:1662
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:132
This module defines the unit system, used for input and output.
type(unit_system_t), public units_inp
the units systems for reading and writing
type(unit_t), public unit_one
some special units required for particular quantities
Tkatchenko-Scheffler pairwise method for van der Waals (vdW, dispersion) interactions.
Definition: vdw_ts.F90:119
subroutine, public vdw_ts_init(this, namespace, ions)
Definition: vdw_ts.F90:173
subroutine, public vdw_ts_calculate(this, namespace, space, latt, atom, natoms, pos, mesh, nspin, density, energy, potential, force)
Calculate the potential for the Tatchenko-Scheffler vdW correction as described in Phys....
Definition: vdw_ts.F90:267
subroutine, public vdw_ts_write_c6ab(this, ions, dir, fname, namespace)
Definition: vdw_ts.F90:551
subroutine get_vdw_param(namespace, atom, c6, alpha, r0)
Definition: vdw_ts.F90:583
subroutine, public vdw_ts_force_calculate(this, force_vdw, ions, mesh, nspin, density)
Definition: vdw_ts.F90:428
subroutine, public vdw_ts_end(this)
Definition: vdw_ts.F90:249
The following class implements a lattice iterator. It allows one to loop over all cells that are with...
Describes mesh distribution to nodes.
Definition: mesh.F90:186