75 integer,
parameter :: LR = 1,
fd = 2
82 type(namespace_t),
intent(in) :: namespace
121 subroutine run(namespace, calc_mode_id)
122 type(namespace_t),
intent(in) :: namespace
123 integer,
intent(in) :: calc_mode_id
125 type(partner_list_t) :: partners
126 class(system_t),
pointer :: systems
127 type(system_factory_t) :: system_factory
128 type(interactions_factory_t) :: interactions_factory
129 logical :: from_scratch
131 type(partner_iterator_t) :: iter
132 type(system_list_t) :: flat_list
133 class(interaction_partner_t),
pointer :: partner
134 real(real64) :: largest_dt, largest_allowed_time
144 if (calc_mode_id == option__calculationmode__recipe)
then
159 if (calc_mode_id == option__calculationmode__test)
then
173 systems => electrons_t(namespace, generate_epot = calc_mode_id /= option__calculationmode__dummy)
177 call systems%init_parallelization(
mpi_world)
180 select type (systems)
183 partners = systems%list
192 type is (electrons_t)
193 call partners%add(systems)
197 select type (systems)
199 select case (calc_mode_id)
200 case (option__calculationmode__gs)
202 case (option__calculationmode__td)
227 if(calc_mode_id == option__calculationmode__td)
then
229 select type (sys => systems)
233 largest_allowed_time =
m_zero
235 call sys%get_flat_list(flat_list)
237 call iter%start(flat_list)
238 do while (iter%has_next())
239 select type (subsystem => iter%get_next())
241 select type (subalgorithm => subsystem%algo)
243 largest_dt = max(largest_dt, subalgorithm%dt)
248 select type(prop => systems%algo)
250 largest_allowed_time =
floor(prop%final_time / largest_dt)* largest_dt
255 call iter%start(flat_list)
256 do while (iter%has_next())
257 select type(subsystem => iter%get_next())
259 select type (subalgorithm => subsystem%algo)
261 if(
floor(subalgorithm%final_time/subalgorithm%dt) * subalgorithm%dt > largest_allowed_time )
then
262 write(
message(1), *)
"Incommensurate propagation time: The calculation would run into a deadlock, as a system with"
263 write(
message(2), *)
"a smaller timestep would attempt a timestep beyond the last step" &
264 //
" of a system with a larger time step."
265 write(
message(3), *)
"Please, adjust the TDPropagationTime and/or the TDTimeStep variables of the systems."
267 write(
message(5), *)
"With the current timesteps, the TDPropagationTime should be ", largest_allowed_time
283 call systems%create_interactions(interactions_factory, partners)
286 select type (systems)
290 iunit_out = io_open(
'debug/interaction_graph.dot', systems%namespace, action=
'write')
291 write(iunit_out,
'(a)')
'digraph {'
292 call systems%write_interaction_graph(iunit_out, debug%interaction_graph_full)
293 write(iunit_out,
'(a)')
'}'
294 call io_close(iunit_out)
298 if (.not. systems%process_is_slave())
then
314 call parse_variable(namespace,
'FromScratch', .false., from_scratch)
318 select case (calc_mode_id)
319 case (option__calculationmode__gs)
320 select type (systems)
323 type is (electrons_t)
326 case (option__calculationmode__unocc)
328 case (option__calculationmode__td)
329 select type (systems)
332 type is (electrons_t)
335 case (option__calculationmode__go)
337 case (option__calculationmode__opt_control)
339 case (option__calculationmode__em_resp)
346 case (option__calculationmode__casida)
348 case (option__calculationmode__vdw)
349 call vdw_run(systems, from_scratch)
350 case (option__calculationmode__vib_modes)
357 case (option__calculationmode__one_shot)
358 message(1) =
"CalculationMode = one_shot is obsolete. Please use gs with MaximumIter = 0."
360 case (option__calculationmode__kdotp)
362 case (option__calculationmode__dummy)
363 case (option__calculationmode__invert_ks)
365 case (option__calculationmode__recipe)
372 select type (systems)
375 call iter%start(partners)
376 do while (iter%has_next())
377 select type(ptr => iter%get_next())
380 safe_deallocate_p(partner)
383 safe_deallocate_p(partner)
386 safe_deallocate_p(partner)
392 safe_deallocate_p(systems)
408 select case (calc_mode_id)
409 case (option__calculationmode__gs, option__calculationmode__go, option__calculationmode__unocc)
411 case (option__calculationmode__td)
413 case (option__calculationmode__casida)
double floor(double __x) __attribute__((__nothrow__
subroutine, public accel_init(base_grp, namespace)
subroutine, public accel_end(namespace)
This module implements the Casida equations for excited states.
subroutine, public casida_run_init()
subroutine, public casida_run(system, from_scratch)
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
subroutine, public ground_state_run_init()
subroutine, public ground_state_run(electrons, from_scratch)
This module defines classes and functions for interaction partners.
subroutine, public invert_ks_run(system)
subroutine, public kdotp_lr_run(system, from_scratch)
subroutine, public load_lasers(partners, namespace)
subroutine, public messages_print_with_emphasis(msg, iunit, 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()
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
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()
subroutine, public restart_module_init(namespace)
top level module for all calculation modes
integer function get_resp_method(namespace)
query input file for the response mode.
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 td_run_init()
This module implements a unit-test like runmode for Octopus.
subroutine, public test_run(namespace)
Components and integration test runner.
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)
subroutine calc_mode_init()
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.