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