40 use,
intrinsic :: iso_fortran_env
95 class(space_t),
intent(in) :: space
96 type(grid_t),
intent(in) :: gr
97 type(ions_t),
intent(in) :: ions
98 type(epot_t),
intent(in) :: ep
99 type(states_elec_t),
intent(in) :: st
100 type(kpoints_t),
intent(in) :: kpoints
101 real(real64),
intent(inout) :: x(:)
102 integer,
intent(in) :: lda_u
122 type(grid_t),
intent(in) :: gr
123 type(namespace_t),
intent(in) :: namespace
124 type(ions_t),
intent(inout) :: ions
125 type(hamiltonian_elec_t),
intent(in) :: hm
126 type(states_elec_t),
intent(in) :: psi
127 type(states_elec_t),
intent(in) :: chi
128 real(real64),
intent(inout) :: ff(:, :)
129 real(real64),
intent(in) :: qq(:, :)
131 integer :: jatom, idim, jdim
132 integer,
target :: j, ist, ik, iatom
133 real(real64) :: rr, w2r, w1r, xx(ions%space%dim), dq, pdot3p, pdot3m, pdot3p2, pdot3m2, dforce1, dforce2
134 complex(real64),
allocatable :: zpsi(:, :), derpsi(:, :, :)
135 real(real64),
allocatable :: forceks1p(:), forceks1m(:), forceks1p2(:), forceks1m2(:), dforceks1(:)
143 do iatom = 1, ions%natoms
144 do jatom = 1, ions%natoms
145 if (jatom == iatom) cycle
146 xx(1:ions%space%dim) = ions%pos(:, jatom) - ions%pos(:, iatom)
147 rr = norm2(xx(1:ions%space%dim))
148 w1r = - ions%charge(iatom) * ions%charge(jatom) / rr**2
149 w2r =
m_two * ions%charge(iatom) * ions%charge(jatom) / rr**3
150 do idim = 1, ions%space%dim
151 do jdim = 1, ions%space%dim
152 ff(iatom, idim) = ff(iatom, idim) + (qq(jatom, jdim) - qq(iatom, jdim)) * w2r * (
m_one/rr**2) * xx(idim) * xx(jdim)
153 ff(iatom, idim) = ff(iatom, idim) - (qq(jatom, jdim) - qq(iatom, jdim)) * w1r * (
m_one/rr**3) * xx(idim) * xx(jdim)
154 if (jdim == idim)
then
155 ff(iatom, idim) = ff(iatom, idim) + (qq(jatom, jdim) - qq(iatom, jdim)) * w1r * (
m_one/rr)
162 safe_allocate(derpsi(1:gr%np_part, 1:ions%space%dim, 1:psi%d%dim))
166 safe_allocate(forceks1p(1:ions%space%dim))
167 safe_allocate(forceks1m(1:ions%space%dim))
168 safe_allocate(forceks1p2(1:ions%space%dim))
169 safe_allocate(forceks1m2(1:ions%space%dim))
170 safe_allocate(dforceks1(1:ions%space%dim))
171 safe_allocate(zpsi(1:gr%np_part, 1:psi%d%dim))
178 do iatom = 1, ions%natoms
179 do j = 1, ions%space%dim
180 call force1(ions%pos(j, iatom) + dq, forceks1p, pdot3p)
181 call force1(ions%pos(j, iatom) - dq, forceks1m, pdot3m)
182 call force1(ions%pos(j, iatom) + dq/
m_two, forceks1p2, pdot3p2)
183 call force1(ions%pos(j, iatom) - dq/
m_two, forceks1m2, pdot3m2)
184 dforceks1 = ((
m_four/
m_three) * (forceks1p2 - forceks1m2) - (
m_one / 6.0_real64) * (forceks1p - forceks1m)) / dq
185 dforce1 = sum(qq(iatom, :) * dforceks1(:))
186 dforce2 = ((
m_four/
m_three) * (pdot3p2 - pdot3m2) - (
m_one / 6.0_real64) * (pdot3p - pdot3m)) / dq
187 ff(iatom, j) = ff(iatom, j) -
m_two * psi%occ(ist, ik) * dforce1 +
m_two * dforce2
193 safe_deallocate_a(zpsi)
194 safe_deallocate_a(forceks1p)
195 safe_deallocate_a(forceks1m)
196 safe_deallocate_a(forceks1p2)
197 safe_deallocate_a(forceks1m2)
198 safe_deallocate_a(dforceks1)
199 safe_deallocate_a(derpsi)
206 subroutine force1(qq, res, pdot3)
207 real(real64),
intent(in) :: qq
208 real(real64),
contiguous,
intent(inout) :: res(:)
209 real(real64),
intent(inout) :: pdot3
213 complex(real64),
allocatable :: viapsi(:, :), zpsi(:, :)
215 qold = ions%pos(j, iatom)
216 ions%pos(j, iatom) = qq
217 safe_allocate(viapsi(1:gr%np_part, 1:psi%d%dim))
218 safe_allocate(zpsi(1:gr%np_part, 1:psi%d%dim))
222 ions%pos(:, iatom), iatom, gr, zpsi, viapsi)
225 do m = 1, ubound(res, 1)
226 res(m) = real(
zmf_dotp(gr, viapsi(:, 1), derpsi(:, m, 1), reduce = .false.), real64)
228 if (gr%parallel_in_domains)
call gr%allreduce(res)
231 pdot3 = real(
m_zi *
zmf_dotp(gr, zpsi(:, 1), viapsi(:, 1)), real64)
232 ions%pos(j, iatom) = qold
234 safe_deallocate_a(viapsi)
242 subroutine forces_calculate(gr, namespace, ions, hm, ext_partners, st, ks, vhxc_old, t, dt)
243 type(
grid_t),
intent(in) :: gr
245 type(
ions_t),
intent(inout) :: ions
249 type(
v_ks_t),
intent(in) :: ks
250 real(real64),
optional,
intent(in) :: vhxc_old(:,:)
251 real(real64),
optional,
intent(in) :: t
252 real(real64),
optional,
intent(in) :: dt
254 integer :: j, iatom, idir
255 real(real64) :: xx(ions%space%dim), time, global_force(ions%space%dim)
256 real(real64),
allocatable :: force(:, :), force_loc(:, :), force_nl(:, :), force_u(:, :)
257 real(real64),
allocatable :: force_nlcc(: ,:)
258 real(real64),
allocatable :: force_scf(:, :)
265 if (
present(t)) time = t
268 do iatom = 1, ions%natoms
269 ions%atom(iatom)%f_ii(1:ions%space%dim) =
m_zero
270 ions%atom(iatom)%f_vdw(1:ions%space%dim) =
m_zero
271 ions%atom(iatom)%f_loc(1:ions%space%dim) =
m_zero
272 ions%atom(iatom)%f_nl(1:ions%space%dim) =
m_zero
273 ions%atom(iatom)%f_u(1:ions%space%dim) =
m_zero
274 ions%atom(iatom)%f_fields(1:ions%space%dim) =
m_zero
275 ions%atom(iatom)%f_nlcc(1:ions%space%dim) =
m_zero
276 ions%atom(iatom)%f_scf(1:ions%space%dim) =
m_zero
277 ions%atom(iatom)%f_photons(1:ions%space%dim) =
m_zero
282 if (ks%vdw%vdw_correction == option__vdwcorrection__vdw_ts)
then
286 do iatom = 1, ions%natoms
287 ions%tot_force(:, iatom) = hm%ep%fii(1:ions%space%dim, iatom) + hm%ep%vdw_forces(1:ions%space%dim, iatom)
288 if (ks%has_photons)
then
289 ions%tot_force(:, iatom) = ions%tot_force(:, iatom) &
290 -
p_proton_charge*ions%charge(iatom)*hm%ep%photon_forces(1:ions%space%dim)
292 ions%atom(iatom)%f_ii(1:ions%space%dim) = hm%ep%fii(1:ions%space%dim, iatom)
293 ions%atom(iatom)%f_vdw(1:ions%space%dim) = hm%ep%vdw_forces(1:ions%space%dim, iatom)
294 ions%atom(iatom)%f_photons(1:ions%space%dim) = -
p_proton_charge*ions%charge(iatom)*hm%ep%photon_forces(1:ions%space%dim)
298 global_force = ions%global_force(time)
301 do iatom = 1, ions%natoms
302 ions%tot_force(:, iatom) = ions%tot_force(:, iatom) + global_force
303 ions%atom(iatom)%f_ii(1:ions%space%dim) = ions%atom(iatom)%f_ii(1:ions%space%dim) + global_force
307 safe_allocate(force(1:ions%space%dim, 1:ions%natoms))
308 safe_allocate(force_loc(1:ions%space%dim, 1:ions%natoms))
309 safe_allocate(force_nl(1:ions%space%dim, 1:ions%natoms))
310 safe_allocate(force_u(1:ions%space%dim, 1:ions%natoms))
311 safe_allocate(force_scf(1:ions%space%dim, 1:ions%natoms))
312 safe_allocate(force_nlcc(1:ions%space%dim, 1:ions%natoms))
321 .and. ks%theory_level /=
hartree .and. ks%theory_level /=
rdmft)
then
326 if (
present(vhxc_old))
then
327 call forces_from_scf(gr, ions, st%d%spin_channels, hm%vhxc, vhxc_old, force_scf)
332 if (ions%force_total_enforce)
then
341 do iatom = 1, ions%natoms
342 do idir = 1, ions%space%dim
343 ions%tot_force(idir, iatom) = ions%tot_force(idir, iatom) + force(idir, iatom) &
344 + force_scf(idir, iatom) + force_nlcc(idir, iatom)
345 ions%atom(iatom)%f_loc(idir) = force_loc(idir, iatom)
346 ions%atom(iatom)%f_nl(idir) = force_nl(idir, iatom)
347 ions%atom(iatom)%f_u(idir) = force_u(idir, iatom)
348 ions%atom(iatom)%f_nlcc(idir) = force_nlcc(idir, iatom)
349 ions%atom(iatom)%f_scf(idir) = force_scf(idir, iatom)
353 safe_deallocate_a(force)
354 safe_deallocate_a(force_loc)
355 safe_deallocate_a(force_nl)
356 safe_deallocate_a(force_u)
357 safe_deallocate_a(force_nlcc)
358 safe_deallocate_a(force_scf)
362 if (
present(t) .and.
associated(lasers))
then
363 do j = 1, lasers%no_lasers
368 do iatom = 1, ions%natoms
370 ions%tot_force(:, iatom) = ions%tot_force(:, iatom) + ions%charge(iatom)*xx(:)
371 ions%atom(iatom)%f_fields(1:ions%space%dim) = ions%atom(iatom)%f_fields(1:ions%space%dim) &
372 + ions%charge(iatom)*xx(:)
384 do iatom = 1, ions%natoms
386 ions%tot_force(:, iatom) = ions%tot_force(:, iatom) + ions%charge(iatom)*xx(:)
387 ions%atom(iatom)%f_fields(1:ions%space%dim) = ions%atom(iatom)%f_fields(1:ions%space%dim) &
388 + ions%charge(iatom)*xx(:)
392 write(
message(1),
'(a)')
'The forces are currently not supported for nondipole '
393 write(
message(2),
'(a)')
'strong-field approximation Hamiltonian approach.'
398 write(
message(1),
'(a)')
'The forces are currently not properly calculated if time-dependent'
399 write(
message(2),
'(a)')
'magnetic fields are present.'
405 if (
allocated(hm%ep%e_field))
then
406 do iatom = 1, ions%natoms
408 ions%tot_force(:, iatom) = ions%tot_force(:, iatom) + ions%charge(iatom)*hm%ep%e_field(1:ions%space%dim)
409 ions%atom(iatom)%f_fields(1:ions%space%dim) = ions%atom(iatom)%f_fields(1:ions%space%dim) &
410 + ions%charge(iatom)*hm%ep%e_field(1:ions%space%dim)
414 if (
allocated(hm%ep%b_field) .or.
allocated(hm%ep%a_static))
then
415 write(
message(1),
'(a)')
'The forces are currently not properly calculated if static'
416 write(
message(2),
'(a)')
'magnetic fields or static vector potentials are present.'
421 write(
message(1),
'(a)')
'The forces are currently not properly calculated if gauge-field'
422 write(
message(2),
'(a)')
'is applied.'
426 if (hm%kpoints%use_symmetries .or. st%symmetrize_density)
then
431 if (ions%space%is_periodic())
then
443 type(
ions_t),
intent(in) :: ions
444 real(real64),
intent(inout) :: force(:, :)
446 real(real64),
allocatable :: total_force(:)
451 safe_allocate(total_force(1:ions%space%dim))
453 total_force(1:ions%space%dim) = sum(force, dim=2) / ions%natoms
455 do iatom = 1, ions%natoms
456 force(1:ions%space%dim, iatom) = force(1:ions%space%dim, iatom) - total_force(1:ions%space%dim)
459 safe_deallocate_a(total_force)
466 type(
ions_t),
intent(in) :: ions
467 real(real64),
intent(inout) :: total_torque(:)
469 real(real64) :: center_of_mass(ions%space%dim), rr(3), ff(3)
474 center_of_mass = ions%center_of_mass()
479 do iatom = 1, ions%natoms
480 rr(1:ions%space%dim) = ions%pos(1:ions%space%dim, iatom) - center_of_mass
481 ff(1:ions%space%dim) = ions%tot_force(1:ions%space%dim, iatom)
492 integer,
intent(in) :: iunit
493 type(
ions_t),
intent(in) :: ions
494 character(len=*),
intent(in) :: dir
497 integer :: iatom, idir, ii, iunit2
498 real(real64) :: torque(1:3)
505 write(iunit,
'(a,10x,99(14x,a))')
' Ion', (
index2axis(idir), idir = 1, ions%space%dim)
506 do iatom = 1, ions%natoms
507 write(iunit,
'(i4,a10,10es17.8)') iatom, trim(ions%atom(iatom)%species%get_label()), &
510 write(iunit,
'(1x,100a1)') (
"-", ii = 1, 13 + ions%space%dim * 15)
511 write(iunit,
'(a14, 10es17.8)')
" Max abs force", &
513 write(iunit,
'(a14, 10es17.8)')
" Total force", &
516 if (ions%space%dim == 2 .or. ions%space%dim == 3 .and. .not. ions%space%is_periodic())
then
518 write(iunit,
'(a14, 10es17.8)')
' Total torque', &
524 iunit2 =
io_open(trim(dir)//
'/forces', namespace, action=
'write', position=
'asis')
525 write(iunit2,
'(a)') &
526 ' # Total force (x,y,z) Ion-Ion (x,y,z) VdW (x,y,z) Local (x,y,z) NL (x,y,z)' // &
527 ' Fields (x,y,z) Hubbard(x,y,z) SCF(x,y,z) NLCC(x,y,z) Phot (x,y,z)'
528 do iatom = 1, ions%natoms
529 write(iunit2,
'(i4,a10,30es17.8)') iatom, trim(ions%atom(iatom)%species%get_label()), &
551 class(
mesh_t),
intent(in) :: mesh
552 type(
ions_t),
intent(inout) :: ions
553 integer,
intent(in) :: spin_channels
554 real(real64),
intent(in) :: vxc(:,:)
555 real(real64),
contiguous,
intent(out) :: force_nlcc(:, :)
557 integer :: is, iatom, idir
558 real(real64),
allocatable :: drho(:,:)
565 safe_allocate(drho(1:mesh%np, 1:ions%space%dim))
569 do iatom = ions%atoms_dist%start, ions%atoms_dist%end
570 call species_get_nlcc_grad(ions%atom(iatom)%species, ions%space, ions%latt, ions%pos(:, iatom), mesh, drho)
572 do idir = 1, ions%space%dim
573 do is = 1, spin_channels
574 force_nlcc(idir, iatom) = force_nlcc(idir, iatom) &
575 -
dmf_dotp(mesh, drho(:,idir), vxc(1:mesh%np, is), reduce = .false.)/spin_channels
580 safe_deallocate_a(drho)
582 if (ions%atoms_dist%parallel)
call dforces_gather(ions, force_nlcc)
584 if (mesh%parallel_in_domains)
then
586 call mesh%allreduce(force_nlcc)
600 subroutine forces_from_scf(mesh, ions, spin_channels, vhxc, vhxc_old, force_scf)
601 class(
mesh_t),
intent(in) :: mesh
602 type(
ions_t),
intent(inout) :: ions
603 integer,
intent(in) :: spin_channels
604 real(real64),
intent(in) :: vhxc(:,:)
605 real(real64),
intent(in) :: vhxc_old(:,:)
606 real(real64),
contiguous,
intent(out) :: force_scf(:, :)
608 integer :: is, iatom, idir
609 real(real64),
allocatable :: dvhxc(:,:), drho(:,:,:)
615 safe_allocate(dvhxc(1:mesh%np, 1:spin_channels))
616 safe_allocate(drho(1:mesh%np, 1:spin_channels, 1:ions%space%dim))
619 do is = 1, spin_channels
620 dvhxc(1:mesh%np, is) = vhxc(1:mesh%np, is) - vhxc_old(1:mesh%np, is)
625 do iatom = ions%atoms_dist%start, ions%atoms_dist%end
626 select type(spec=>ions%atom(iatom)%species)
632 ions%pos(:, iatom), mesh, spin_channels, drho)
634 do idir = 1, ions%space%dim
635 do is = 1, spin_channels
636 force_scf(idir, iatom) = force_scf(idir, iatom) &
637 -
dmf_dotp(mesh, drho(:,is,idir), dvhxc(:,is), reduce = .false.)
644 safe_deallocate_a(dvhxc)
645 safe_deallocate_a(drho)
647 if (ions%atoms_dist%parallel)
call dforces_gather(ions, force_scf)
649 if (mesh%parallel_in_domains)
then
651 call mesh%allreduce(force_scf)
662 class(
mesh_t),
intent(in) :: mesh
663 class(
space_t),
intent(in) :: space
664 real(real64),
intent(in) :: vpsl(:)
665 real(real64),
intent(in) :: gdensity(:, :)
666 real(real64),
intent(inout) :: force(:)
669 real(real64) :: force_tmp(1:space%dim)
673 do idir = 1, space%dim
674 force_tmp(idir) =
dmf_dotp(mesh, vpsl(1:mesh%np), gdensity(:, idir), reduce = .false.)
677 if (mesh%parallel_in_domains)
call mesh%allreduce(force_tmp)
679 force(1:space%dim) = force(1:space%dim) + force_tmp(1:space%dim)
687 type(
ions_t),
intent(in) :: ions
688 real(real64),
intent(inout) :: force(:,:)
690 integer :: iatom, iop, iatom_symm
691 real(real64) :: symmetrized_force(ions%space%dim), force_tmp(ions%space%dim)
692 real(real64),
allocatable :: force_sym(:,:)
696 safe_allocate(force_sym(1:ions%space%dim,1:ions%natoms))
697 do iatom = 1, ions%natoms
698 symmetrized_force =
m_zero
699 do iop = 1, ions%symm%nops
700 iatom_symm = ions%inv_map_symm_atoms(iatom, iop)
702 symmetrized_force = symmetrized_force + force_tmp
705 do iop = 1, ions%symm%nops_nonsymmorphic
706 iatom_symm = ions%inv_map_symm_atoms(iatom, iop + ions%symm%nops)
708 symmetrized_force = symmetrized_force + force_tmp
711 force_sym(:, iatom) = symmetrized_force / (ions%symm%nops + ions%symm%nops_nonsymmorphic)
715 safe_deallocate_a(force_sym)
723#include "forces_inc.F90"
726#include "complex.F90"
727#include "forces_inc.F90"
subroutine force1(qq, res, pdot3)
This module implements batches of mesh functions.
This module implements common operations on batches of mesh functions.
Module implementing boundary conditions in Octopus.
This module implements a calculator for the density and defines related functions.
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
subroutine, public zderivatives_grad(der, ff, op_ff, ghost_update, set_bc, to_cartesian)
apply the gradient to a mesh function
logical function, public list_has_gauge_field(partners)
type(lasers_t) function, pointer, public list_get_lasers(partners)
subroutine, public zforces_from_potential(gr, namespace, space, ions, hm, st, force, force_loc, force_nl, force_u)
Ref: Kikuji Hirose, Tomoya Ono, Yoshitaka Fujimoto, and Shigeru Tsukamoto, First-principles calculati...
subroutine, public forces_costate_calculate(gr, namespace, ions, hm, psi, chi, ff, qq)
subroutine dtotal_force_from_potential(space, gr, ions, ep, st, kpoints, x, lda_u_level)
subroutine forces_from_scf(mesh, ions, spin_channels, vhxc, vhxc_old, force_scf)
subroutine symmetrize_force(ions, force)
Given the forces on all atoms, this symmetrizes them using symmorphic and non-symmorphic operations.
subroutine, public zforces_born_charges(gr, namespace, space, ions, ep, st, kpoints, lr, lr2, born_charges, lda_u_level)
lr, lr2 are wfns from electric perturbation; lr is for +omega, lr2 is for -omega. for each atom,...
subroutine forces_compute_total_torque(ions, total_torque)
Computes the total torque acting on the system.
subroutine ztotal_force_from_potential(space, gr, ions, ep, st, kpoints, x, lda_u_level)
subroutine, public forces_write_info(iunit, ions, dir, namespace)
subroutine forces_set_total_to_zero(ions, force)
subroutine, public dforces_from_potential(gr, namespace, space, ions, hm, st, force, force_loc, force_nl, force_u)
Ref: Kikuji Hirose, Tomoya Ono, Yoshitaka Fujimoto, and Shigeru Tsukamoto, First-principles calculati...
subroutine, public zforces_derivative(gr, namespace, space, ions, ep, st, kpoints, lr, lr2, force_deriv, lda_u_level)
subroutine, public forces_calculate(gr, namespace, ions, hm, ext_partners, st, ks, vhxc_old, t, dt)
subroutine, public total_force_calculate(space, gr, ions, ep, st, kpoints, x, lda_u)
This computes the total forces on the ions created by the electrons (it excludes the force due to pos...
subroutine, public dforces_derivative(gr, namespace, space, ions, ep, st, kpoints, lr, lr2, force_deriv, lda_u_level)
subroutine, public dforces_born_charges(gr, namespace, space, ions, ep, st, kpoints, lr, lr2, born_charges, lda_u_level)
lr, lr2 are wfns from electric perturbation; lr is for +omega, lr2 is for -omega. for each atom,...
subroutine total_force_from_local_potential(mesh, space, vpsl, gdensity, force)
subroutine dforces_gather(ions, force)
subroutine forces_from_nlcc(mesh, ions, spin_channels, vxc, force_nlcc)
real(real64), parameter, public m_two
real(real64), parameter, public p_proton_charge
real(real64), parameter, public m_zero
real(real64), parameter, public m_four
complex(real64), parameter, public m_z0
complex(real64), parameter, public m_zi
real(real64), parameter, public m_one
real(real64), parameter, public m_three
This module implements the underlying real-space grid.
integer, parameter, public rdmft
integer, parameter, public hartree
integer, parameter, public independent_particles
subroutine, public zhamiltonian_elec_apply_atom(hm, namespace, space, latt, species, pos, ia, mesh, psi, vpsi)
This module defines classes and functions for interaction partners.
subroutine, public io_close(iunit, grp)
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
logical function, public lasers_with_nondipole_field(lasers)
Check if a nondipole SFA correction should be computed for the given laser.
integer, parameter, public e_field_electric
integer, parameter, public e_field_vector_potential
subroutine, public laser_electric_field(laser, field, time, dt)
Returns a vector with the electric field, no matter whether the laser is described directly as an ele...
integer, parameter, public e_field_scalar_potential
integer pure elemental function, public laser_kind(laser)
subroutine, public laser_field(laser, field, time)
Retrieves the value of either the electric or the magnetic field. If the laser is given by a scalar p...
integer, parameter, public e_field_magnetic
This module is intended to contain "only mathematical" functions and procedures.
pure real(real64) function, dimension(1:3), public dcross_product(a, b)
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
type(mpi_grp_t), public mpi_world
subroutine, public profiling_out(label)
Increment out counter and sum up difference between entry and exit time.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.
pure logical function, public ps_has_density(ps)
subroutine, public species_get_nlcc_grad(species, space, latt, pos, mesh, rho_core_grad, gnlcc_x)
subroutine, public species_atom_density_grad(species, namespace, space, latt, pos, mesh, spin_channels, drho)
pure logical function, public states_are_real(st)
This module handles spin dimensions of the states and the k-point distribution.
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
character(len=20) pure function, public units_abbrev(this)
This module defines the unit system, used for input and output.
type(unit_system_t), public units_out
This module is intended to contain simple general-purpose utility functions and procedures.
character pure function, public index2axis(idir)
Tkatchenko-Scheffler pairwise method for van der Waals (vdW, dispersion) interactions.
subroutine, public vdw_ts_force_calculate(this, force_vdw, ions, mesh, nspin, density)
Description of the grid, containing information on derivatives, stencil, and symmetries.
Describes mesh distribution to nodes.
The states_elec_t class contains all electronic wave functions.