80 integer,
parameter :: LR = 1,
fd = 2
87 type(namespace_t),
intent(in) :: namespace
126 subroutine run(namespace, calc_mode_id)
127 type(namespace_t),
intent(in) :: namespace
128 integer,
intent(in) :: calc_mode_id
130 type(partner_list_t) :: partners
131 class(system_t),
pointer :: systems
132 type(system_factory_t) :: system_factory
133 type(interactions_factory_t) :: interactions_factory
134 logical :: from_scratch
136 type(partner_iterator_t) :: iter
137 type(system_list_t) :: flat_list
138 class(interaction_partner_t),
pointer :: partner
139 real(real64) :: largest_dt, largest_allowed_time
149 if (calc_mode_id == option__calculationmode__recipe)
then
162 if (calc_mode_id == option__calculationmode__test)
then
184 select type (systems)
187 partners = systems%list
197 call partners%add(systems)
201 select type (systems)
203 select case (calc_mode_id)
204 case (option__calculationmode__gs)
206 case (option__calculationmode__td)
231 if(calc_mode_id == option__calculationmode__td)
then
233 select type (sys => systems)
237 largest_allowed_time =
m_zero
239 call sys%get_flat_list(flat_list)
241 call iter%start(flat_list)
242 do while (iter%has_next())
243 select type (subsystem => iter%get_next())
245 select type (subalgorithm => subsystem%algo)
247 largest_dt = max(largest_dt, subalgorithm%dt)
252 select type(prop => systems%algo)
254 largest_allowed_time =
floor(prop%final_time / largest_dt)* largest_dt
259 call iter%start(flat_list)
260 do while (iter%has_next())
261 select type(subsystem => iter%get_next())
263 select type (subalgorithm => subsystem%algo)
265 if(
floor(subalgorithm%final_time/subalgorithm%dt) * subalgorithm%dt > largest_allowed_time )
then
266 write(
message(1), *)
"Incommensurate propagation time: The calculation would run into a deadlock, as a system with"
267 write(
message(2), *)
"a smaller timestep would attempt a timestep beyond the last step" &
268 //
" of a system with a larger time step."
269 write(
message(3), *)
"Please, adjust the TDPropagationTime and/or the TDTimeStep variables of the systems."
271 write(
message(5), *)
"With the current timesteps, the TDPropagationTime should be ", largest_allowed_time
287 call systems%create_interactions(interactions_factory, partners)
290 select type (systems)
293 if ((
debug%interaction_graph .or.
debug%interaction_graph_full) .and.
mpi_world%is_root())
then
294 iunit_out =
io_open(
'debug/interaction_graph.dot', systems%namespace, action=
'write')
295 write(iunit_out,
'(a)')
'digraph {'
296 call systems%write_interaction_graph(iunit_out,
debug%interaction_graph_full)
297 write(iunit_out,
'(a)')
'}'
302 if (.not. systems%process_is_slave())
then
318 call parse_variable(namespace,
'FromScratch', .false., from_scratch)
322 select case (calc_mode_id)
323 case (option__calculationmode__gs)
324 select type (systems)
328 call systems%ground_state_run(from_scratch)
330 case (option__calculationmode__unocc)
332 case (option__calculationmode__td)
333 select type (systems)
339 case (option__calculationmode__go)
341 case (option__calculationmode__opt_control)
343 case (option__calculationmode__em_resp)
350 case (option__calculationmode__casida)
352 case (option__calculationmode__vdw)
353 call vdw_run(systems, from_scratch)
354 case (option__calculationmode__vib_modes)
361 case (option__calculationmode__one_shot)
362 message(1) =
"CalculationMode = one_shot is obsolete. Please use gs with MaximumIter = 0."
364 case (option__calculationmode__kdotp)
366 case (option__calculationmode__dummy)
367 case (option__calculationmode__invert_ks)
369 case (option__calculationmode__recipe)
376 select type (systems)
379 call iter%start(partners)
380 do while (iter%has_next())
381 select type(ptr => iter%get_next())
384 safe_deallocate_p(partner)
387 safe_deallocate_p(partner)
390 safe_deallocate_p(partner)
396 safe_deallocate_p(systems)
410 integer,
intent(in) :: calc_mode_id
414 select case (calc_mode_id)
415 case (option__calculationmode__gs, option__calculationmode__go, option__calculationmode__unocc)
421 case (option__calculationmode__td)
424 case (option__calculationmode__casida)
double floor(double __x) __attribute__((__nothrow__
subroutine, public accel_init(base_grp, namespace)
subroutine, public accel_end(namespace)
This module handles the calculation mode.
integer, parameter, public p_strategy_kpoints
parallelization in k-points
integer, parameter, public p_strategy_other
something else like e-h pairs
type(calc_mode_par_t), public calc_mode_par
Singleton instance of parallel calculation mode.
integer, parameter, public p_strategy_states
parallelization in states
This module implements the Casida equations for excited states.
subroutine, public casida_run(system, from_scratch)
type(debug_t), save, public debug
subroutine, public em_resp_run(system, from_scratch)
subroutine, public load_external_potentials(external_potentials, namespace)
subroutine, public load_external_waves(partners, namespace)
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
subroutine, public fft_all_init(namespace)
initialize the table
subroutine, public fft_all_end()
delete all plans
subroutine, public geom_opt_run(system, from_scratch)
real(real64), parameter, public m_zero
This module defines classes and functions for interaction partners.
subroutine, public invert_ks_run(system)
subroutine, public io_close(iunit, grp)
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
subroutine, public kdotp_lr_run(system, from_scratch)
subroutine, public load_lasers(partners, namespace)
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_input_error(namespace, var, details, row, column)
subroutine, public messages_info(no_lines, iunit, debug_only, stress, all_nodes, namespace)
This module implements the factory for ground state algorithm.
subroutine, public mpi_debug_statistics()
type(mpi_grp_t), public mpi_world
This module handles the communicators for the various parallelization strategies.
This module implements the basic mulsisystem class, a container system for other systems.
This module implements the multisystem debug functionality.
subroutine, public multisystem_run(systems, from_scratch)
type(namespace_t), public global_namespace
This module contains the main procedure ("opt_control_run") that is used when optimal control runs ar...
subroutine, public opt_control_run(system)
logical function, public parse_is_defined(namespace, name)
subroutine, public phonons_run(system)
subroutine, public phonons_lr_run(system, from_scratch)
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.
This module implements the factory for propagators.
This module implements the basic propagator framework.
subroutine, public pulpo_print()
top level module for all calculation modes
integer function get_resp_method(namespace)
query input file for the response mode.
subroutine calc_mode_parallel_strategy_init(calc_mode_id)
Calculation mode initialization (parallelization strategy)
subroutine, public run(namespace, calc_mode_id)
main routine to run all calculations: This routine parses the input file, sets up the systems and int...
subroutine, public static_pol_run(system, from_scratch)
integer, parameter, public system_multisystem
container system. (multisystem_basic_oct_m::multisystem_basic_t)
This module implements the abstract system type.
subroutine, public time_dependent_run(electrons, from_scratch)
This module defines the unit system, used for input and output.
subroutine, public unit_system_init(namespace)
subroutine, public unocc_run(system, from_scratch)
subroutine, public vdw_run(system, from_scratch)
Class describing the electron system.
This class defines the factory for minimizers.
Container class for lists of system_oct_m::system_t.
This class defines the factory for propagators.
Abstract class implementing propagators.
Abstract class for systems.