Octopus
unfold.F90
Go to the documentation of this file.
1!! Copyright (C) 2018-2019 M. S. Mrudul, N. Tancogne-Dejean
2!!
3!!
4!! This program is free software; you can redistribute it and/or modify
5!! it under the terms of the GNU General Public License as published by
6!! the Free Software Foundation; either version 2, or (at your option)
7!! any later version.
8!!
9!! This program is distributed in the hope that it will be useful,
10!! but WITHOUT ANY WARRANTY; without even the implied warranty of
11!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12!! GNU General Public License for more details.
13!!
14!! You should have received a copy of the GNU General Public License
15!! along with this program; if not, write to the Free Software
16!! Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17!! 02110-1301, USA.
18!!
19
20
21#include "global.h"
22
23
25 use batch_oct_m
28 use comm_oct_m
30 use cube_oct_m
32 use debug_oct_m
34 use fft_oct_m
36 use global_oct_m
37 use grid_oct_m
38 use io_oct_m
41 use, intrinsic :: iso_fortran_env
45 use loct_oct_m
46 use math_oct_m
47 use mesh_oct_m
50 use mpi_oct_m
53 use parser_oct_m
57 use space_oct_m
61 use unit_oct_m
63 use utils_oct_m
65 use v_ks_oct_m
66 use xc_oct_m
67
68 implicit none
69
70 private
71 public :: unfold_main
72
73contains
74
75 subroutine unfold_main() bind(c)
76 type(electrons_t), pointer :: sys
77 integer :: ik, nkpoints
78 type(restart_t) :: restart
79 type(cube_t) :: zcube
80 type(cube_function_t) :: cf
81
82 type(lattice_vectors_t) :: pc
83 integer :: ierr, run_mode, file_gvec
84 type(block_t) :: blk
85 integer :: nhighsympoints, nsegments
86 integer :: icol, idir, ncols
87
88 integer, allocatable :: resolution(:)
89 real(real64), allocatable :: highsympoints(:,:), coord_along_path(:)
90 type(kpoints_grid_t) :: path_kpoints_grid
91
92
93 ! the usual initializations
94 call global_init()
95 call parser_init()
96
97 call messages_init()
98
99 call io_init()
101
102 call print_header()
103 call messages_print_with_emphasis(msg="Unfolding Band-structure", namespace=global_namespace)
105
106 call messages_experimental("oct-unfold utility")
109
110 call calc_mode_par%set_parallelization(p_strategy_states, default = .false.)
112
113 if (sys%space%periodic_dim == 0) then
114 message(1) = "oct-unfold can only be used for periodic systems."
115 call messages_fatal(1)
116 end if
118 if (sys%st%parallel_in_states) then
119 call messages_not_implemented("oct-unfold with states parallelization")
120 end if
121
122 if (sys%st%d%ispin == spinors) then
123 call messages_not_implemented("oct-unfold for spinors")
124 end if
125
126
127 !%Variable UnfoldMode
128 !%Type flag
129 !%Default none
130 !%Section Utilities::oct-unfold
131 !%Description
132 !% Specifies which stage of the unfolding tool to use
133 !%Option unfold_setup bit(1)
134 !% Writes the list of k-points corresponding to the path specified by <tt>UnfoldKPointPath</tt>.
135 !% This list of k-point (unfold_kpt.dat) must be used for an unocc calculation of the supercell,
136 !% adding the line "include 'unfold_kpt.dat'" to the inp file and removing the KPointGrid information.
137 !%Option unfold_run bit(2)
138 !% Perform the actual unfolding, based on the states obtained from the previous unocc run.
139 !%End
140 call parse_variable(global_namespace, 'UnfoldMode', 0, run_mode)
141 if (.not. varinfo_valid_option('UnfoldMode', run_mode)) then
142 call messages_input_error(global_namespace, "UnfoldMode must be set to a value different from 0.")
143 end if
144
145 !%Variable UnfoldLatticeParameters
146 !%Type block
147 !%Section Utilities::oct-unfold
148 !%Description
149 !% The lattice parameters of the primitive cell, on which unfolding is performed.
150 !% See the LatticeParameters variable for a more detailed description.
151 !%End
152
153 !%Variable UnfoldLatticeVectors
154 !%Type block
155 !%Default simple cubic
156 !%Section Utilities::oct-unfold
157 !%Description
158 !% Lattice vectors of the primitive cell on which the unfolding is performed.
159 !% See the LatticeVectors variable for a more detailed description.
160 !%End
161 pc = lattice_vectors_t(global_namespace, sys%space, variable_prefix='Unfold')
162
163 !%Variable UnfoldKPointsPath
164 !%Type block
165 !%Section Utilities::oct-unfold
166 !%Description
167 !% Specifies the k-point path for which the unfolding need to be done.
168 !% The syntax is identical to <tt>KPointsPath</tt>.
169 !%End
170 if (parse_block(global_namespace, 'UnfoldKPointsPath', blk) /= 0) then
171 write(message(1),'(a)') 'Error while reading UnfoldPointsPath.'
172 call messages_fatal(1)
173 end if
174
175 ! There is one high symmetry k-point per line
176 nsegments = parse_block_cols(blk, 0)
177 nhighsympoints = parse_block_n(blk) - 1
178 if (nhighsympoints /= nsegments+1) then
179 write(message(1),'(a,i3,a,i3)') 'The first row of UnfoldPointsPath is not compatible with the number of specified k-points.'
180 call messages_fatal(1)
181 end if
182
183 safe_allocate(resolution(1:nsegments))
184 do icol = 1, nsegments
185 call parse_block_integer(blk, 0, icol-1, resolution(icol))
186 end do
187 !Total number of points in the segment
188 nkpoints = sum(resolution) + 1
189
190 safe_allocate(highsympoints(1:sys%space%dim, 1:nhighsympoints))
191 do ik = 1, nhighsympoints
192 !Sanity check
193 ncols = parse_block_cols(blk, ik)
194 if (ncols /= sys%space%dim) then
195 write(message(1),'(a,i8,a,i3)') 'UnfoldPointsPath row ', ik, ' has ', ncols, ' columns but must have ', sys%space%dim
196 call messages_fatal(1)
197 end if
198
199 do idir = 1, sys%space%dim
200 call parse_block_float(blk, ik, idir-1, highsympoints(idir, ik))
201 end do
202 end do
203
204 call parse_block_end(blk)
205
206 call kpoints_grid_init(sys%space%dim, path_kpoints_grid, nkpoints, 1)
207 ! For the output of band-structures
208 safe_allocate(coord_along_path(1:nkpoints))
209
210 call kpoints_path_generate(sys%space%dim, pc, nkpoints, nsegments, resolution, &
211 highsympoints, path_kpoints_grid%point, coord_along_path)
212
213 safe_deallocate_a(resolution)
214 safe_deallocate_a(highsympoints)
215
216 !We convert the k-point to the reduced coordinate of the supercell
217 do ik = 1, path_kpoints_grid%npoints
218 call kpoints_to_reduced(sys%kpoints%latt, path_kpoints_grid%point(:, ik), path_kpoints_grid%red_point(:, ik))
219 end do
220
221 call kpoints_fold_to_1bz(path_kpoints_grid, pc)
222
223 if (run_mode == option__unfoldmode__unfold_setup) then
224
225 call unfold_setup()
226
227 else if (run_mode == option__unfoldmode__unfold_run) then
228
229 !Sanity check
230 file_gvec = io_open('unfold_gvec.dat', global_namespace, action='read')
231 read(file_gvec, *)
232 read(file_gvec, *) ik
233 if (ik /= path_kpoints_grid%npoints) then
234 message(1) = 'There is an inconsistency between unfold_gvec.dat and the input file'
235 call messages_fatal(1)
236 end if
237 call io_close(file_gvec)
238
239 call states_elec_allocate_wfns(sys%st, sys%gr)
240
241 call restart%init(global_namespace, restart_unocc, restart_type_load, sys%mc, ierr, mesh=sys%gr, exact=.true.)
242 if (ierr == 0) then
243 call states_elec_load(restart, global_namespace, sys%space, sys%st, sys%gr, sys%kpoints, fixed_occ=.true., &
244 ierr=ierr, label = ": unfold")
245 end if
246 if (ierr /= 0) then
247 message(1) = 'Unable to read unocc wavefunctions.'
248 call messages_fatal(1)
249 end if
250 call restart%end()
251
252 call cube_init(zcube, sys%gr%idx%ll, global_namespace, sys%space, sys%gr%spacing, &
253 sys%gr%coord_system, fft_type = fft_complex, dont_optimize = .true.)
254 call cube_init_cube_map(zcube, sys%gr)
255
256 call zcube_function_alloc_rs(zcube, cf)
257 call cube_function_alloc_fs(zcube, cf)
258
259 call wfs_extract_spec_fn(sys%space, sys%st, sys%gr, zcube, cf)
260
261 call cube_function_free_fs(zcube, cf)
262 call zcube_function_free_rs(zcube, cf)
263 call cube_end(zcube)
264
265 else
266 message(1) = "Unsupported or incorrect value of UnfoldMode."
267 call messages_fatal(1)
268 end if
269
270 safe_deallocate_a(coord_along_path)
271
272 call kpoints_grid_end(path_kpoints_grid)
273
274 safe_deallocate_p(sys)
275 call fft_all_end()
277 call io_end()
278 call print_date("Calculation ended on ")
279 call messages_end()
280 call parser_end()
281 call global_end()
282
283
284
285 contains
286 !-----------------------------------------------------------------
287 subroutine unfold_setup()
288 integer :: file_gvec, file_kpts, idir
289 integer :: gvec(sys%space%dim)
290
291 push_sub(unfold_setup)
292
293 if (mpi_world%is_root()) then
294 file_gvec = io_open('unfold_gvec.dat', global_namespace, action='write')
295 file_kpts = io_open('unfold_kpt.dat', global_namespace, action='write')
296 write(file_kpts,'(a)') '%KpointsReduced'
297 write(file_gvec,'(a)') '#Created by oct-unfold'
298 write(file_gvec,'(i5)') path_kpoints_grid%npoints
299
300 !We convert the k-point to the reduce coordinate of the supercell
301 do ik = 1, path_kpoints_grid%npoints
302 gvec(:) = nint(path_kpoints_grid%red_point(:, ik) + m_half * 1e-7_real64)
303 write(file_kpts,'(a3)', advance='no') ' 1.'
304 write(file_kpts,'(*(a3,f12.8))') &
305 (' | ', path_kpoints_grid%red_point(idir, ik) - gvec(idir), idir = 1, sys%space%dim)
306 write(file_gvec,'(*(i5))') (gvec(idir), idir = 1, sys%space%dim)
307 end do
308 write(file_kpts,'(a)') '%'
309 call io_close(file_gvec)
310 call io_close(file_kpts)
311 end if
312
313 pop_sub(unfold_setup)
314 end subroutine unfold_setup
315
316 !--------------------------------------------------------------------
317 subroutine wfs_extract_spec_fn(space, st, gr, zcube, cf)
318 class(space_t), intent(in) :: space
319 type(states_elec_t), intent(in) :: st
320 type(grid_t), intent(in) :: gr
321 type(cube_t), intent(inout) :: zcube
322 type(cube_function_t), intent(inout) :: cf
323
324 real(real64), allocatable :: pkm(:,:), ake(:,:), eigs(:)
325 complex(real64), allocatable :: zpsi(:), field_g(:)
326 integer :: file_ake, iq, ist, idim, nenergy
327 integer :: ig, ix, iy, iz, ik, ie, gmin, gmax
328 real(real64) :: eigmin, eigmax, de, norm
329 real(real64), parameter :: tol = 1e-7_real64
330 integer, parameter :: nextend = 10
331 real(real64) :: vec_pc(space%dim), vec_sc(space%dim)
332 type(fourier_shell_t) :: shell
333 character(len=MAX_PATH_LEN) :: filename
334 real(real64), allocatable :: gvec_abs(:,:)
335 logical, allocatable :: g_select(:)
336
337 push_sub(wfs_extract_spec_fn)
338
339 assert(cf%batch_size == 1)
340
341 safe_allocate(zpsi(1:gr%np))
342
343 !%Variable UnfoldEnergyStep
344 !%Type float
345 !%Default 0
346 !%Section Utilities::oct-unfold
347 !%Description
348 !% Specifies the energy resolution for the unfolded band structure.
349 !% If you specify 0, the resolution will be set to be 1/1000 points between <tt>UnfoldMinEnergy</tt>
350 !% and <tt>UnfoldMaxEnergy</tt>
351 !%End
352 call parse_variable(global_namespace, 'UnfoldEnergyStep', m_zero, de)
353 if (de < m_zero) then
354 message(1) = "UnfoldEnergyStep must be positive"
355 call messages_fatal(1)
356 end if
357
358 !%Variable UnfoldMinEnergy
359 !%Type float
360 !%Section Utilities::oct-unfold
361 !%Description
362 !% Specifies the start of the energy range for the unfolded band structure.
363 !% The default value correspond to the samllest eigenvalue.
364 !%End
365 call parse_variable(global_namespace, 'UnfoldMinEnergy', minval(st%eigenval(:, :)), eigmin)
366
367 !%Variable UnfoldMaxEnergy
368 !%Type float
369 !%Section Utilities::oct-unfold
370 !%Description
371 !% Specifies the end of the energy range for the unfolded band structure.
372 !% The default value correspond to the largest eigenvalue.
373 !%End
374 call parse_variable(global_namespace, 'UnfoldMaxEnergy', maxval(st%eigenval(:, :)), eigmax)
375
376 if (abs(de) <= m_epsilon) then
377 de = (eigmax - eigmin) / 1000_real64
378 end if
379
380 !We increase a bit the energy range
381 nenergy = nint((eigmax - eigmin + 2 * nextend * de) / de)
382 safe_allocate(eigs(1:nenergy))
383 do ie = 1, nenergy
384 eigs(ie) = eigmin - nextend * de + (ie - 1) * de
385 end do
386
387 safe_allocate(gvec_abs(1:sys%space%periodic_dim, 1:sys%kpoints%reduced%npoints))
388 gvec_abs = 0
389 file_gvec = io_open('./unfold_gvec.dat', global_namespace, action='read')
390 read(file_gvec,*)
391 read(file_gvec,*)
392 do ik = 1, sys%kpoints%reduced%npoints
393 read(file_gvec,*) vec_sc(1:space%dim)
394 call kpoints_to_absolute(sys%kpoints%latt, vec_sc, gvec_abs(:, ik))
395 end do
396 call io_close(file_gvec)
397
398 if (mpi_world%is_root()) call loct_progress_bar(-1, (st%d%kpt%end - st%d%kpt%start + 1) * st%nst)
399
400 safe_allocate(ake(1:nenergy, 1:st%nik))
401 ake(:, :) = m_zero
402
403 safe_allocate(pkm(st%d%kpt%start:st%d%kpt%end, 1:st%nst))
404 pkm(:, :) = m_zero
405 do ik = st%d%kpt%start, st%d%kpt%end
406 iq = st%d%get_kpoint_index(ik)
407
408 call fourier_shell_init(shell, global_namespace, space, zcube, gr, kk = sys%kpoints%reduced%red_point(:, iq))
409
410 gmin = minval(shell%red_gvec(:,:))
411 gmax = maxval(shell%red_gvec(:,:))
412
413 safe_allocate(g_select(1:shell%ngvectors))
414 g_select(:) = .false.
415
416 select case (sys%space%periodic_dim)
417 case (3)
418 do ig = 1, shell%ngvectors
419 call kpoints_to_absolute(sys%kpoints%latt, real(shell%red_gvec(:,ig), real64), vec_sc(:))
420 do ix = gmin, gmax
421 do iy = gmin, gmax
422 do iz = gmin, gmax
423 vec_pc(1:3) = ix * pc%klattice(1:3,1) + iy * pc%klattice(1:3,2) + iz * pc%klattice(1:3,3)
424 if (abs(vec_sc(1) - vec_pc(1) - gvec_abs(1, iq)) < tol &
425 .and. abs(vec_sc(2) - vec_pc(2)-gvec_abs(2, iq)) < tol &
426 .and. abs(vec_sc(3) - vec_pc(3)-gvec_abs(3, iq)) < tol) then
427 g_select(ig) = .true.
428 end if
429 end do !iz
430 end do !iy
431 end do !ix
432 end do !ig
433
434 case (2)
435
436 do ig = 1, shell%ngvectors
437 call kpoints_to_absolute(sys%kpoints%latt, real(shell%red_gvec(:,ig), real64), vec_sc(:))
438 do ix = gmin, gmax
439 do iy = gmin, gmax
440 vec_pc(1:2) = ix * pc%klattice(1:2,1) + iy * pc%klattice(1:2,2)
441 if (abs(vec_sc(1) - vec_pc(1) - gvec_abs(1, iq)) < tol &
442 .and. abs(vec_sc(2) - vec_pc(2) - gvec_abs(2, iq)) < tol) then
443 g_select(ig) = .true.
444 end if
445 end do !ix
446 end do !ix
447 end do !ig
448
449 case default
450 call messages_not_implemented("Unfolding for periodic dimensions other than 2 or 3")
451 end select
452
453 if (mpi_grp_is_root(gr%mpi_grp)) then
454 write(filename,"(a,i3.3,a4)") trim(adjustl(static_dir))//"ake_",ik,".dat"
455 file_ake = io_open(trim(filename), global_namespace, action='write')
456 write(file_ake, '(a)') '#Energy Ak(E)'
457 write(file_ake, '(a, i5)') '#Number of points in energy window ', nenergy
458 end if
459
460 do ist = 1, st%nst
461 !loop over states
462 do idim = 1, st%d%dim
463 ! Getting wavefunctions
464 ! for the moment we treat all functions as complex
465 call states_elec_get_state(st, gr, idim, ist, ik, zpsi)
466
467 call zmesh_to_cube(gr, zpsi, zcube, cf)
468
469 !Fourier transform from real-space to fourier space
470 call zcube_function_rs2fs(zcube, cf)
471
472 ! Normalisation
473 safe_allocate(field_g(1:shell%ngvectors))
474 norm = m_zero
475 do ig = 1, shell%ngvectors
476 field_g(ig) = cf%fs(shell%coords(1, ig), shell%coords(2, ig), shell%coords(3, ig), 1)
477 norm = norm + abs(field_g(ig))**2
478 end do
479 field_g(:) = field_g(:) / sqrt(norm)
480
481 !Finding sub-g and calculating the Projection Pkm
482 do ig = 1, shell%ngvectors
483 if (.not. g_select(ig)) cycle
484 pkm(ik,ist) = pkm(ik,ist) + abs(field_g(ig))**2
485 end do
486
487 safe_deallocate_a(field_g)
488 end do !idim
489
490 !ist loop end
491 if (mpi_world%is_root()) then
492 call loct_progress_bar((ik - st%d%kpt%start) * st%nst + ist, &
493 (st%d%kpt%end - st%d%kpt%start + 1) * st%nst)
494 end if
495 end do !ist
496
497 ! Calculating the spectral function
498 !TODO: We could implement here a different broadening
499 do ist = 1, st%nst
500 do ie = 1, nenergy
501 ake(ie, ik) = ake(ie, ik) + pkm(ik, ist) * (m_three * de / m_pi) / &
502 ((eigs(ie) - st%eigenval(ist, ik))**2 + (m_three * de)**2)
503 end do
504 end do
505
506 ! writing Spectral-Function
507 if (mpi_grp_is_root(gr%mpi_grp)) then
508 do ie = 1, nenergy
509 write(file_ake, '(1es19.12,1x,1es19.12)') eigs(ie), ake(ie, ik)
510 end do
511
512 call io_close(file_ake)
513 end if
514
515 call fourier_shell_end(shell)
516 safe_deallocate_a(g_select)
517
518 end do !ik
519
520 if (st%d%kpt%parallel) then
521 call comm_allreduce(st%st_kpt_mpi_grp, ake)
522 end if
523
524 if (mpi_world%is_root()) then
525 file_ake = io_open(trim(adjustl(static_dir))//"ake.dat", global_namespace, action='write')
526 write(file_ake, '(a)') '#Energy Ak(E)'
527 write(file_ake, '(a, i5)') '#Number of points in energy window ', nenergy
528 do ik = 1, nkpoints
529 do ie = 1, nenergy
530 write(file_ake,fmt ='(1es19.12,1x,1es19.12,1x,1es19.12)') coord_along_path(ik), &
531 eigs(ie), ake(ie, ik)
532 end do
533 end do
534
535 call io_close(file_ake)
536 end if
537
538 safe_deallocate_a(eigs)
539 safe_deallocate_a(ake)
540
541 safe_deallocate_a(gvec_abs)
542 safe_deallocate_a(pkm)
543 safe_deallocate_a(zpsi)
544 pop_sub(wfs_extract_spec_fn)
545
546 end subroutine wfs_extract_spec_fn
547 !------------------------------------------------------------
548 end subroutine unfold_main
549end module unfold_main_oct_m
550!! Local Variables:
551!! mode: f90
552!! coding: utf-8
553!! 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 handles the calculation mode.
type(calc_mode_par_t), public calc_mode_par
Singleton instance of parallel calculation mode.
integer, parameter, public p_strategy_states
parallelization in states
subroutine, public cube_function_free_fs(cube, cf)
Deallocates the Fourier space buffer of the cube function.
subroutine, public cube_function_alloc_fs(cube, cf, force_alloc)
Allocates the local part of the Fourier space grid on the cube function.
subroutine, public zcube_function_free_rs(cube, cf)
Deallocates the real space grid.
subroutine, public zcube_function_rs2fs(cube, cf)
Fourier transform a cube function from real space to Fourier space.
subroutine, public zcube_function_alloc_rs(cube, cf, in_device, force_alloc)
Allocates locally the real space grid, if PFFT library is not used. Otherwise, it assigns the PFFT re...
subroutine, public cube_end(cube)
Definition: cube.F90:404
subroutine, public cube_init(cube, nn, namespace, space, spacing, coord_system, fft_type, fft_library, dont_optimize, nn_out, mpi_grp, need_partition, tp_enlarge, blocksize, batch_size, nthreads, single)
Definition: cube.F90:206
subroutine, public cube_init_cube_map(cube, mesh)
Definition: cube.F90:887
integer, parameter, public spinors
Fast Fourier Transform module. This module provides a single interface that works with different FFT ...
Definition: fft.F90:118
subroutine, public fft_all_init(namespace)
initialize the table
Definition: fft.F90:301
subroutine, public fft_all_end()
delete all plans
Definition: fft.F90:427
integer, parameter, public fft_complex
Definition: fft.F90:176
subroutine, public fourier_shell_init(this, namespace, space, cube, mesh, kk)
subroutine, public fourier_shell_end(this)
subroutine, public global_end()
Finalise parser varinfo file, and MPI.
Definition: global.F90:493
real(real64), parameter, public m_zero
Definition: global.F90:198
real(real64), parameter, public m_pi
some mathematical constants
Definition: global.F90:196
real(real64), parameter, public m_epsilon
Definition: global.F90:214
character(len= *), parameter, public static_dir
Definition: global.F90:278
subroutine, public global_init(communicator)
Initialise Octopus.
Definition: global.F90:374
real(real64), parameter, public m_half
Definition: global.F90:204
real(real64), parameter, public m_three
Definition: global.F90:201
This module implements the underlying real-space grid.
Definition: grid.F90:117
Definition: io.F90:114
subroutine, public io_init(defaults)
If the argument defaults is present and set to true, then the routine will not try to read anything f...
Definition: io.F90:163
subroutine, public io_close(iunit, grp)
Definition: io.F90:465
subroutine, public io_end()
Definition: io.F90:269
integer function, public io_open(file, namespace, action, status, form, position, die, recl, grp)
Definition: io.F90:400
subroutine, public kpoints_path_generate(dim, latt, nkpoints, nsegments, resolution, highsympoints, kpoints, coord)
Generate the k-point along a path.
Definition: kpoints.F90:1413
subroutine, public kpoints_fold_to_1bz(grid, latt)
Definition: kpoints.F90:1603
subroutine, public kpoints_grid_end(this)
Definition: kpoints.F90:255
subroutine, public kpoints_to_reduced(latt, kin, kout)
Definition: kpoints.F90:1158
subroutine, public kpoints_to_absolute(latt, kin, kout)
Definition: kpoints.F90:1145
subroutine, public kpoints_grid_init(dim, this, npoints, nshifts)
Definition: kpoints.F90:234
System information (time, memory, sysname)
Definition: loct.F90:115
subroutine, public loct_progress_bar(a, maxcount)
A wrapper around the progress bar, such that it can be silenced without needing to dress the call wit...
Definition: loct.F90:274
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
subroutine, public messages_end()
Definition: messages.F90:271
subroutine, public messages_print_with_emphasis(msg, iunit, namespace)
Definition: messages.F90:896
subroutine, public messages_not_implemented(feature, namespace)
Definition: messages.F90:1066
character(len=512), private msg
Definition: messages.F90:165
subroutine, public messages_init(output_dir)
Definition: messages.F90:218
subroutine, public print_date(str)
Definition: messages.F90:981
character(len=256), dimension(max_lines), public message
to be output by fatal, warning
Definition: messages.F90:160
subroutine, public messages_fatal(no_lines, only_root_writes, namespace)
Definition: messages.F90:408
subroutine, public messages_input_error(namespace, var, details, row, column)
Definition: messages.F90:689
subroutine, public messages_experimental(name, namespace)
Definition: messages.F90:1038
logical function mpi_grp_is_root(grp)
Is the current MPI process of grpcomm, root.
Definition: mpi.F90:473
type(mpi_grp_t), public mpi_world
Definition: mpi.F90:338
This module handles the communicators for the various parallelization strategies.
Definition: multicomm.F90:145
type(namespace_t), public global_namespace
Definition: namespace.F90:133
subroutine, public parser_init()
Initialise the Octopus parser.
Definition: parser.F90:408
subroutine, public parser_end()
End the Octopus parser.
Definition: parser.F90:440
integer function, public parse_block(namespace, name, blk, check_varinfo_)
Definition: parser.F90:621
/* To use the profiling module, call profiling_in and profiling_out with the label of the region as a...
Definition: profiling.F90:143
subroutine, public profiling_end(namespace)
Definition: profiling.F90:476
subroutine, public profiling_init(namespace)
Create profiling subdirectory.
Definition: profiling.F90:285
integer, parameter, public restart_type_load
Definition: restart.F90:182
integer, parameter, public restart_unocc
Definition: restart.F90:154
subroutine, public states_elec_allocate_wfns(st, mesh, wfs_type, skip, packed)
Allocates the KS wavefunctions defined within a states_elec_t structure.
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...
subroutine, public unfold_main()
Definition: unfold.F90:169
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.
subroutine, public unit_system_init(namespace)
This module is intended to contain simple general-purpose utility functions and procedures.
Definition: utils.F90:118
subroutine, public print_header()
This subroutine prints the logo followed by information about the compilation and the system....
Definition: utils.F90:308
Definition: xc.F90:118
Class describing the electron system.
Definition: electrons.F90:220
Description of the grid, containing information on derivatives, stencil, and symmetries.
Definition: grid.F90:169
The states_elec_t class contains all electronic wave functions.
int true(void)
subroutine unfold_setup()
Definition: unfold.F90:381
subroutine wfs_extract_spec_fn(space, st, gr, zcube, cf)
Definition: unfold.F90:411