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 this%c6ab(iatom,jatom) = vol_ratio(iatom)*vol_ratio(jatom)*this%c6abfree(ispecies,jspecies) !this operation is done again inside the .c part for the non periodic case
236 end do
237 end do
238
239 if (space%is_periodic()) then ! periodic case
240 safe_allocate(r0ab(1:natoms,1:natoms))
241
242 !Precomputing some quantities
243 do iatom = 1, natoms
244 ispecies = atom(iatom)%species%get_index()
245 do jatom = 1, natoms
246 jspecies = atom(jatom)%species%get_index()
247
248 r0ab(iatom,jatom) = (vol_ratio(iatom)**(m_one/m_three))*this%r0free(ispecies) &
249 + (vol_ratio(jatom)**(m_one/m_three))*this%r0free(jspecies)
250 end do
251 end do
252
253 latt_iter = lattice_iterator_t(latt, this%cutoff)
254 do jatom = 1, natoms
255 jspecies = atom(jatom)%species%get_index()
256
257 do jcopy = 1, latt_iter%n_cells ! one of the periodic copy is the initial atom
258 x_j = pos(:, jatom) + latt_iter%get(jcopy)
259
260 do iatom = 1, natoms
261 ispecies = atom(iatom)%species%get_index()
262 rr = norm2(x_j - pos(:, iatom))
263 rr6 = rr**6
264
265 if (rr < 1.0e-10_real64) cycle !To avoid self interaction
267 ee = exp(-this%damping * ((rr / (this%sr*r0ab(iatom, jatom))) - m_one))
268 ff = m_one/(m_one + ee)
269 dee = ee*ff**2
270
271 !Calculate the derivative of the damping function with respect to the distance between atoms A and B.
272 dffdrab = (this%damping/(this%sr*r0ab(iatom, jatom)))*dee
273 !Calculate the derivative of the damping function with respect to the distance between the van der Waals radius.
274 dffdr0 = -this%damping*rr/(this%sr*r0ab(iatom, jatom)**2)*dee
275
276 energy = energy - m_half*ff*this%c6ab(iatom, jatom)/rr6
277
278 ! Derivative of the damping function with respecto to the volume ratio of atom A.
279 dffdvra = dffdr0*dr0dvra(iatom)
280
281 ! Calculation of the pair-wise partial energy derivative with respect to the volume ratio of atom A.
282 deabdvra = (dffdvra*this%c6ab(iatom, jatom) + ff*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies))/rr6
283
284 this%derivative_coeff(iatom) = this%derivative_coeff(iatom) + deabdvra
285
286 end do
287 end do
288 end do
289
290 safe_deallocate_a(r0ab)
291 else ! Non periodic case
292 safe_allocate(coordinates(1:space%dim, 1:natoms))
293 safe_allocate(zatom(1:natoms))
294
295 do iatom = 1, natoms
296 coordinates(:, iatom) = pos(:, iatom)
297 zatom(iatom) = int(atom(iatom)%species%get_z())
298
299 end do
300
301 call f90_vdw_calculate(natoms, this%damping, this%sr, zatom(1), coordinates(1, 1), &
302 vol_ratio(1), energy, force(1, 1), this%derivative_coeff(1))
303
304
305 safe_deallocate_a(coordinates)
306 safe_deallocate_a(zatom)
307 end if
308
309 ! Calculate the potential
310 potential = m_zero
311 do iatom = 1, natoms
312 call hirshfeld_density_derivative(hirshfeld, iatom, dvadens)
313 call lalg_axpy(mesh%np, -this%derivative_coeff(iatom), dvadens, potential)
314 end do
315
316 if (debug%info) then
317 call dio_function_output(1_8, "./", "vvdw", namespace, space, mesh, potential, unit_one, ip)
318 end if
319
320 call hirshfeld_end(hirshfeld)
321
322 safe_deallocate_a(vol_ratio)
323 safe_deallocate_a(dvadens)
324 safe_deallocate_a(dvadrr)
325 safe_deallocate_a(dr0dvra)
326
327 pop_sub(vdw_ts_calculate)
328 end subroutine vdw_ts_calculate
329
330
331
332 !------------------------------------------
333 subroutine vdw_ts_force_calculate(this, force_vdw, ions, mesh, nspin, density)
334 type(vdw_ts_t), intent(in) :: this
335 type(ions_t), intent(in) :: ions
336 real(real64), intent(inout) :: force_vdw(1:ions%space%dim, 1:ions%natoms)
337 class(mesh_t), intent(in) :: mesh
338 integer, intent(in) :: nspin
339 real(real64), intent(in) :: density(:, :)
340
341 type(hirshfeld_t) :: hirshfeld
342 type(lattice_iterator_t) :: latt_iter
343
344 integer :: iatom, jatom, ispecies, jspecies, jcopy
345 real(real64) :: rr, rr6, dffdr0, ee, ff, dee, dffdvra, deabdvra, deabdrab, x_j(ions%space%dim)
346 real(real64), allocatable :: vol_ratio(:), dvadrr(:), dr0dvra(:), r0ab(:,:), derivative_coeff(:), c6ab(:,:)
347
348 push_sub(vdw_ts_force_calculate)
349
350 call profiling_in("FORCE_VDW_TS")
351
352 safe_allocate(vol_ratio(1:ions%natoms))
353 safe_allocate(dvadrr(1:3))
354 safe_allocate(dr0dvra(1:ions%natoms))
355 safe_allocate(r0ab(1:ions%natoms,1:ions%natoms))
356 safe_allocate(derivative_coeff(1:ions%natoms))
357 safe_allocate(c6ab(1:ions%natoms,1:ions%natoms))
358
359
360 force_vdw(1:ions%space%dim, 1:ions%natoms) = m_zero
361 derivative_coeff(1:ions%natoms) = m_zero
362 c6ab(1:ions%natoms,1:ions%natoms) = m_zero
363 r0ab(1:ions%natoms,1:ions%natoms) = m_zero
364 dr0dvra(1:ions%natoms) = m_zero
365 dvadrr(1:ions%space%dim) = m_zero
366 vol_ratio(1:ions%natoms) = m_zero
367
368
369 call hirshfeld_init(hirshfeld, mesh, ions%namespace, ions%space, ions%latt, ions%atom, ions%natoms, ions%pos, nspin)
370
371
372 do iatom = 1, ions%natoms
373 call hirshfeld_volume_ratio(hirshfeld, iatom, density, vol_ratio(iatom))
374 end do
375
376 do iatom = 1, ions%natoms
377 ispecies = ions%atom(iatom)%species%get_index()
378 dr0dvra(iatom) = this%r0free(ispecies)/(m_three*(vol_ratio(iatom)**(m_two/m_three)))
379 do jatom = 1, ions%natoms
380 jspecies = ions%atom(jatom)%species%get_index()
381 c6ab(iatom, jatom) = vol_ratio(iatom)*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies)
382 end do
383 end do
384
385 !Precomputing some quantities
386 do iatom = 1, ions%natoms
387 ispecies = ions%atom(iatom)%species%get_index()
388 do jatom = iatom, ions%natoms
389 jspecies = ions%atom(jatom)%species%get_index()
390
391 r0ab(iatom, jatom) = (vol_ratio(iatom)**(m_one/m_three))*this%r0free(ispecies) &
392 + (vol_ratio(jatom)**(m_one/m_three))*this%r0free(jspecies)
393 if (iatom /= jatom) r0ab(jatom, iatom) = r0ab(iatom, jatom)
394 end do
395 end do
396
397 latt_iter = lattice_iterator_t(ions%latt, this%cutoff)
398 do jatom = 1, ions%natoms
399 jspecies = ions%atom(jatom)%species%get_index()
400
401 do jcopy = 1, latt_iter%n_cells ! one of the periodic copy is the initial atom
402 x_j = ions%pos(:, jatom) + latt_iter%get(jcopy)
403 do iatom = 1, ions%natoms
404 ispecies = ions%atom(iatom)%species%get_index()
405 rr = norm2(x_j - ions%pos(:, iatom))
406 rr6 = rr**6
407
408 if (rr < tol_hirshfeld) cycle !To avoid self interaction
409
410 ee = exp(-this%damping*(rr/(this%sr*r0ab(iatom, jatom)) - m_one))
411 ff = m_one/(m_one + ee)
412 dee = ee*ff**2
413 !Calculate the derivative of the damping function with respect to the van der Waals radius.
414 dffdr0 = -this%damping*rr/( this%sr*r0ab(iatom, jatom)**2)*dee
415 ! Calculation of the pair-wise partial energy derivative with respect to the distance between atoms A and B.
416 deabdrab = c6ab(iatom,jatom)*(this%damping/(this%sr*r0ab(iatom, jatom))*dee - 6.0_real64*ff/rr)/rr6
417 ! Derivative of the damping function with respecto to the volume ratio of atom A.
418 dffdvra = dffdr0*dr0dvra(iatom)
419 ! Calculation of the pair-wise partial energy derivative with respect to the volume ratio of atom A.
420 deabdvra = (dffdvra*c6ab(iatom, jatom) + ff*vol_ratio(jatom)*this%c6abfree(ispecies, jspecies))/rr6
421 !Summing for using later
422 derivative_coeff(iatom) = derivative_coeff(iatom) + deabdvra
423
424 ! Calculation of the pair-wise partial energy derivative with respect to the distance between atoms A and B.
425 deabdrab = c6ab(iatom, jatom)*(this%damping/(this%sr*r0ab(iatom, jatom))*dee - 6.0_real64*ff/rr)/rr6
426 force_vdw(:, iatom) = force_vdw(:, iatom) + m_half*deabdrab*(ions%pos(:, iatom) - x_j)/rr
427 end do
428 end do
429 end do
430
431 do iatom = 1, ions%natoms
432 do jatom = 1, ions%natoms
433 call hirshfeld_position_derivative(hirshfeld, ions%space, iatom, jatom, density, dvadrr) !dvadrr_ij = \frac{\delta V_i}{\delta \vec{x_j}}
434 force_vdw(:, jatom)= force_vdw(:, jatom) + derivative_coeff(iatom)*dvadrr ! ions%atom(jatom)%f_vdw = sum_i coeff_i * dvadrr_ij
435 end do
436 end do
437
438 call hirshfeld_end(hirshfeld)
439
440 safe_deallocate_a(vol_ratio)
441 safe_deallocate_a(dvadrr)
442 safe_deallocate_a(dr0dvra)
443 safe_deallocate_a(r0ab)
444 safe_deallocate_a(derivative_coeff)
445 safe_deallocate_a(c6ab)
446
447 call profiling_out("FORCE_VDW_TS")
448
450 end subroutine vdw_ts_force_calculate
451
452 !------------------------------------------
453
454 subroutine vdw_ts_write_c6ab(this, ions, dir, fname, namespace)
455 type(vdw_ts_t) , intent(inout) :: this
456 type(ions_t), intent(in) :: ions
457 character(len=*), intent(in) :: dir, fname
458 type(namespace_t), intent(in) :: namespace
459
460 integer :: iunit, iatom, jatom
461
462 push_sub(vdw_ts_write_c6ab)
463
464 if (mpi_grp_is_root(mpi_world)) then
465 call io_mkdir(dir, namespace)
466 iunit = io_open(trim(dir) // "/" // trim(fname), namespace, action='write')
467 write(iunit, '(a)') ' # Atom1 Atom2 C6_{12}^{eff}'
468
469
470 do iatom = 1, ions%natoms
471 do jatom = 1, ions%natoms
472 write(iunit, '(3x, i5, i5, e15.6)') iatom, jatom, this%c6ab(iatom, jatom)
473 end do
474 end do
475 call io_close(iunit)
476 end if
477 pop_sub(vdw_ts_write_c6ab)
478
479 end subroutine vdw_ts_write_c6ab
480
481
482
483
484 !------------------------------------------
485
486 subroutine get_vdw_param(namespace, atom, c6, alpha, r0)
487 type(namespace_t), intent(in) :: namespace
488 character(len=*), intent(in) :: atom
489 real(real64), intent(out) :: c6
490 real(real64), intent(out) :: alpha
491 real(real64), intent(out) :: r0
492
493 push_sub(get_vdw_param)
494
495 select case (trim(atom))
496
497 case ('H')
498 alpha = 4.500000_real64
499 c6 = 6.500000_real64
500 r0 = 3.100000_real64
501
502 case ('He')
503 alpha = 1.380000_real64
504 c6 = 1.460000_real64
505 r0 = 2.650000_real64
506
507 case ('Li')
508 alpha = 164.200000_real64
509 c6 = 1387.000000_real64
510 r0 = 4.160000_real64
511
512 case ('Be')
513 alpha = 38.000000_real64
514 c6 = 214.000000_real64
515 r0 = 4.170000_real64
516
517 case ('B')
518 alpha = 21.000000_real64
519 c6 = 99.500000_real64
520 r0 = 3.890000_real64
521
522 case ('C')
523 alpha = 12.000000_real64
524 c6 = 46.600000_real64
525 r0 = 3.590000_real64
526
527 case ('N')
528 alpha = 7.400000_real64
529 c6 = 24.200000_real64
530 r0 = 3.340000_real64
531
532 case ('O')
533 alpha = 5.400000_real64
534 c6 = 15.600000_real64
535 r0 = 3.190000_real64
536
537 case ('F')
538 alpha = 3.800000_real64
539 c6 = 9.520000_real64
540 r0 = 3.040000_real64
541
542 case ('Ne')
543 alpha = 2.670000_real64
544 c6 = 6.380000_real64
545 r0 = 2.910000_real64
546
547 case ('Na')
548 alpha = 162.700000_real64
549 c6 = 1556.000000_real64
550 r0 = 3.730000_real64
551
552 case ('Mg')
553 alpha = 71.000000_real64
554 c6 = 627.000000_real64
555 r0 = 4.270000_real64
556
557 case ('Al')
558 alpha = 60.000000_real64
559 c6 = 528.000000_real64
560 r0 = 4.330000_real64
561
562 case ('Si')
563 alpha = 37.000000_real64
564 c6 = 305.000000_real64
565 r0 = 4.200000_real64
566
567 case ('P')
568 alpha = 25.000000_real64
569 c6 = 185.000000_real64
570 r0 = 4.010000_real64
571
572 case ('S')
573 alpha = 19.600000_real64
574 c6 = 134.000000_real64
575 r0 = 3.860000_real64
576
577 case ('Cl')
578 alpha = 15.000000_real64
579 c6 = 94.600000_real64
580 r0 = 3.710000_real64
581
582 case ('Ar')
583 alpha = 11.100000_real64
584 c6 = 64.300000_real64
585 r0 = 3.550000_real64
586
587 case ('K')
588 alpha = 292.900000_real64
589 c6 = 3897.000000_real64
590 r0 = 3.710000_real64
591
592 case ('Ca')
593 alpha = 160.000000_real64
594 c6 = 2221.000000_real64
595 r0 = 4.650000_real64
596
597 case ('Sc')
598 alpha = 120.000000_real64
599 c6 = 1383.000000_real64
600 r0 = 4.590000_real64
601
602 case ('Ti')
603 alpha = 98.000000_real64
604 c6 = 1044.000000_real64
605 r0 = 4.510000_real64
606
607 case ('V')
608 alpha = 84.000000_real64
609 c6 = 832.000000_real64
610 r0 = 4.440000_real64
611
612 case ('Cr')
613 alpha = 78.000000_real64
614 c6 = 602.000000_real64
615 r0 = 3.990000_real64
616
617 case ('Mn')
618 alpha = 63.000000_real64
619 c6 = 552.000000_real64
620 r0 = 3.970000_real64
621
622 case ('Fe')
623 alpha = 56.000000_real64
624 c6 = 482.000000_real64
625 r0 = 4.230000_real64
626
627 case ('Co')
628 alpha = 50.000000_real64
629 c6 = 408.000000_real64
630 r0 = 4.180000_real64
631
632 case ('Ni')
633 alpha = 48.000000_real64
634 c6 = 373.000000_real64
635 r0 = 3.820000_real64
636
637 case ('Cu')
638 alpha = 42.000000_real64
639 c6 = 253.000000_real64
640 r0 = 3.760000_real64
641
642 case ('Zn')
643 alpha = 40.000000_real64
644 c6 = 284.000000_real64
645 r0 = 4.020000_real64
646
647 case ('Ga')
648 alpha = 60.000000_real64
649 c6 = 498.000000_real64
650 r0 = 4.190000_real64
651
652 case ('Ge')
653 alpha = 41.000000_real64
654 c6 = 354.000000_real64
655 r0 = 4.200000_real64
656
657 case ('As')
658 alpha = 29.000000_real64
659 c6 = 246.000000_real64
660 r0 = 4.110000_real64
661
662 case ('Se')
663 alpha = 25.000000_real64
664 c6 = 210.000000_real64
665 r0 = 4.040000_real64
666
667 case ('Br')
668 alpha = 20.000000_real64
669 c6 = 162.000000_real64
670 r0 = 3.930000_real64
671
672 case ('Kr')
673 alpha = 16.800000_real64
674 c6 = 129.600000_real64
675 r0 = 3.820000_real64
676
677 case ('Rb')
678 alpha = 319.200000_real64
679 c6 = 4691.000000_real64
680 r0 = 3.720000_real64
681
682 case ('Sr')
683 alpha = 199.000000_real64
684 c6 = 3170.000000_real64
685 r0 = 4.540000_real64
686
687 case ('Rh')
688 alpha = 56.1_real64
689 c6 = 469.0_real64
690 r0 = 3.95_real64
691
692 case ('Pd')
693 alpha = 23.680000_real64
694 c6 = 157.500000_real64
695 r0 = 3.66000_real64
696
697 case ('Ag')
698 alpha = 50.600000_real64
699 c6 = 339.000000_real64
700 r0 = 3.820000_real64
701
702 case ('Cd')
703 alpha = 39.7_real64
704 c6 = 452.0_real64
705 r0 = 3.99_real64
706
707 case ('Te')
708 alpha = 37.65_real64
709 c6 = 396.0_real64
710 r0 = 4.22_real64
711
712 case ('I')
713 alpha = 35.000000_real64
714 c6 = 385.000000_real64
715 r0 = 4.170000_real64
716
717 case ('Xe')
718 alpha = 27.300000_real64
719 c6 = 285.900000_real64
720 r0 = 4.080000_real64
721
722 case ('Ba')
723 alpha = 275.0_real64
724 c6 = 5727.0_real64
725 r0 = 4.77_real64
726
727 case ('Ir')
728 alpha = 42.51_real64
729 c6 = 359.1_real64
730 r0 = 4.00_real64
731
732 case ('Pt')
733 alpha = 39.68_real64
734 c6 = 347.1_real64
735 r0 = 3.92_real64
736
737 case ('Au')
738 alpha = 36.5_real64
739 c6 = 298.0_real64
740 r0 = 3.86_real64
741
742 case ('Hg')
743 alpha = 33.9_real64
744 c6 = 392.0_real64
745 r0 = 3.98_real64
746
747 case ('Pb')
748 alpha = 61.8_real64
749 c6 = 697.0_real64
750 r0 = 4.31_real64
751
752 case ('Bi')
753 alpha = 49.02_real64
754 c6 = 571.0_real64
755 r0 = 4.32_real64
756
757 case default
758
759 call messages_write('vdw ts: reference free atom parameters not available for species '//trim(atom))
760 call messages_fatal(namespace=namespace)
761
762 end select
763
764 pop_sub(get_vdw_param)
765 end subroutine get_vdw_param
766
767end module vdw_ts_oct_m
768
769!! Local Variables:
770!! mode: f90
771!! coding: utf-8
772!! End:
constant times a vector plus a vector
Definition: lalg_basic.F90:170
double exp(double __x) __attribute__((__nothrow__
type(debug_t), save, public debug
Definition: debug.F90:154
real(real64), parameter, public m_two
Definition: global.F90:189
real(real64), parameter, public m_zero
Definition: global.F90:187
real(real64), parameter, public m_half
Definition: global.F90:193
real(real64), parameter, public m_one
Definition: global.F90:188
real(real64), parameter, public m_three
Definition: global.F90:190
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:260
subroutine, public hirshfeld_density_derivative(this, iatom, ddensity)
Definition: hirshfeld.F90:362
subroutine, public hirshfeld_position_derivative(this, space, iatom, jatom, density, dposition)
Definition: hirshfeld.F90:394
subroutine, public hirshfeld_volume_ratio(this, iatom, density, volume_ratio)
Definition: hirshfeld.F90:324
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:468
subroutine, public io_mkdir(fname, namespace, parents)
Definition: io.F90:354
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
Definition: io.F90:395
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:420
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
Definition: mpi.F90:430
type(mpi_grp_t), public mpi_world
Definition: mpi.F90:266
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:1660
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:548
subroutine get_vdw_param(namespace, atom, c6, alpha, r0)
Definition: vdw_ts.F90:580
subroutine, public vdw_ts_force_calculate(this, force_vdw, ions, mesh, nspin, density)
Definition: vdw_ts.F90:427
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