57 logical,
public :: apply = .false.
59 type(states_elec_t) :: gs_st
68 subroutine scissor_init(this, namespace, space, st, mesh, kpoints, phase, gap, mc)
69 type(scissor_t),
intent(inout) :: this
70 type(namespace_t),
intent(in) :: namespace
71 class(space_t),
intent(in) :: space
72 type(states_elec_t),
intent(in) :: st
73 class(mesh_t),
intent(in) :: mesh
74 type(kpoints_t),
intent(in) :: kpoints
75 type(phase_t),
intent(in) :: phase
76 real(real64),
intent(in) :: gap
77 type(multicomm_t),
intent(in) :: mc
79 type(restart_t) :: restart_gs
81 integer :: ib, ist, ik
82 complex(real64),
allocatable :: temp_state(:,:)
86 assert(.not. this%apply)
91 if (st%parallel_in_states)
then
94 if (mesh%parallel_in_domains)
then
101 write(
message(1),
'(a)')
'Start loading GS states.'
108 message(1) =
"Unable to read states information."
112 call states_elec_load(restart_gs, namespace, space, this%gs_st, mesh, kpoints, &
113 fixed_occ=.
true., ierr=ierr, label =
': gs for TDScissor')
114 if (ierr /= 0 .and. ierr /= (this%gs_st%st_end-this%gs_st%st_start+1)*this%gs_st%nik*this%gs_st%d%dim)
then
115 message(1) =
"Unable to read wavefunctions for TDScissor."
118 call restart_gs%end()
122 write(
message(1),
'(a)')
'Adding the phase for GS states.'
125 safe_allocate(temp_state(1:mesh%np_part, 1:this%gs_st%d%dim))
127 do ik=this%gs_st%d%kpt%start, this%gs_st%d%kpt%end
129 do ist = this%gs_st%st_start, this%gs_st%st_end
131 call phase%apply_to_single(temp_state, mesh%np, this%gs_st%d%dim, ik, .false.)
137 safe_deallocate_a(temp_state)
141 do ik = this%gs_st%d%kpt%start, this%gs_st%d%kpt%end
142 do ib = this%gs_st%group%block_start, this%gs_st%group%block_end
143 call this%gs_st%group%psib(ib, ik)%do_pack(
batch_packed)
165#include "scissor_inc.F90"
168#include "complex.F90"
169#include "scissor_inc.F90"
This module implements batches of mesh functions.
integer, parameter, public batch_packed
functions are stored in CPU memory, in transposed (packed) order
This module implements common operations on batches of mesh functions.
logical pure function, public kpoints_point_is_gamma(this, ik)
integer pure function, public kpoints_number(this)
This module defines functions over batches of mesh functions.
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
subroutine, public messages_print_with_emphasis(msg, iunit, namespace)
subroutine, public messages_not_implemented(feature, namespace)
character(len=512), private msg
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_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module handles the communicators for the various parallelization strategies.
integer, parameter, public restart_proj
integer, parameter, public restart_type_load
subroutine zscissor_commute_r(this, mesh, ik, psi, gpsi)
subroutine, public zscissor_apply(this, mesh, psib, hpsib)
subroutine dscissor_commute_r(this, mesh, ik, psi, gpsi)
subroutine, public dscissor_apply(this, mesh, psib, hpsib)
subroutine, public scissor_end(this)
subroutine, public scissor_init(this, namespace, space, st, mesh, kpoints, phase, gap, mc)
pure logical function, public states_are_real(st)
This module handles spin dimensions of the states and the k-point distribution.
subroutine, public states_elec_end(st)
finalize the states_elec_t object
subroutine, public states_elec_copy(stout, stin, exclude_wfns, exclude_eigenval, special)
make a (selective) copy of a states_elec_t object
This module handles reading and writing restart information for the states_elec_t.
subroutine, public states_elec_load(restart, namespace, space, st, mesh, kpoints, fixed_occ, ierr, iter, lr, lowest_missing, label, verbose, skip)
returns in ierr: <0 => Fatal error, or nothing read =0 => read all wavefunctions >0 => could only rea...