44 class(mesh_t),
intent(in) :: mesh
45 type(states_elec_t),
intent(in) :: st
46 type(ions_t),
intent(in) :: ions
47 real(real64),
intent(out) :: hirshfeld_charges(:)
50 type(hirshfeld_t) :: hirshfeld
55 call hirshfeld_init(hirshfeld, mesh, ions%namespace, ions%space, ions%latt, ions%atom, &
56 ions%natoms, ions%pos, st%d%spin_channels)
58 do iatom = 1, ions%natoms
59 call hirshfeld_charge(hirshfeld, ions%space, iatom, st%rho, hirshfeld_charges(iatom))
72 class(mesh_t),
intent(in) :: mesh
73 type(states_elec_t),
intent(in) :: st
74 type(ions_t),
intent(in) :: ions
75 integer,
intent(in) :: iunit
78 real(real64),
allocatable :: hirshfeld_charges(:)
82 safe_allocate(hirshfeld_charges(1:ions%natoms))
88 write(iunit,
'(a)')
'Partial ionic charges'
89 write(iunit,
'(a)')
' Ion Hirshfeld'
91 do iatom = 1, ions%natoms
92 write(iunit,
'(i4,a10,f16.3)') iatom, trim(ions%atom(iatom)%species%get_label()), hirshfeld_charges(iatom)
97 safe_deallocate_a(hirshfeld_charges)
subroutine, public hirshfeld_init(this, mesh, namespace, space, latt, atom, natoms, pos, nspin)
subroutine, public hirshfeld_charge(this, space, iatom, density, charge)
subroutine, public hirshfeld_end(this)
This module defines the meshes, which are used in Octopus.
type(mpi_grp_t), public mpi_world
subroutine, public partial_charges_compute_and_print_charges(mesh, st, ions, iunit)
Computes and write partial charges to a file.
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.
subroutine, public profiling_in(label, exclude)
Increment in counter and save entry time.