28 use,
intrinsic :: iso_fortran_env
55 integer :: ndensmat_to_calculate
56 character(len=200) :: dirname
57 character(80),
allocatable :: labels(:)
58 integer,
allocatable :: particle_kept(:)
59 integer,
allocatable :: nnatorb_prt(:)
65 character(len=*),
intent(in) :: dir
66 type(namespace_t),
intent(in) :: namespace
67 type(states_elec_t),
intent(in) :: st
68 type(modelmb_denmat_t),
intent(out) :: denmat
70 integer :: ncols, ipart
106 if (
parse_block(namespace,
'DensitytoCalc', blk) /= 0)
then
107 message(1) =
'To print out density (matrices), you must specify the DensitytoCalc block in input'
116 if (denmat%ndensmat_to_calculate < 0 .or. &
117 denmat%ndensmat_to_calculate > st%modelmbparticles%nparticle)
then
121 safe_allocate(denmat%labels(1:denmat%ndensmat_to_calculate))
122 safe_allocate(denmat%particle_kept(1:denmat%ndensmat_to_calculate))
123 safe_allocate(denmat%nnatorb_prt(1:denmat%ndensmat_to_calculate))
125 do ipart=1,denmat%ndensmat_to_calculate
130 write (
message(1),
'(a,a)')
'labels_densmat = ', denmat%labels(ipart)
131 write (
message(2),
'(a,i6)')
'particle_kept_densmat = ', denmat%particle_kept(ipart)
132 write (
message(3),
'(a,i6)')
'nnatorb_prt_densmat = ', denmat%nnatorb_prt(ipart)
138 denmat%dirname = trim(dir)
145 type(modelmb_denmat_t),
intent(inout) :: this
149 safe_deallocate_a(this%labels)
150 safe_deallocate_a(this%particle_kept)
151 safe_deallocate_a(this%nnatorb_prt)
159#include "modelmb_density_matrix_inc.F90"
162#include "complex.F90"
163#include "modelmb_density_matrix_inc.F90"
This module implements batches of mesh functions.
This module implements the index, used for the mesh points.
This module defines functions over batches of mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public messages_obsolete_variable(namespace, name, rep)
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
subroutine, public messages_input_error(namespace, var, details, row, column)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
general module for modelmb particles (eg 4 electrons in 1D equiv to 1 in 4D). Also calculate differen...
subroutine, public zmodelmb_density_matrix_write(space, mesh, st, wf, mm, denmat, namespace)
subroutine, public dmodelmb_density_matrix_write(space, mesh, st, wf, mm, denmat, namespace)
subroutine, public modelmb_density_matrix_init(dir, namespace, st, denmat)
subroutine, public modelmb_density_matrix_end(this)
Some general things and nomenclature:
subroutine, public parse_block_string(blk, l, c, res, convert_to_c)
integer function, public parse_block(namespace, name, blk, check_varinfo_)