Octopus
target_low.F90
Go to the documentation of this file.
1!! Copyright (C) 2002-2006 M. Marques, A. Castro, A. Rubio, G. Bertsch
2!!
3!! This program is free software; you can redistribute it and/or modify
4!! it under the terms of the GNU General Public License as published by
5!! the Free Software Foundation; either version 2, or (at your option)
6!! any later version.
7!!
8!! This program is distributed in the hope that it will be useful,
9!! but WITHOUT ANY WARRANTY; without even the implied warranty of
10!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11!! GNU General Public License for more details.
12!!
13!! You should have received a copy of the GNU General Public License
14!! along with this program; if not, write to the Free Software
15!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
16!! 02110-1301, USA.
17!!
18
19#include "global.h"
20
22 use batch_oct_m
24 use debug_oct_m
27 use epot_oct_m
30 use fft_oct_m
31 use global_oct_m
32 use grid_oct_m
35 use io_oct_m
38 use ions_oct_m
39 use, intrinsic :: iso_fortran_env
43 use lasers_oct_m
44 use loct_oct_m
45 use math_oct_m
46 use mesh_oct_m
53 use output_oct_m
55 use parser_oct_m
58 use space_oct_m
65 use string_oct_m
67 use td_oct_m
68 use types_oct_m
69 use unit_oct_m
72
73 implicit none
74
75 private
76 public :: &
77 target_t, &
83
84 type target_t
85 integer :: type
86 type(states_elec_t) :: st
87 type(excited_states_t) :: est
88 real(real64), allocatable :: rho(:)
89 real(real64), allocatable :: td_fitness(:)
90 character(len=200) :: td_local_target
91 character(len=80) :: excluded_states_list
92 character(len=4096) :: vel_input_string
93 character(len=4096) :: classical_input_string
94 character(len=1024), allocatable :: vel_der_array(:,:)
95 character(len=1024), allocatable :: mom_der_array(:,:)
96 character(len=1024), allocatable :: pos_der_array(:,:)
97 real(real64), allocatable :: grad_local_pot(:,:,:)
98 logical :: move_ions
99 integer :: hhg_nks
100 integer, allocatable :: hhg_k(:)
101 real(real64), allocatable :: hhg_alpha(:)
102 real(real64), allocatable :: hhg_a(:)
103 real(real64) :: hhg_w0
104 real(real64) :: dt
105 integer :: curr_functional
106 real(real64) :: density_weight
107 real(real64) :: curr_weight
108 integer :: strt_iter_curr_tg
109 real(real64), allocatable :: spatial_curr_wgt(:)
110 character(len=1000) :: plateau_string
111 complex(real64), allocatable :: acc(:, :)
112 complex(real64), allocatable :: vel(:, :)
113 complex(real64), allocatable :: gvec(:, :)
114 real(real64), allocatable :: alpha(:)
115 complex(real64) :: spin_matrix(2, 2)
116 type(fft_t) :: fft_handler
117 end type target_t
118
119 integer, public, parameter :: &
120 oct_tg_groundstate = 1, &
121 oct_tg_excited = 2, &
123 oct_tg_userdefined = 4, &
124 oct_tg_jdensity = 5, &
125 oct_tg_local = 6, &
126 oct_tg_td_local = 7, &
128 oct_tg_hhg = 9, &
129 oct_tg_velocity = 10, &
130 oct_tg_hhgnew = 12, &
131 oct_tg_classical = 13, &
132 oct_tg_spin = 14
133
134 integer, public, parameter :: &
135 oct_targetmode_static = 0, &
137
138 integer, public, parameter :: &
139 oct_no_curr = 0, &
140 oct_curr_square = 1, &
141 oct_max_curr_ring = 2, &
143
144
145
146contains
147
148 ! ----------------------------------------------------------------------
149 integer pure function target_mode(tg)
150 type(target_t), intent(in) :: tg
151
152 select case (tg%type)
154 target_mode = oct_targetmode_td
155 case default
156 target_mode = oct_targetmode_static
157 end select
158
159 ! allow specific current functionals to be td
160 ! Attention: yet combined with static density target,
161 ! the total target is considered td.
162 select case (tg%curr_functional)
163 case (oct_curr_square_td)
164 target_mode = oct_targetmode_td
165 end select
166
167 end function target_mode
168
169
170 ! ----------------------------------------------------------------------
171 integer pure function target_type(tg)
172 type(target_t), intent(in) :: tg
173 target_type = tg%type
174 end function target_type
175 ! ----------------------------------------------------------------------
176
178 !-----------------------------------------------------------------------
179 integer pure function target_curr_functional(tg)
180 type(target_t), intent(in) :: tg
181 target_curr_functional = tg%curr_functional
183 !-----------------------------------------------------------------------
186 ! ----------------------------------------------------------------------
187 logical pure function target_move_ions(tg)
188 type(target_t), intent(in) :: tg
189 target_move_ions = tg%move_ions
190 end function target_move_ions
191 ! ----------------------------------------------------------------------
193 ! ----------------------------------------------------------------------
194 logical pure function is_spatial_curr_wgt(tg)
195 type(target_t), intent(in) :: tg
197 is_spatial_curr_wgt = allocated(tg%spatial_curr_wgt)
200 ! ----------------------------------------------------------------------
205!! Local Variables:
206!! mode: f90
207!! coding: utf-8
208!! End:
This module implements batches of mesh functions.
Definition: batch.F90:133
This module implements common operations on batches of mesh functions.
Definition: batch_ops.F90:116
This module implements a calculator for the density and defines related functions.
Definition: density.F90:120
This module calculates the derivatives (gradients, Laplacians, etc.) of a function.
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
Definition: fft.F90:118
This module implements the underlying real-space grid.
Definition: grid.F90:117
This module defines classes and functions for interaction partners.
Definition: io.F90:114
This module is intended to contain "only mathematical" functions and procedures.
Definition: math.F90:115
This module defines various routines, operating on mesh functions.
This module defines the meshes, which are used in Octopus.
Definition: mesh.F90:118
This module handles the communicators for the various parallelization strategies.
Definition: multicomm.F90:145
This module contains the definition of the oct_t data type, which contains some of the basic informat...
This module holds the "opt_control_state_t" datatype, which contains a quantum-classical state.
this module contains the low-level part of the output system
Definition: output_low.F90:115
this module contains the output system
Definition: output.F90:115
This module handles reading and writing restart information for the states_elec_t.
integer, parameter, public oct_tg_velocity
Definition: target_low.F90:212
integer, parameter, public oct_tg_hhgnew
Definition: target_low.F90:212
integer, parameter, public oct_tg_excited
Definition: target_low.F90:212
integer, parameter, public oct_tg_hhg
Definition: target_low.F90:212
integer pure function, public target_curr_functional(tg)
Definition: target_low.F90:273
integer, parameter, public oct_tg_spin
Definition: target_low.F90:212
integer pure function, public target_type(tg)
Definition: target_low.F90:265
integer, parameter, public oct_curr_square_td
Definition: target_low.F90:231
integer, parameter, public oct_targetmode_td
Definition: target_low.F90:227
logical pure function, public is_spatial_curr_wgt(tg)
Definition: target_low.F90:288
integer, parameter, public oct_tg_classical
Definition: target_low.F90:212
integer, parameter, public oct_tg_exclude_state
Definition: target_low.F90:212
integer pure function, public target_mode(tg)
Definition: target_low.F90:243
integer, parameter, public oct_tg_jdensity
Definition: target_low.F90:212
integer, parameter, public oct_tg_gstransformation
Definition: target_low.F90:212
logical pure function, public target_move_ions(tg)
Definition: target_low.F90:281
integer, parameter, public oct_tg_local
Definition: target_low.F90:212
integer, parameter, public oct_tg_td_local
Definition: target_low.F90:212
integer, parameter, public oct_curr_square
Definition: target_low.F90:231
integer, parameter, public oct_max_curr_ring
Definition: target_low.F90:231
integer, parameter, public oct_tg_userdefined
Definition: target_low.F90:212
Definition: td.F90:114
brief This module defines the class unit_t which is used by the unit_systems_oct_m module.
Definition: unit.F90:132
This module defines the unit system, used for input and output.