Octopus
partial_charges.F90
Go to the documentation of this file.
1!! Copyright (C) 2015 X. Andrade
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
22 use debug_oct_m
23 use global_oct_m
25 use ions_oct_m
26 use mesh_oct_m
29
30 implicit none
31
32 private
33
34 public :: &
36
37contains
38
39 !----------------------------------------------
40 subroutine partial_charges_calculate(mesh, st, ions, hirshfeld_charges)
41 class(mesh_t), intent(in) :: mesh
42 type(states_elec_t), intent(in) :: st
43 type(ions_t), intent(in) :: ions
44 real(real64), intent(out) :: hirshfeld_charges(:)
45
46 integer :: iatom
47 type(hirshfeld_t) :: hirshfeld
48
50 call profiling_in('PARTIAL_CHARGES')
51
52 call hirshfeld_init(hirshfeld, mesh, ions%namespace, ions%space, ions%latt, ions%atom, ions%natoms, ions%pos, st%d%nspin)
53
54 do iatom = 1, ions%natoms
55 call hirshfeld_charge(hirshfeld, ions%space, iatom, st%rho, hirshfeld_charges(iatom))
56 end do
57
58 call hirshfeld_end(hirshfeld)
59
60 call profiling_out('PARTIAL_CHARGES')
62
63 end subroutine partial_charges_calculate
64
65end module partial_charges_oct_m
66
67!! Local Variables:
68!! mode: f90
69!! coding: utf-8
70!! End:
subroutine, public hirshfeld_init(this, mesh, namespace, space, latt, atom, natoms, pos, nspin)
Definition: hirshfeld.F90:166
subroutine, public hirshfeld_charge(this, space, iatom, density, charge)
Definition: hirshfeld.F90:279
subroutine, public hirshfeld_end(this)
Definition: hirshfeld.F90:260
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
subroutine, public partial_charges_calculate(mesh, st, ions, hirshfeld_charges)
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